comparison MannWhitney_DE.R @ 3:3d86c89f15bf draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_mannwhitney_de commit fab41058cef186159d746c55808d0e69f252af2f"
author artbio
date Thu, 29 Aug 2019 05:35:04 -0400
parents c67dba545a37
children 6916ac5a9ef0
comparison
equal deleted inserted replaced
2:60964af87364 3:3d86c89f15bf
136 gene_stats <- descriptive_stats(data.counts) 136 gene_stats <- descriptive_stats(data.counts)
137 137
138 results <- merge(gene_stats, MW_test, by = "row.names") 138 results <- merge(gene_stats, MW_test, by = "row.names")
139 colnames(results)[1] <- "genes" 139 colnames(results)[1] <- "genes"
140 140
141 ## Annotate Significant column
142 results$Significant[results$Significant == T & !is.na(results$Significant)] <- ifelse(subset(results, Significant == T)$log2FC > 0, "UP", "DOWN")
143 results$Significant[results$Significant == F & !is.na(results$Significant)] <- "NS"
144
145
141 # Save files 146 # Save files
142 write.table( 147 write.table(
143 results, 148 results[order(results$p.adjust),],
144 opt$output, 149 opt$output,
145 sep = "\t", 150 sep = "\t",
146 quote = F, 151 quote = F,
147 col.names = T, 152 col.names = T,
148 row.names = F 153 row.names = F