$VAR1 = { 'uninfected' => [ 'uninfected_01', 'uninfected_02', 'uninfected_03', 'uninfected_04', 'uninfected_05', 'uninfected_06' ], 'infected' => [ 'infected_01', 'infected_02', 'infected_03', 'infected_04', 'infected_05', 'infected_06', 'infected_07', 'infected_08', 'infected_09', 'infected_10', 'infected_11', 'infected_12', 'infected_13', 'infected_14', 'infected_15', 'infected_16', 'infected_17', 'infected_18' ] }; 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/20200422_cbai_DEG_basic_comparisons/infected-uninfected/salmon.gene.counts.matrix", header=T, row.names=1, com='') > col_ordering = c(2,3,4,5,6,7,10,11,12,13,14,15,16,19,20,21,22,23,1,8,9,17,18,24) > rnaseqMatrix = data[,col_ordering] > rnaseqMatrix = round(rnaseqMatrix) > rnaseqMatrix = rnaseqMatrix[rowSums(cpm(rnaseqMatrix) > 1) >= 2,] > conditions = factor(c(rep("infected", 18), rep("uninfected", 6))) > > 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 >