diff edger.R @ 4:4730985c816f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/edger commit 230fc767e2e402ee460440afab0e348f2ccab179
author iuc
date Sat, 05 Jan 2019 05:32:33 -0500
parents d79ed3ec25fe
children fb9b9f0f2f06
line wrap: on
line diff
--- a/edger.R	Sun May 06 13:38:41 2018 -0400
+++ b/edger.R	Sat Jan 05 05:32:33 2019 -0500
@@ -268,7 +268,9 @@
 
     # Process factors
     if (is.null(opt$factInput)) {
-            factorData <- read.table(opt$factFile, header=TRUE, sep="\t")
+            factorData <- read.table(opt$factFile, header=TRUE, sep="\t", strip.white=TRUE)
+            # order samples as in counts matrix
+            factorData <- factorData[match(colnames(counts), factorData[, 1]), ]
             factors <- factorData[, -1, drop=FALSE]
     }  else {
             factors <- unlist(strsplit(opt$factInput, "|", fixed=TRUE))