mm_filt <- normalize_expt(mm_filt, transform="round")
## This function will replace the expt$expressionset slot with:
## round(data)
## It backs up the current data into a slot named:
## expt$backup_expressionset. It will also save copies of each step along the way
## in expt$normalized with the corresponding libsizes. Keep the libsizes in mind
## when invoking limma. The appropriate libsize is the non-log(cpm(normalized)).
## This is most likely kept at:
## 'new_expt$normalized$intermediate_counts$normalization$libsizes'
## A copy of this may also be found at:
## new_expt$best_libsize
## Filter is false, this should likely be set to something, good
## choices include cbcb, kofa, pofa (anything but FALSE). If you want this to
## stay FALSE, keep in mind that if other normalizations are performed, then the
## resulting libsizes are likely to be strange (potentially negative!)
## Leaving the data unconverted. It is often advisable to cpm/rpkm
## the data to normalize for sampling differences, keep in mind though that rpkm
## has some annoying biases, and voom() by default does a cpm (though hpgl_voom()
## will try to detect this).
## Leaving the data unnormalized. This is necessary for DESeq, but
## EdgeR/limma might benefit from normalization. Good choices include quantile,
## size-factor, tmm, etc.
## Not correcting the count-data for batch effects. If batch is
## included in EdgerR/limma's model, then this is probably wise; but in extreme
## batch effects this is a good parameter to play with.
## Step 1: not doing count filtering.
## Step 2: not normalizing the data.
## Step 3: not converting the data.
## Step 4: transforming the data with round.
## Step 5: not doing batch correction.
mm_pairwise <- all_pairwise(input=mm_filt, model_batch="svaseq")
## The be method chose 2 surrogate variable(s).
## This ignores the surrogates parameter and uses the be method to estimate surrogates.
## Using svaseq to test before/after batch correction.
## Finished running DE analyses, collecting outputs.
## Comparing analyses 1/6: pmn_inf_14d_vs_pmn_inf_12hr
## Comparing analyses 2/6: pmn_uninf_12hr_vs_pmn_inf_12hr
## Comparing analyses 3/6: pmn_uninf_14d_vs_pmn_inf_12hr
## Comparing analyses 4/6: pmn_uninf_12hr_vs_pmn_inf_14d
## Comparing analyses 5/6: pmn_uninf_14d_vs_pmn_inf_14d
## Comparing analyses 6/6: pmn_uninf_14d_vs_pmn_uninf_12hr
keepers <- list(
"12hr_infuninf" = c("pmn_inf_12hr", "pmn_uninf_12hr"),
"14d_infuninf" = c("pmn_inf_14d", "pmn_uninf_14d"),
"inf_14d12hr" = c("pmn_inf_14d", "pmn_inf_12hr"),
"uninf_14d12hr" = c("pmn_uninf_14d", "pmn_uninf_12hr"))
mm_combined <- combine_de_tables(mm_pairwise,
keepers=keepers,
excel=paste0("excel/mm_pairwise-v", ver, ".xlsx"))
## Deleting the file excel/mm_pairwise-v20170706.xlsx before writing the tables.
## Writing a legend of columns.
## Printing a pca plot before/after surrogates/batch estimation.
## Working on 1/4: 12hr_infuninf
## Found inverse table with pmn_uninf_12hr_vs_pmn_inf_12hr
## Working on 2/4: 14d_infuninf
## Found inverse table with pmn_uninf_14d_vs_pmn_inf_14d
## Working on 3/4: inf_14d12hr
## Found table with pmn_inf_14d_vs_pmn_inf_12hr
## Working on 4/4: uninf_14d12hr
## Found table with pmn_uninf_14d_vs_pmn_uninf_12hr
## Adding venn plots for 12hr_infuninf.
## Limma expression coefficients for 12hr_infuninf; R^2: 0.708; equation: y = 0.879x - 0.0581
## Edger expression coefficients for 12hr_infuninf; R^2: 0.41; equation: y = 0.768x + 3.49
## DESeq2 expression coefficients for 12hr_infuninf; R^2: 0.753; equation: y = 0.785x + 0.507
## Adding venn plots for 14d_infuninf.
## Limma expression coefficients for 14d_infuninf; R^2: 0.772; equation: y = 0.93x + 0.0163
## Edger expression coefficients for 14d_infuninf; R^2: 0.601; equation: y = 0.796x + 2.41
## DESeq2 expression coefficients for 14d_infuninf; R^2: 0.837; equation: y = 0.939x + 0.167
## Adding venn plots for inf_14d12hr.
## Limma expression coefficients for inf_14d12hr; R^2: 0.476; equation: y = 0.682x + 0.284
## Edger expression coefficients for inf_14d12hr; R^2: 0.262; equation: y = 0.618x + 4.86
## DESeq2 expression coefficients for inf_14d12hr; R^2: 0.65; equation: y = 0.719x + 0.137
## Adding venn plots for uninf_14d12hr.
## Limma expression coefficients for uninf_14d12hr; R^2: 0.61; equation: y = 0.775x + 0.333
## Edger expression coefficients for uninf_14d12hr; R^2: 0.422; equation: y = 0.69x + 4.53
## DESeq2 expression coefficients for uninf_14d12hr; R^2: 0.722; equation: y = 0.848x - 0.339
## Writing summary information.
## The sheet: pairwise_summary is in legend, 12hr_infuninf, 14d_infuninf, inf_14d12hr, uninf_14d12hr, pairwise_summary.
## Attempting to add the comparison plot to pairwise_summary at row: 22 and column: 1
## Performing save of the workbook.
mm_sig <- extract_significant_genes(mm_combined,
excel=paste0("excel/mm_sig-v", ver, ".xlsx"))
## Writing a legend of columns.
## Writing excel data sheet 0/4: 12hr_infuninf
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 51 genes.
## After (adj)p filter, the down genes table has 19 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 51 genes.
## After fold change filter, the down genes table has 19 genes.
## Writing excel data sheet 1/4: 14d_infuninf
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 17 genes.
## After (adj)p filter, the down genes table has 35 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 17 genes.
## After fold change filter, the down genes table has 35 genes.
## Writing excel data sheet 2/4: inf_14d12hr
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 997 genes.
## After (adj)p filter, the down genes table has 429 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 997 genes.
## After fold change filter, the down genes table has 429 genes.
## Writing excel data sheet 3/4: uninf_14d12hr
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 262 genes.
## After (adj)p filter, the down genes table has 70 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 262 genes.
## After fold change filter, the down genes table has 70 genes.
## Printing significant genes to the file: excel/mm_sig-v20170706.xlsx
## 1/4: Writing excel data sheet up_1limma_12hr_infuninf
## 1/4: Writing excel data sheet down_1limma_12hr_infuninf
## 2/4: Writing excel data sheet up_2limma_14d_infuninf
## 2/4: Writing excel data sheet down_2limma_14d_infuninf
## 3/4: Writing excel data sheet up_3limma_inf_14d12hr
## 3/4: Writing excel data sheet down_3limma_inf_14d12hr
## 4/4: Writing excel data sheet up_4limma_uninf_14d12hr
## 4/4: Writing excel data sheet down_4limma_uninf_14d12hr
## Writing excel data sheet 4/4: 12hr_infuninf
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 135 genes.
## After (adj)p filter, the down genes table has 103 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 135 genes.
## After fold change filter, the down genes table has 101 genes.
## Writing excel data sheet 5/4: 14d_infuninf
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 37 genes.
## After (adj)p filter, the down genes table has 12 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 36 genes.
## After fold change filter, the down genes table has 10 genes.
## Writing excel data sheet 6/4: inf_14d12hr
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 565 genes.
## After (adj)p filter, the down genes table has 98 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 563 genes.
## After fold change filter, the down genes table has 96 genes.
## Writing excel data sheet 7/4: uninf_14d12hr
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 390 genes.
## After (adj)p filter, the down genes table has 58 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 390 genes.
## After fold change filter, the down genes table has 57 genes.
## Printing significant genes to the file: excel/mm_sig-v20170706.xlsx
## The sheet: number_changed is in legend, number_changed, up_1limma_12hr_infuninf, down_1limma_12hr_infuninf, up_2limma_14d_infuninf, down_2limma_14d_infuninf, up_3limma_inf_14d12hr, down_3limma_inf_14d12hr, up_4limma_uninf_14d12hr, down_4limma_uninf_14d12hr.
## 1/4: Writing excel data sheet up_1edger_12hr_infuninf
## 1/4: Writing excel data sheet down_1edger_12hr_infuninf
## 2/4: Writing excel data sheet up_2edger_14d_infuninf
## 2/4: Writing excel data sheet down_2edger_14d_infuninf
## 3/4: Writing excel data sheet up_3edger_inf_14d12hr
## 3/4: Writing excel data sheet down_3edger_inf_14d12hr
## 4/4: Writing excel data sheet up_4edger_uninf_14d12hr
## 4/4: Writing excel data sheet down_4edger_uninf_14d12hr
## Writing excel data sheet 8/4: 12hr_infuninf
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 162 genes.
## After (adj)p filter, the down genes table has 66 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 162 genes.
## After fold change filter, the down genes table has 66 genes.
## Writing excel data sheet 9/4: 14d_infuninf
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 1 genes.
## After (adj)p filter, the down genes table has 0 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 1 genes.
## After fold change filter, the down genes table has 0 genes.
## Writing excel data sheet 10/4: inf_14d12hr
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 945 genes.
## After (adj)p filter, the down genes table has 75 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 945 genes.
## After fold change filter, the down genes table has 75 genes.
## Writing excel data sheet 11/4: uninf_14d12hr
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 550 genes.
## After (adj)p filter, the down genes table has 33 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 550 genes.
## After fold change filter, the down genes table has 32 genes.
## Printing significant genes to the file: excel/mm_sig-v20170706.xlsx
## The sheet: number_changed is in legend, number_changed, up_1limma_12hr_infuninf, down_1limma_12hr_infuninf, up_2limma_14d_infuninf, down_2limma_14d_infuninf, up_3limma_inf_14d12hr, down_3limma_inf_14d12hr, up_4limma_uninf_14d12hr, down_4limma_uninf_14d12hr, up_1edger_12hr_infuninf, down_1edger_12hr_infuninf, up_2edger_14d_infuninf, down_2edger_14d_infuninf, up_3edger_inf_14d12hr, down_3edger_inf_14d12hr, up_4edger_uninf_14d12hr, down_4edger_uninf_14d12hr.
## 1/4: Writing excel data sheet up_1deseq_12hr_infuninf
## 1/4: Writing excel data sheet down_1deseq_12hr_infuninf
## 2/4: Writing excel data sheet up_2deseq_14d_infuninf
## 2/4: Writing excel data sheet down_2deseq_14d_infuninf
## 3/4: Writing excel data sheet up_3deseq_inf_14d12hr
## 3/4: Writing excel data sheet down_3deseq_inf_14d12hr
## 4/4: Writing excel data sheet up_4deseq_uninf_14d12hr
## 4/4: Writing excel data sheet down_4deseq_uninf_14d12hr
## Writing excel data sheet 12/4: 12hr_infuninf
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 0 genes.
## After (adj)p filter, the down genes table has 0 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 0 genes.
## After fold change filter, the down genes table has 0 genes.
## Writing excel data sheet 13/4: 14d_infuninf
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 0 genes.
## After (adj)p filter, the down genes table has 0 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 0 genes.
## After fold change filter, the down genes table has 0 genes.
## Writing excel data sheet 14/4: inf_14d12hr
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 10 genes.
## After (adj)p filter, the down genes table has 3 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 10 genes.
## After fold change filter, the down genes table has 3 genes.
## Writing excel data sheet 15/4: uninf_14d12hr
## Assuming the fold changes are on the log scale and so taking >< 0
## After (adj)p filter, the up genes table has 7 genes.
## After (adj)p filter, the down genes table has 26 genes.
## Assuming the fold changes are on the log scale and so taking -1.0 * fc
## After fold change filter, the up genes table has 7 genes.
## After fold change filter, the down genes table has 26 genes.
## Printing significant genes to the file: excel/mm_sig-v20170706.xlsx
## The sheet: number_changed is in legend, number_changed, up_1limma_12hr_infuninf, down_1limma_12hr_infuninf, up_2limma_14d_infuninf, down_2limma_14d_infuninf, up_3limma_inf_14d12hr, down_3limma_inf_14d12hr, up_4limma_uninf_14d12hr, down_4limma_uninf_14d12hr, up_1edger_12hr_infuninf, down_1edger_12hr_infuninf, up_2edger_14d_infuninf, down_2edger_14d_infuninf, up_3edger_inf_14d12hr, down_3edger_inf_14d12hr, up_4edger_uninf_14d12hr, down_4edger_uninf_14d12hr, up_1deseq_12hr_infuninf, down_1deseq_12hr_infuninf, up_2deseq_14d_infuninf, down_2deseq_14d_infuninf, up_3deseq_inf_14d12hr, down_3deseq_inf_14d12hr, up_4deseq_uninf_14d12hr, down_4deseq_uninf_14d12hr.
## 1/4: Writing excel data sheet up_1basic_12hr_infuninf
## 1/4: Writing excel data sheet down_1basic_12hr_infuninf
## 2/4: Writing excel data sheet up_2basic_14d_infuninf
## 2/4: Writing excel data sheet down_2basic_14d_infuninf
## 3/4: Writing excel data sheet up_3basic_inf_14d12hr
## 3/4: Writing excel data sheet down_3basic_inf_14d12hr
## 4/4: Writing excel data sheet up_4basic_uninf_14d12hr
## 4/4: Writing excel data sheet down_4basic_uninf_14d12hr
## Adding significance bar plots.
## The sheet: number_changed is in legend, number_changed, up_1limma_12hr_infuninf, down_1limma_12hr_infuninf, up_2limma_14d_infuninf, down_2limma_14d_infuninf, up_3limma_inf_14d12hr, down_3limma_inf_14d12hr, up_4limma_uninf_14d12hr, down_4limma_uninf_14d12hr, up_1edger_12hr_infuninf, down_1edger_12hr_infuninf, up_2edger_14d_infuninf, down_2edger_14d_infuninf, up_3edger_inf_14d12hr, down_3edger_inf_14d12hr, up_4edger_uninf_14d12hr, down_4edger_uninf_14d12hr, up_1deseq_12hr_infuninf, down_1deseq_12hr_infuninf, up_2deseq_14d_infuninf, down_2deseq_14d_infuninf, up_3deseq_inf_14d12hr, down_3deseq_inf_14d12hr, up_4deseq_uninf_14d12hr, down_4deseq_uninf_14d12hr, up_1basic_12hr_infuninf, down_1basic_12hr_infuninf, up_2basic_14d_infuninf, down_2basic_14d_infuninf, up_3basic_inf_14d12hr, down_3basic_inf_14d12hr, up_4basic_uninf_14d12hr, down_4basic_uninf_14d12hr.
## The sheet: number_changed is in legend, number_changed, up_1limma_12hr_infuninf, down_1limma_12hr_infuninf, up_2limma_14d_infuninf, down_2limma_14d_infuninf, up_3limma_inf_14d12hr, down_3limma_inf_14d12hr, up_4limma_uninf_14d12hr, down_4limma_uninf_14d12hr, up_1edger_12hr_infuninf, down_1edger_12hr_infuninf, up_2edger_14d_infuninf, down_2edger_14d_infuninf, up_3edger_inf_14d12hr, down_3edger_inf_14d12hr, up_4edger_uninf_14d12hr, down_4edger_uninf_14d12hr, up_1deseq_12hr_infuninf, down_1deseq_12hr_infuninf, up_2deseq_14d_infuninf, down_2deseq_14d_infuninf, up_3deseq_inf_14d12hr, down_3deseq_inf_14d12hr, up_4deseq_uninf_14d12hr, down_4deseq_uninf_14d12hr, up_1basic_12hr_infuninf, down_1basic_12hr_infuninf, up_2basic_14d_infuninf, down_2basic_14d_infuninf, up_3basic_inf_14d12hr, down_3basic_inf_14d12hr, up_4basic_uninf_14d12hr, down_4basic_uninf_14d12hr.
## The sheet: number_changed is in legend, number_changed, up_1limma_12hr_infuninf, down_1limma_12hr_infuninf, up_2limma_14d_infuninf, down_2limma_14d_infuninf, up_3limma_inf_14d12hr, down_3limma_inf_14d12hr, up_4limma_uninf_14d12hr, down_4limma_uninf_14d12hr, up_1edger_12hr_infuninf, down_1edger_12hr_infuninf, up_2edger_14d_infuninf, down_2edger_14d_infuninf, up_3edger_inf_14d12hr, down_3edger_inf_14d12hr, up_4edger_uninf_14d12hr, down_4edger_uninf_14d12hr, up_1deseq_12hr_infuninf, down_1deseq_12hr_infuninf, up_2deseq_14d_infuninf, down_2deseq_14d_infuninf, up_3deseq_inf_14d12hr, down_3deseq_inf_14d12hr, up_4deseq_uninf_14d12hr, down_4deseq_uninf_14d12hr, up_1basic_12hr_infuninf, down_1basic_12hr_infuninf, up_2basic_14d_infuninf, down_2basic_14d_infuninf, up_3basic_inf_14d12hr, down_3basic_inf_14d12hr, up_4basic_uninf_14d12hr, down_4basic_uninf_14d12hr.
pander::pander(sessionInfo())
R version 3.3.3 (2017-03-06)
**Platform:** x86_64-pc-linux-gnu (64-bit)
locale: LC_CTYPE=en_US.utf8, LC_NUMERIC=C, LC_TIME=en_US.utf8, LC_COLLATE=en_US.utf8, LC_MONETARY=en_US.utf8, LC_MESSAGES=en_US.utf8, LC_PAPER=en_US.utf8, LC_NAME=C, LC_ADDRESS=C, LC_TELEPHONE=C, LC_MEASUREMENT=en_US.utf8 and LC_IDENTIFICATION=C
attached base packages: stats, graphics, grDevices, utils, datasets, methods and base
other attached packages: Vennerable(v.3.1.0.9000), ruv(v.0.9.6) and hpgltools(v.2017.01)
loaded via a namespace (and not attached): nlme(v.3.1-131), bitops(v.1.0-6), devtools(v.1.13.2), bit64(v.0.9-7), doParallel(v.1.0.10), RColorBrewer(v.1.1-2), rprojroot(v.1.2), GenomeInfoDb(v.1.10.3), tools(v.3.3.3), backports(v.1.1.0), R6(v.2.2.2), rpart(v.4.1-11), Hmisc(v.4.0-3), DBI(v.0.7), lazyeval(v.0.2.0), BiocGenerics(v.0.20.0), mgcv(v.1.8-17), colorspace(v.1.3-2), nnet(v.7.3-12), withr(v.1.0.2), gridExtra(v.2.2.1), DESeq2(v.1.14.1), bit(v.1.1-12), compiler(v.3.3.3), preprocessCore(v.1.36.0), graph(v.1.52.0), Biobase(v.2.34.0), htmlTable(v.1.9), xml2(v.1.1.1), labeling(v.0.3), scales(v.0.4.1), checkmate(v.1.8.3), DEoptimR(v.1.0-8), robustbase(v.0.92-7), genefilter(v.1.56.0), RBGL(v.1.50.0), commonmark(v.1.2), stringr(v.1.2.0), digest(v.0.6.12), foreign(v.0.8-69), rmarkdown(v.1.6), XVector(v.0.14.1), base64enc(v.0.1-3), htmltools(v.0.3.6), limma(v.3.30.13), htmlwidgets(v.0.8), rlang(v.0.1.1), RSQLite(v.2.0), BiocParallel(v.1.8.2), gtools(v.3.5.0), acepack(v.1.4.1), RCurl(v.1.95-4.8), magrittr(v.1.5), Formula(v.1.2-1), Matrix(v.1.2-10), Rcpp(v.0.12.11), munsell(v.0.4.3), S4Vectors(v.0.12.2), stringi(v.1.1.5), yaml(v.2.1.14), edgeR(v.3.16.5), SummarizedExperiment(v.1.4.0), zlibbioc(v.1.20.0), plyr(v.1.8.4), grid(v.3.3.3), blob(v.1.1.0), parallel(v.3.3.3), ggrepel(v.0.6.5), crayon(v.1.3.2), lattice(v.0.20-35), splines(v.3.3.3), pander(v.0.6.0), annotate(v.1.52.1), locfit(v.1.5-9.1), knitr(v.1.16), GenomicRanges(v.1.26.4), corpcor(v.1.6.9), reshape2(v.1.4.2), geneplotter(v.1.52.0), codetools(v.0.2-15), stats4(v.3.3.3), XML(v.3.98-1.9), evaluate(v.0.10.1), latticeExtra(v.0.6-28), data.table(v.1.10.4), foreach(v.1.4.3), testthat(v.1.0.2), gtable(v.0.2.0), ggplot2(v.2.2.1), openxlsx(v.4.0.17), xtable(v.1.8-2), roxygen2(v.6.0.1), survival(v.2.41-3), tibble(v.1.3.3), iterators(v.1.0.8), AnnotationDbi(v.1.36.2), memoise(v.1.1.0), IRanges(v.2.8.2), cluster(v.2.0.6) and sva(v.3.22.0)
this_save <- paste0(gsub(pattern="\\.Rmd", replace="", x=rmd_file), "-v", ver, ".rda.xz")
message(paste0("Saving to ", this_save))
## Saving to 03_differential_expression_mmusculus-v20170706.rda.xz
tt <- sm(saveme(filename=this_save))