This worksheet performs a set of pairwise comparisons of the counts for this tnseq experiment given the sva surrogate adjustments.
This is being performed via limma/edger/deseq2, which one may rightly argue is not entirely appropriate for TNSeq data. On the other hand, as a general metric of changing fitness, it provides some interesting information.
initial_diff <- all_pairwise(input=rpmi_filt, model_batch="fsva")
## The be method chose 4 surrogate variable(s).
## Attempting fsva surrogate estimation with 4 surrogates.
## There is just one batch in this data.
## Using fsva to visualize before/after batch inclusion.
## Performing a test normalization with: raw
## There is just one batch in this data.
## Finished running DE analyses, collecting outputs.
## Comparing analyses 1/55: rpmi_t2_highcu_vs_rpmi_t2
## Comparing analyses 2/55: rpmi_t2_highzn_vs_rpmi_t2
## Comparing analyses 3/55: rpmi_t2_lowcu_vs_rpmi_t2
## Comparing analyses 4/55: rpmi_t2_lowzn_vs_rpmi_t2
## Comparing analyses 5/55: rpmi_t3_vs_rpmi_t2
## Comparing analyses 6/55: rpmi_t3_highcu_vs_rpmi_t2
## Comparing analyses 7/55: rpmi_t3_highzn_vs_rpmi_t2
## Comparing analyses 8/55: rpmi_t3_lowcu_vs_rpmi_t2
## Comparing analyses 9/55: rpmi_t3_lowzn_vs_rpmi_t2
## Comparing analyses 10/55: thy_t1_vs_rpmi_t2
## Comparing analyses 11/55: rpmi_t2_highzn_vs_rpmi_t2_highcu
## Comparing analyses 12/55: rpmi_t2_lowcu_vs_rpmi_t2_highcu
## Comparing analyses 13/55: rpmi_t2_lowzn_vs_rpmi_t2_highcu
## Comparing analyses 14/55: rpmi_t3_vs_rpmi_t2_highcu
## Comparing analyses 15/55: rpmi_t3_highcu_vs_rpmi_t2_highcu
## Comparing analyses 16/55: rpmi_t3_highzn_vs_rpmi_t2_highcu
## Comparing analyses 17/55: rpmi_t3_lowcu_vs_rpmi_t2_highcu
## Comparing analyses 18/55: rpmi_t3_lowzn_vs_rpmi_t2_highcu
## Comparing analyses 19/55: thy_t1_vs_rpmi_t2_highcu
## Comparing analyses 20/55: rpmi_t2_lowcu_vs_rpmi_t2_highzn
## Comparing analyses 21/55: rpmi_t2_lowzn_vs_rpmi_t2_highzn
## Comparing analyses 22/55: rpmi_t3_vs_rpmi_t2_highzn
## Comparing analyses 23/55: rpmi_t3_highcu_vs_rpmi_t2_highzn
## Comparing analyses 24/55: rpmi_t3_highzn_vs_rpmi_t2_highzn
## Comparing analyses 25/55: rpmi_t3_lowcu_vs_rpmi_t2_highzn
## Comparing analyses 26/55: rpmi_t3_lowzn_vs_rpmi_t2_highzn
## Comparing analyses 27/55: thy_t1_vs_rpmi_t2_highzn
## Comparing analyses 28/55: rpmi_t2_lowzn_vs_rpmi_t2_lowcu
## Comparing analyses 29/55: rpmi_t3_vs_rpmi_t2_lowcu
## Comparing analyses 30/55: rpmi_t3_highcu_vs_rpmi_t2_lowcu
## Comparing analyses 31/55: rpmi_t3_highzn_vs_rpmi_t2_lowcu
## Comparing analyses 32/55: rpmi_t3_lowcu_vs_rpmi_t2_lowcu
## Comparing analyses 33/55: rpmi_t3_lowzn_vs_rpmi_t2_lowcu
## Comparing analyses 34/55: thy_t1_vs_rpmi_t2_lowcu
## Comparing analyses 35/55: rpmi_t3_vs_rpmi_t2_lowzn
## Comparing analyses 36/55: rpmi_t3_highcu_vs_rpmi_t2_lowzn
## Comparing analyses 37/55: rpmi_t3_highzn_vs_rpmi_t2_lowzn
## Comparing analyses 38/55: rpmi_t3_lowcu_vs_rpmi_t2_lowzn
## Comparing analyses 39/55: rpmi_t3_lowzn_vs_rpmi_t2_lowzn
## Comparing analyses 40/55: thy_t1_vs_rpmi_t2_lowzn
## Comparing analyses 41/55: rpmi_t3_highcu_vs_rpmi_t3
## Comparing analyses 42/55: rpmi_t3_highzn_vs_rpmi_t3
## Comparing analyses 43/55: rpmi_t3_lowcu_vs_rpmi_t3
## Comparing analyses 44/55: rpmi_t3_lowzn_vs_rpmi_t3
## Comparing analyses 45/55: thy_t1_vs_rpmi_t3
## Comparing analyses 46/55: rpmi_t3_highzn_vs_rpmi_t3_highcu
## Comparing analyses 47/55: rpmi_t3_lowcu_vs_rpmi_t3_highcu
## Comparing analyses 48/55: rpmi_t3_lowzn_vs_rpmi_t3_highcu
## Comparing analyses 49/55: thy_t1_vs_rpmi_t3_highcu
## Comparing analyses 50/55: rpmi_t3_lowcu_vs_rpmi_t3_highzn
## Comparing analyses 51/55: rpmi_t3_lowzn_vs_rpmi_t3_highzn
## Comparing analyses 52/55: thy_t1_vs_rpmi_t3_highzn
## Comparing analyses 53/55: rpmi_t3_lowzn_vs_rpmi_t3_lowcu
## Comparing analyses 54/55: thy_t1_vs_rpmi_t3_lowcu
## Comparing analyses 55/55: thy_t1_vs_rpmi_t3_lowzn
keepers <- list("t2t1" = c("rpmi_t2", "thy_t1"),
"t3t1" = c("rpmi_t3", "thy_t1"),
"t2zn" = c("rpmi_t2_highzn", "rpmi_t2_lowzn"),
"t3zn" = c("rpmi_t3_highzn", "rpmi_t3_lowzn"),
## "t2cu" = c("rpmi_t2_highcu", "rpmi_t2_lowcu"),
## "t3cu" = c("rpmi_t3_highcu", "rpmi_t3_lowcu"),
"time_highzn" = c("rpmi_t3_highzn", "rpmi_t2_highzn"),
"time_lowzn" = c("rpmi_t3_lowzn", "rpmi_t2_lowzn"),
## "time_highcu" = c("rpmi_t3_highcu", "rpmi_t2_highcu"),
## "time_lowcu" = c("rpmi_t3_lowcu", "rpmi_t2_lowcu"),
"t2_rpmi_highzn" = c("rpmi_t2_highzn", "rpmi_t2"),
"t3_rpmi_highzn" = c("rpmi_t3_highzn", "rpmi_t3"),
"t2_rpmi_lowzn" = c("rpmi_t2_lowzn", "rpmi_t2"),
"t3_rpmi_lowzn" = c("rpmi_t3_lowzn", "rpmi_t3")
## "t2_rpmi_highcu" = c("rpmi_t2_highcu", "rpmi_t2"),
## "t3_rpmi_highcu" = c("rpmi_t3_highcu", "rpmi_t3"),
## "t2_rpmi_lowcu" = c("rpmi_t2_lowcu", "rpmi_t2"),
## "t3_rpmi_lowcu" = c("rpmi_t3_lowcu", "rpmi_t3"))
)
initial_write <- combine_de_tables(all_pairwise_result=initial_diff,
excel=paste0("excel/initial_diff-v", ver, ".xlsx"),
keepers=keepers)
## Deleting the file excel/initial_diff-v20180717.xlsx before writing the tables.
## Writing a legend of columns.
## Printing a pca plot before/after surrogates/batch estimation.
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Too few points to calculate an ellipse
## Working on 1/10: t2t1
## Found inverse table with thy_t1_vs_rpmi_t2
## Working on 2/10: t3t1
## Found inverse table with thy_t1_vs_rpmi_t3
## Working on 3/10: t2zn
## Found inverse table with rpmi_t2_lowzn_vs_rpmi_t2_highzn
## Working on 4/10: t3zn
## Found inverse table with rpmi_t3_lowzn_vs_rpmi_t3_highzn
## Working on 5/10: time_highzn
## Found table with rpmi_t3_highzn_vs_rpmi_t2_highzn
## Working on 6/10: time_lowzn
## Found table with rpmi_t3_lowzn_vs_rpmi_t2_lowzn
## Working on 7/10: t2_rpmi_highzn
## Found table with rpmi_t2_highzn_vs_rpmi_t2
## Working on 8/10: t3_rpmi_highzn
## Found table with rpmi_t3_highzn_vs_rpmi_t3
## Working on 9/10: t2_rpmi_lowzn
## Found table with rpmi_t2_lowzn_vs_rpmi_t2
## Working on 10/10: t3_rpmi_lowzn
## Found table with rpmi_t3_lowzn_vs_rpmi_t3
## Adding venn plots for rpmi_t2_vs_thy_t1.
## Limma expression coefficients for rpmi_t2_vs_thy_t1; R^2: 0.983; equation: y = 0.983x + 0.17
## Edger expression coefficients for rpmi_t2_vs_thy_t1; R^2: 0.984; equation: y = 1.02x - 0.075
## DESeq2 expression coefficients for rpmi_t2_vs_thy_t1; R^2: 0.984; equation: y = 1.02x - 0.142
## Adding venn plots for rpmi_t3_vs_thy_t1.
## Limma expression coefficients for rpmi_t3_vs_thy_t1; R^2: 0.987; equation: y = 0.961x + 0.417
## Edger expression coefficients for rpmi_t3_vs_thy_t1; R^2: 0.988; equation: y = 1.01x + 0.0109
## DESeq2 expression coefficients for rpmi_t3_vs_thy_t1; R^2: 0.988; equation: y = 1.01x - 0.034
## Adding venn plots for rpmi_t2_highzn_vs_rpmi_t2_lowzn.
## Limma expression coefficients for rpmi_t2_highzn_vs_rpmi_t2_lowzn; R^2: 0.994; equation: y = 0.988x + 0.101
## Edger expression coefficients for rpmi_t2_highzn_vs_rpmi_t2_lowzn; R^2: 0.994; equation: y = 1x - 0.00218
## DESeq2 expression coefficients for rpmi_t2_highzn_vs_rpmi_t2_lowzn; R^2: 0.994; equation: y = 1x + 0.00243
## Adding venn plots for rpmi_t3_highzn_vs_rpmi_t3_lowzn.
## Limma expression coefficients for rpmi_t3_highzn_vs_rpmi_t3_lowzn; R^2: 0.994; equation: y = 0.998x + 0.0153
## Edger expression coefficients for rpmi_t3_highzn_vs_rpmi_t3_lowzn; R^2: 0.993; equation: y = 0.993x + 0.0525
## DESeq2 expression coefficients for rpmi_t3_highzn_vs_rpmi_t3_lowzn; R^2: 0.993; equation: y = 0.993x + 0.0684
## The sheet name was too long for Excel, truncating it by removing vowels.
## Adding venn plots for rpmi_t3_highzn_vs_rpmi_t2_highzn.
## Limma expression coefficients for rpmi_t3_highzn_vs_rpmi_t2_highzn; R^2: 0.993; equation: y = 0.99x + 0.0829
## Edger expression coefficients for rpmi_t3_highzn_vs_rpmi_t2_highzn; R^2: 0.993; equation: y = 0.993x + 0.0586
## DESeq2 expression coefficients for rpmi_t3_highzn_vs_rpmi_t2_highzn; R^2: 0.993; equation: y = 0.993x + 0.0684
## Adding venn plots for rpmi_t3_lowzn_vs_rpmi_t2_lowzn.
## Limma expression coefficients for rpmi_t3_lowzn_vs_rpmi_t2_lowzn; R^2: 0.991; equation: y = 0.975x + 0.221
## Edger expression coefficients for rpmi_t3_lowzn_vs_rpmi_t2_lowzn; R^2: 0.992; equation: y = 0.994x + 0.0699
## DESeq2 expression coefficients for rpmi_t3_lowzn_vs_rpmi_t2_lowzn; R^2: 0.992; equation: y = 0.994x + 0.0849
## Adding venn plots for rpmi_t2_highzn_vs_rpmi_t2.
## Limma expression coefficients for rpmi_t2_highzn_vs_rpmi_t2; R^2: 0.99; equation: y = 0.987x + 0.139
## Edger expression coefficients for rpmi_t2_highzn_vs_rpmi_t2; R^2: 0.99; equation: y = 1x - 0.00933
## DESeq2 expression coefficients for rpmi_t2_highzn_vs_rpmi_t2; R^2: 0.99; equation: y = 1x - 0.00604
## Adding venn plots for rpmi_t3_highzn_vs_rpmi_t3.
## Limma expression coefficients for rpmi_t3_highzn_vs_rpmi_t3; R^2: 0.992; equation: y = 0.99x + 0.0874
## Edger expression coefficients for rpmi_t3_highzn_vs_rpmi_t3; R^2: 0.992; equation: y = 0.993x + 0.0535
## DESeq2 expression coefficients for rpmi_t3_highzn_vs_rpmi_t3; R^2: 0.992; equation: y = 0.993x + 0.0703
## Adding venn plots for rpmi_t2_lowzn_vs_rpmi_t2.
## Limma expression coefficients for rpmi_t2_lowzn_vs_rpmi_t2; R^2: 0.993; equation: y = 1x + 0.0176
## Edger expression coefficients for rpmi_t2_lowzn_vs_rpmi_t2; R^2: 0.993; equation: y = 1x - 0.028
## DESeq2 expression coefficients for rpmi_t2_lowzn_vs_rpmi_t2; R^2: 0.993; equation: y = 1x - 0.038
## Adding venn plots for rpmi_t3_lowzn_vs_rpmi_t3.
## Limma expression coefficients for rpmi_t3_lowzn_vs_rpmi_t3; R^2: 0.994; equation: y = 0.99x + 0.0862
## Edger expression coefficients for rpmi_t3_lowzn_vs_rpmi_t3; R^2: 0.994; equation: y = 0.995x + 0.045
## DESeq2 expression coefficients for rpmi_t3_lowzn_vs_rpmi_t3; R^2: 0.994; equation: y = 0.995x + 0.0597
## Writing summary information.
## Attempting to add the comparison plot to pairwise_summary at row: 28 and column: 1
##
|
| | 0%
|
|====== | 10%
|
|============= | 20%
|
|==================== | 30%
|
|========================== | 40%
|
|================================ | 50%
|
|======================================= | 60%
|
|============================================== | 70%
|
|==================================================== | 80%
|
|========================================================== | 90%
|
|=================================================================| 100%
## Performing save of the workbook.
sig_write <- sm(extract_significant_genes(initial_write,
excel=paste0("excel/significant-v", ver, ".xlsx")))
message(paste0("This is hpgltools commit: ", get_git_commit()))
## If you wish to reproduce this exact build of hpgltools, invoke the following:
## > git clone http://github.com/abelew/hpgltools.git
## > git reset c730ef178f8e57bbf3819e21cf5e6cfe879e6328
## R> packrat::restore()
## This is hpgltools commit: Fri Jul 13 17:21:39 2018 -0400: c730ef178f8e57bbf3819e21cf5e6cfe879e6328
pander::pander(sessionInfo())
R version 3.5.1 (2018-07-02)
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: foreach(v.1.4.4), Vennerable(v.3.1.0.9000), ruv(v.0.9.7) and hpgltools(v.2018.03)
loaded via a namespace (and not attached): minqa(v.1.2.4), colorspace(v.1.3-2), colorRamps(v.2.3), rprojroot(v.1.3-2), htmlTable(v.1.12), corpcor(v.1.6.9), XVector(v.0.20.0), GenomicRanges(v.1.32.4), base64enc(v.0.1-3), rstudioapi(v.0.7), roxygen2(v.6.0.1), ggrepel(v.0.8.0), bit64(v.0.9-7), AnnotationDbi(v.1.42.1), xml2(v.1.2.0), codetools(v.0.2-15), splines(v.3.5.1), doParallel(v.1.0.11), robustbase(v.0.93-1), geneplotter(v.1.58.0), knitr(v.1.20), Formula(v.1.2-3), nloptr(v.1.0.4), Rsamtools(v.1.32.2), pbkrtest(v.0.4-7), annotate(v.1.58.0), cluster(v.2.0.7-1), graph(v.1.58.0), compiler(v.3.5.1), httr(v.1.3.1), backports(v.1.1.2), assertthat(v.0.2.0), Matrix(v.1.2-14), lazyeval(v.0.2.1), limma(v.3.36.2), acepack(v.1.4.1), htmltools(v.0.3.6), prettyunits(v.1.0.2), tools(v.3.5.1), bindrcpp(v.0.2.2), gtable(v.0.2.0), glue(v.1.2.0), GenomeInfoDbData(v.1.1.0), reshape2(v.1.4.3), dplyr(v.0.7.6), Rcpp(v.0.12.17), Biobase(v.2.40.0), Biostrings(v.2.48.0), gdata(v.2.18.0), preprocessCore(v.1.42.0), nlme(v.3.1-137), rtracklayer(v.1.40.3), iterators(v.1.0.10), stringr(v.1.3.1), openxlsx(v.4.1.0), lme4(v.1.1-17), gtools(v.3.8.1), devtools(v.1.13.6), XML(v.3.98-1.12), DEoptimR(v.1.0-8), edgeR(v.3.22.3), directlabels(v.2018.05.22), zlibbioc(v.1.26.0), MASS(v.7.3-50), scales(v.0.5.0), doSNOW(v.1.0.16), hms(v.0.4.2), RBGL(v.1.56.0), parallel(v.3.5.1), SummarizedExperiment(v.1.10.1), RColorBrewer(v.1.1-2), yaml(v.2.1.19), memoise(v.1.1.0), gridExtra(v.2.3), pander(v.0.6.2), ggplot2(v.3.0.0), rpart(v.4.1-13), biomaRt(v.2.36.1), latticeExtra(v.0.6-28), stringi(v.1.2.3), RSQLite(v.2.1.1), genefilter(v.1.62.0), S4Vectors(v.0.18.3), checkmate(v.1.8.5), GenomicFeatures(v.1.32.0), caTools(v.1.17.1), BiocGenerics(v.0.26.0), zip(v.1.0.0), BiocParallel(v.1.14.2), GenomeInfoDb(v.1.16.0), rlang(v.0.2.1), pkgconfig(v.2.0.1), commonmark(v.1.5), matrixStats(v.0.53.1), bitops(v.1.0-6), evaluate(v.0.10.1), lattice(v.0.20-35), purrr(v.0.2.5), bindr(v.0.1.1), labeling(v.0.3), htmlwidgets(v.1.2), GenomicAlignments(v.1.16.0), bit(v.1.1-14), tidyselect(v.0.2.4), plyr(v.1.8.4), magrittr(v.1.5), variancePartition(v.1.10.0), DESeq2(v.1.20.0), R6(v.2.2.2), snow(v.0.4-2), IRanges(v.2.14.10), gplots(v.3.0.1), Hmisc(v.4.1-1), DelayedArray(v.0.6.1), DBI(v.1.0.0), pillar(v.1.3.0), foreign(v.0.8-70), withr(v.2.1.2), mgcv(v.1.8-24), nnet(v.7.3-12), survival(v.2.42-6), RCurl(v.1.95-4.11), tibble(v.1.4.2), crayon(v.1.3.4), KernSmooth(v.2.23-15), rmarkdown(v.1.10), progress(v.1.2.0), locfit(v.1.5-9.1), grid(v.3.5.1), sva(v.3.28.0), data.table(v.1.11.4), blob(v.1.1.1), digest(v.0.6.15), xtable(v.1.8-2), stats4(v.3.5.1), munsell(v.0.5.0) and quadprog(v.1.5-5)
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-v20180717.rda.xz
tmp <- sm(saveme(filename=this_save))