$VAR1 = { 'cold' => [ 'cold_01', 'cold_02', 'cold_03', 'cold_04', 'cold_05', 'cold_06', 'cold_07', 'cold_08', 'cold_09' ], 'ambient' => [ 'ambient_01', 'ambient_02', 'ambient_03', 'ambient_04', 'ambient_05', 'ambient_06', 'ambient_07', 'ambient_08', 'ambient_09' ] }; CMD: R --no-save --no-restore --no-site-file --no-init-file -q < salmon.gene.counts.matrix.ambient_vs_cold.ambient.vs.cold.EdgeR.Rscript > if (! require(edgeR)) { + source("https://bioconductor.org/biocLite.R") + biocLite("edgeR") + library(edgeR) + } > > data = read.table("/gscratch/scrubbed/samwhite/outputs/20200422_cbai_DEG_basic_comparisons/ambient-cold/salmon.gene.counts.matrix", header=T, row.names=1, com='') > col_ordering = c(2,3,5,9,10,11,15,16,17,1,4,6,7,8,12,13,14,18) > rnaseqMatrix = data[,col_ordering] > rnaseqMatrix = round(rnaseqMatrix) > rnaseqMatrix = rnaseqMatrix[rowSums(cpm(rnaseqMatrix) > 1) >= 2,] > conditions = factor(c(rep("ambient", 9), rep("cold", 9))) > > exp_study = DGEList(counts=rnaseqMatrix, group=conditions) > exp_study = calcNormFactors(exp_study) > exp_study = estimateDisp(exp_study) Design matrix not provided. Switch to the classic mode. > et = exactTest(exp_study, pair=c("ambient", "cold")) > tTags = topTags(et,n=NULL) > result_table = tTags$table > result_table = data.frame(sampleA="ambient", sampleB="cold", result_table) > result_table$logFC = -1 * result_table$logFC > write.table(result_table, file='salmon.gene.counts.matrix.ambient_vs_cold.edgeR.DE_results', sep=' ', quote=F, row.names=T) > write.table(rnaseqMatrix, file='salmon.gene.counts.matrix.ambient_vs_cold.edgeR.count_matrix', sep=' ', quote=F, row.names=T) > source("/gscratch/srlab/programs/trinityrnaseq-v2.9.0/Analysis/DifferentialExpression/R/rnaseq_plot_funcs.R") > pdf("salmon.gene.counts.matrix.ambient_vs_cold.edgeR.DE_results.MA_n_Volcano.pdf") > plot_MA_and_Volcano(rownames(result_table), result_table$logCPM, result_table$logFC, result_table$FDR) > dev.off() null device 1 >