$VAR1 = { 'uninfected' => [ 'uninfected_01', 'uninfected_02' ], 'infected' => [ 'infected_01', 'infected_02' ] }; CMD: R --no-save --no-restore --no-site-file --no-init-file -q < salmon.gene.counts.matrix.infected_vs_uninfected.infected.vs.uninfected.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/infected-vs-uninfected/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("infected", 2), rep("uninfected", 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("infected", "uninfected")) > tTags = topTags(et,n=NULL) > result_table = tTags$table > result_table = data.frame(sampleA="infected", sampleB="uninfected", result_table) > result_table$logFC = -1 * result_table$logFC > write.table(result_table, file='salmon.gene.counts.matrix.infected_vs_uninfected.edgeR.DE_results', sep=' ', quote=F, row.names=T) > write.table(rnaseqMatrix, file='salmon.gene.counts.matrix.infected_vs_uninfected.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.infected_vs_uninfected.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 >