comparison limma_voom.R @ 18:97e06a4c7c75 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 5f5e2ad38bf004b33fc5da5d9d4e75cf1130f666
author iuc
date Sun, 05 May 2019 09:02:04 -0400
parents 86b3df7db58b
children c9c6427edfe9
comparison
equal deleted inserted replaced
17:86b3df7db58b 18:97e06a4c7c75
877 if ("i" %in% plots & haveAnno) { 877 if ("i" %in% plots & haveAnno) {
878 # make gene labels unique to handle NAs 878 # make gene labels unique to handle NAs
879 geneanno <- y$genes 879 geneanno <- y$genes
880 geneanno[, 2] <- make.unique(geneanno[, 2]) 880 geneanno[, 2] <- make.unique(geneanno[, 2])
881 881
882 # use the logCPMS for the counts
883 if (wantTrend) {
884 cnts <- logCPM
885 } else{
886 cnts <- vData$E
887 }
888
882 # MD plot 889 # MD plot
883 Glimma::glMDPlot(fit, coef=i, counts=y$counts, anno=geneanno, groups=factors[, 1], 890 Glimma::glMDPlot(fit, coef=i, counts=cnts, anno=geneanno, groups=factors[, 1],
884 status=status[, i], sample.cols=col.group, 891 status=status[, i], sample.cols=col.group,
885 main=paste("MD Plot:", unmake.names(con)), side.main=colnames(y$genes)[2], 892 main=paste("MD Plot:", unmake.names(con)), side.main=colnames(y$genes)[2],
886 folder=paste0("glimma_", unmake.names(con)), launch=FALSE) 893 folder=paste0("glimma_", unmake.names(con)), launch=FALSE)
887 linkName <- paste0("Glimma_MDPlot_", con, ".html") 894 linkName <- paste0("Glimma_MDPlot_", con, ".html")
888 linkAddr <- paste0("glimma_", con, "/MD-Plot.html") 895 linkAddr <- paste0("glimma_", con, "/MD-Plot.html")
889 linkData <- rbind(linkData, c(linkName, linkAddr)) 896 linkData <- rbind(linkData, c(linkName, linkAddr))
890 897
891 # Volcano plot 898 # Volcano plot
892 Glimma::glXYPlot(x=fit$coefficients[, i], y=fit$lods[, i], counts=y$counts, anno=geneanno, groups=factors[, 1], 899 Glimma::glXYPlot(x=fit$coefficients[, i], y=-log10(fit$p.value[, i]), counts=cnts, anno=geneanno, groups=factors[, 1],
893 status=status[, i], sample.cols=col.group, 900 status=status[, i], sample.cols=col.group,
894 main=paste("Volcano Plot:", unmake.names(con)), side.main=colnames(y$genes)[2], 901 main=paste("Volcano Plot:", unmake.names(con)), side.main=colnames(y$genes)[2],
895 xlab="logFC", ylab="logodds", 902 xlab="logFC", ylab="-log10(P-value)",
896 folder=paste0("glimma_volcano_", unmake.names(con)), launch=FALSE) 903 folder=paste0("glimma_volcano_", unmake.names(con)), launch=FALSE)
897 linkName <- paste0("Glimma_VolcanoPlot_", con, ".html") 904 linkName <- paste0("Glimma_VolcanoPlot_", con, ".html")
898 linkAddr <- paste0("glimma_volcano_", con, "/XY-Plot.html") 905 linkAddr <- paste0("glimma_volcano_", con, "/XY-Plot.html")
899 linkData <- rbind(linkData, c(linkName, linkAddr)) 906 linkData <- rbind(linkData, c(linkName, linkAddr))
900 } 907 }