$VAR1 = { 'D12' => [ 'D12_01', 'D12_02' ], 'D26' => [ 'D26_01', 'D26_02' ] }; CMD: R --no-save --no-restore --no-site-file --no-init-file -q < salmon.gene.counts.matrix.D12_vs_D26.D12.vs.D26.EdgeR.Rscript > if (! require(edgeR)) { + source("https://bioconductor.org/biocLite.R") + biocLite("edgeR") + library(edgeR) + } > > data = read.table("/gscratch/scrubbed/samwhite/outputs/20200207_cbai_DEG/D12-vs-D26/salmon.gene.counts.matrix", header=T, row.names=1, com='') > col_ordering = c(1,2,3,4) > rnaseqMatrix = data[,col_ordering] > rnaseqMatrix = round(rnaseqMatrix) > rnaseqMatrix = rnaseqMatrix[rowSums(cpm(rnaseqMatrix) > 1) >= 2,] > conditions = factor(c(rep("D12", 2), rep("D26", 2))) > > 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("D12", "D26")) > tTags = topTags(et,n=NULL) > result_table = tTags$table > result_table = data.frame(sampleA="D12", sampleB="D26", result_table) > result_table$logFC = -1 * result_table$logFC > write.table(result_table, file='salmon.gene.counts.matrix.D12_vs_D26.edgeR.DE_results', sep=' ', quote=F, row.names=T) > write.table(rnaseqMatrix, file='salmon.gene.counts.matrix.D12_vs_D26.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.D12_vs_D26.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 >