This document turns to the infection of PBMC cells with L.panamensis. This data is particularly strangely affected by the different strains used to infect the cells, and as a result is both useful and troubling.
Given the observations above, we have some ideas of ways to pass the data for differential expression analyses which may or may not be ‘better’. Lets try some and see what happens.
Given the above ways to massage the data, lets use a few of them for limma/deseq/edger. The main caveat in this is that those tools really do expect specific distributions of data which we horribly violate if we use log2() data, which is why in the previous blocks I named them l2blahblah, thus we can do the same sets of normalization but without that and forcibly push the resulting data into limma/edger/deseq.
Everything I did in 02_estimation_infection.html suggests that there are no significant differences visible if one looks just at chronic/self-healing in this data. Further testing has seemingly proven this statement, as a result most of the following analyses will look at chronic/uninfected and self-healing/uninfected followed by attempts to reconcile those results.
To save some time and annoyance with sva, lets filter the data now. In addition, write down a small function used to extract the sets of significant genes across different contrasts (notably self/uninfected vs. chronic/uninfected).
## There were 18, now there are 6 samples.
## Assuming no batch in model for testing pca.
## Finished running DE analyses, collecting outputs.
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Writing a legend of columns.
## Working on table 1/1: sh_vs_chr
## Length Class Mode
## sh_vs_chr 46 data.frame list
## Writing a legend of columns.
## The count is: 1 and the test is: deseq.
## Writing excel data according to deseq for sh_vs_chr: 1/1.
## After (adj)p filter, the up genes table has 197 genes.
## After (adj)p filter, the down genes table has 403 genes.
## After fold change filter, the up genes table has 5 genes.
## After fold change filter, the down genes table has 4 genes.
## Printing significant genes to the file: excel/significant_genes.xlsx
## 1/1: Creating significant table up_1deseq_sh_vs_chr
## Adding significance bar plots.
## ensembltranscriptid ensemblgeneid hgncsymbol
## ENSG00000205846 ENST00000382073 ENSG00000205846 CLEC6A
## ENSG00000111052 ENST00000261203 ENSG00000111052 LIN7A
## ENSG00000184838 ENST00000379551 ENSG00000184838 PRR16
## ENSG00000186047 ENST00000400393 ENSG00000186047 DLEU7
## ENSG00000125538 ENST00000263341 ENSG00000125538 IL1B
## description
## ENSG00000205846 C-type lectin domain family 6 member A [Source:HGNC Symbol;Acc:HGNC:14556]
## ENSG00000111052 lin-7 homolog A, crumbs cell polarity complex component [Source:HGNC Symbol;Acc:HGNC:17787]
## ENSG00000184838 proline rich 16 [Source:HGNC Symbol;Acc:HGNC:29654]
## ENSG00000186047 deleted in lymphocytic leukemia, 7 [Source:HGNC Symbol;Acc:HGNC:17567]
## ENSG00000125538 interleukin 1 beta [Source:HGNC Symbol;Acc:HGNC:5992]
## genebiotype deseq_logfc deseq_adjp edger_logfc
## ENSG00000205846 protein_coding 1.554 0.9995 1.545
## ENSG00000111052 protein_coding 1.242 0.9995 1.194
## ENSG00000184838 protein_coding 1.215 0.9995 1.204
## ENSG00000186047 protein_coding 1.134 0.9995 1.155
## ENSG00000125538 protein_coding 1.122 0.9995 1.128
## edger_adjp limma_logfc limma_adjp basic_nummed
## ENSG00000205846 0.9996 1.6870 0.9842 1.1460
## ENSG00000111052 0.9996 1.3100 0.9842 -0.3794
## ENSG00000184838 0.9996 1.3110 0.9842 1.3110
## ENSG00000186047 0.9996 1.3360 0.9842 0.3444
## ENSG00000125538 0.9996 0.9156 0.9842 6.6270
## basic_denmed basic_numvar basic_denvar basic_logfc basic_t
## ENSG00000205846 -0.61650 3.218e-01 6.981e-01 1.7630 2.866
## ENSG00000111052 -1.10200 4.981e-01 8.553e-01 0.7225 2.042
## ENSG00000184838 0.03563 2.780e-02 5.732e-01 1.2750 3.031
## ENSG00000186047 -1.25400 4.012e-02 3.564e-01 1.5980 3.524
## ENSG00000125538 4.94900 1.440e+00 1.499e-01 1.6780 1.227
## basic_p basic_adjp deseq_basemean deseq_lfcse deseq_stat
## ENSG00000205846 5.311e-02 9.994e-01 17.520 0.5644 2.754
## ENSG00000111052 1.156e-01 9.994e-01 9.367 0.7201 1.724
## ENSG00000184838 8.370e-02 9.994e-01 22.120 0.4650 2.613
## ENSG00000186047 5.337e-02 9.994e-01 11.360 0.6167 1.839
## ENSG00000125538 3.261e-01 9.994e-01 750.200 0.6455 1.738
## deseq_p ebseq_fc ebseq_logfc ebseq_postfc ebseq_mean
## ENSG00000205846 0.005894 2.749 1.4590 2.638 16.996
## ENSG00000111052 0.084630 2.240 1.1634 2.121 9.468
## ENSG00000184838 0.008967 2.193 1.1329 2.141 21.699
## ENSG00000186047 0.065850 1.919 0.9400 1.850 11.249
## ENSG00000125538 0.082280 1.942 0.9572 1.940 725.275
## ebseq_ppee ebseq_ppde ebseq_adjp edger_logcpm edger_lr
## ENSG00000205846 0.4349 5.651e-01 0.4349 0.71380 12.460
## ENSG00000111052 0.9723 2.771e-02 0.9723 -0.26660 4.806
## ENSG00000184838 1.0000 7.535e-18 1.0000 0.96760 11.230
## ENSG00000186047 1.0000 1.933e-19 1.0000 0.08541 6.563
## ENSG00000125538 0.9905 9.522e-03 0.9905 5.84800 8.959
## edger_p limma_ave limma_t limma_b limma_p
## ENSG00000205846 0.0004150 0.06708 3.668 -4.412 0.004893
## ENSG00000111052 0.0283500 -0.76930 2.413 -4.518 0.038260
## ENSG00000184838 0.0008061 0.52320 3.822 -4.359 0.003837
## ENSG00000186047 0.0104100 -0.42420 3.653 -4.441 0.005006
## ENSG00000125538 0.0027600 5.47900 1.804 -4.258 0.103700
## limma_adjp_fdr deseq_adjp_fdr edger_adjp_fdr
## ENSG00000205846 9.842e-01 9.997e-01 9.995e-01
## ENSG00000111052 9.842e-01 9.997e-01 9.995e-01
## ENSG00000184838 9.842e-01 9.997e-01 9.995e-01
## ENSG00000186047 9.842e-01 9.997e-01 9.995e-01
## ENSG00000125538 9.842e-01 9.997e-01 9.995e-01
## basic_adjp_fdr lfc_meta lfc_var lfc_varbymed p_meta
## ENSG00000205846 9.993e-01 1.595 0.000e+00 0.000e+00 3.734e-03
## ENSG00000111052 9.993e-01 1.237 1.337e-03 1.081e-03 5.041e-02
## ENSG00000184838 9.993e-01 1.245 8.533e-05 6.852e-05 4.537e-03
## ENSG00000186047 9.993e-01 1.218 1.058e-03 8.682e-04 2.709e-02
## ENSG00000125538 9.993e-01 1.061 3.106e-02 2.928e-02 6.291e-02
## p_var
## ENSG00000205846 8.512e-06
## ENSG00000111052 9.026e-04
## ENSG00000184838 1.702e-05
## ENSG00000186047 1.134e-03
## ENSG00000125538 2.829e-03
## There were 18, now there are 6 samples.
## Assuming no batch in model for testing pca.
## Finished running DE analyses, collecting outputs.
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Writing a legend of columns.
## Working on table 1/1: sh_vs_chr
## Length Class Mode
## sh_vs_chr 46 data.frame list
## Writing a legend of columns.
## The count is: 1 and the test is: deseq.
## Writing excel data according to deseq for sh_vs_chr: 1/1.
## After (adj)p filter, the up genes table has 91 genes.
## After (adj)p filter, the down genes table has 129 genes.
## After fold change filter, the up genes table has 2 genes.
## After fold change filter, the down genes table has 3 genes.
## Printing significant genes to the file: excel/significant_genes.xlsx
## 1/1: Creating significant table up_1deseq_sh_vs_chr
## Adding significance bar plots.
## ensembltranscriptid ensemblgeneid hgncsymbol
## ENSG00000119457 ENST00000374228 ENSG00000119457 SLC46A2
## ENSG00000162493 ENST00000294489 ENSG00000162493 PDPN
## description
## ENSG00000119457 solute carrier family 46 member 2 [Source:HGNC Symbol;Acc:HGNC:16055]
## ENSG00000162493 podoplanin [Source:HGNC Symbol;Acc:HGNC:29602]
## genebiotype deseq_logfc deseq_adjp edger_logfc
## ENSG00000119457 protein_coding 1.124 0.9999 1.110
## ENSG00000162493 protein_coding 1.054 0.9999 1.047
## edger_adjp limma_logfc limma_adjp basic_nummed
## ENSG00000119457 1 1.0310 0.9984 0.7973
## ENSG00000162493 1 0.9181 0.9984 1.5110
## basic_denmed basic_numvar basic_denvar basic_logfc basic_t
## ENSG00000119457 -0.09023 2.498e-01 5.520e-02 0.8875 3.286
## ENSG00000162493 0.79730 9.253e-01 5.631e-01 0.7134 1.414
## basic_p basic_adjp deseq_basemean deseq_lfcse deseq_stat
## ENSG00000119457 4.996e-02 1e+00 14.09 0.5510 2.039
## ENSG00000162493 2.343e-01 1e+00 22.92 0.5347 1.971
## deseq_p ebseq_fc ebseq_logfc ebseq_postfc ebseq_mean
## ENSG00000119457 0.04144 2.246 1.167 2.187 14.19
## ENSG00000162493 0.04873 2.177 1.122 2.143 23.12
## ebseq_ppee ebseq_ppde ebseq_adjp edger_logcpm edger_lr
## ENSG00000119457 1 2.896e-05 1 0.5923 6.374
## ENSG00000162493 1 4.423e-06 1 1.2200 4.785
## edger_p limma_ave limma_t limma_b limma_p limma_adjp_fdr
## ENSG00000119457 0.01158 0.2681 2.918 -4.453 0.01789 9.984e-01
## ENSG00000162493 0.02871 0.8417 1.655 -4.532 0.13370 9.984e-01
## deseq_adjp_fdr edger_adjp_fdr basic_adjp_fdr lfc_meta
## ENSG00000119457 1.000e+00 1.000e+00 1e+00 1.088
## ENSG00000162493 1.000e+00 1.000e+00 1e+00 1.003
## lfc_var lfc_varbymed p_meta p_var
## ENSG00000119457 0.000e+00 0.000e+00 2.364e-02 2.477e-04
## ENSG00000162493 3.053e-03 3.043e-03 7.038e-02 3.107e-03
## There were 18, now there are 6 samples.
## Assuming no batch in model for testing pca.
## Finished running DE analyses, collecting outputs.
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Comparing analyses 1/1: sh_vs_chr
## Writing a legend of columns.
## Working on table 1/1: sh_vs_chr
## Length Class Mode
## sh_vs_chr 46 data.frame list
## Writing a legend of columns.
## The count is: 1 and the test is: deseq.
## Writing excel data according to deseq for sh_vs_chr: 1/1.
## After (adj)p filter, the up genes table has 1017 genes.
## After (adj)p filter, the down genes table has 1472 genes.
## After fold change filter, the up genes table has 6 genes.
## After fold change filter, the down genes table has 35 genes.
## Printing significant genes to the file: excel/significant_genes.xlsx
## 1/1: Creating significant table up_1deseq_sh_vs_chr
## Adding significance bar plots.
## ensembltranscriptid ensemblgeneid hgncsymbol
## ENSG00000143333 ENST00000367558 ENSG00000143333 RGS16
## ENSG00000120436 ENST00000366834 ENSG00000120436 GPR31
## ENSG00000099985 ENST00000215781 ENSG00000099985 OSM
## ENSG00000137834 ENST00000288840 ENSG00000137834 SMAD6
## ENSG00000177807 ENST00000368089 ENSG00000177807 KCNJ10
## ENSG00000114115 ENST00000232219 ENSG00000114115 RBP1
## description
## ENSG00000143333 regulator of G-protein signaling 16 [Source:HGNC Symbol;Acc:HGNC:9997]
## ENSG00000120436 G protein-coupled receptor 31 [Source:HGNC Symbol;Acc:HGNC:4486]
## ENSG00000099985 oncostatin M [Source:HGNC Symbol;Acc:HGNC:8506]
## ENSG00000137834 SMAD family member 6 [Source:HGNC Symbol;Acc:HGNC:6772]
## ENSG00000177807 potassium voltage-gated channel subfamily J member 10 [Source:HGNC Symbol;Acc:HGNC:6256]
## ENSG00000114115 retinol binding protein 1 [Source:HGNC Symbol;Acc:HGNC:9919]
## genebiotype deseq_logfc deseq_adjp edger_logfc
## ENSG00000143333 protein_coding 1.510 6.358e-05 1.4950
## ENSG00000120436 protein_coding 1.478 1.000e+00 1.4550
## ENSG00000099985 protein_coding 1.226 5.618e-06 1.2100
## ENSG00000137834 protein_coding 1.155 1.000e+00 1.1340
## ENSG00000177807 protein_coding 1.035 1.593e-01 1.0190
## ENSG00000114115 protein_coding 1.012 1.000e+00 0.9872
## edger_adjp limma_logfc limma_adjp basic_nummed
## ENSG00000143333 4.147e-06 1.5450 0.2282 2.7890
## ENSG00000120436 5.293e-02 1.4270 0.2438 1.1780
## ENSG00000099985 1.314e-06 1.2660 0.2282 5.6910
## ENSG00000137834 8.498e-02 1.1040 0.2282 0.7412
## ENSG00000177807 1.213e-01 0.9465 0.3169 3.0750
## ENSG00000114115 1.662e-01 1.1950 0.2322 1.0880
## basic_denmed basic_numvar basic_denvar basic_logfc basic_t
## ENSG00000143333 1.47200 1.027e-01 1.040e-01 1.317 5.797
## ENSG00000120436 -0.78610 8.451e-01 1.678e-01 1.964 2.381
## ENSG00000099985 4.19200 6.852e-02 1.715e-01 1.499 4.497
## ENSG00000137834 -0.55160 1.598e-01 8.963e-02 1.293 3.828
## ENSG00000177807 1.91700 9.142e-01 1.241e-01 1.158 1.502
## ENSG00000114115 -0.04912 1.870e-02 8.025e-01 1.137 2.294
## basic_p basic_adjp deseq_basemean deseq_lfcse deseq_stat
## ENSG00000143333 4.404e-03 4.805e-01 68.76 0.2758 5.477
## ENSG00000120436 1.049e-01 4.810e-01 16.89 0.5436 2.719
## ENSG00000099985 1.587e-02 4.805e-01 484.20 0.2032 6.031
## ENSG00000137834 2.146e-02 4.805e-01 15.79 0.4878 2.368
## ENSG00000177807 2.461e-01 5.597e-01 73.35 0.3745 2.765
## ENSG00000114115 1.432e-01 4.929e-01 21.96 0.4624 2.188
## deseq_p ebseq_fc ebseq_logfc ebseq_postfc ebseq_mean
## ENSG00000143333 4.315e-08 2.874 1.523 2.851 69.31
## ENSG00000120436 6.544e-03 2.807 1.489 2.719 16.93
## ENSG00000099985 1.634e-09 2.396 1.261 2.394 488.89
## ENSG00000137834 1.787e-02 2.256 1.174 2.201 15.95
## ENSG00000177807 5.700e-03 2.060 1.043 2.050 73.55
## ENSG00000114115 2.866e-02 2.073 1.051 2.040 22.14
## ebseq_ppee ebseq_ppde ebseq_adjp edger_logcpm edger_lr
## ENSG00000143333 4.467e-10 1.000e+00 4.467e-10 2.2710 36.250
## ENSG00000120436 2.182e-01 7.818e-01 2.182e-01 0.3850 11.210
## ENSG00000099985 1.874e-06 1.000e+00 1.874e-06 5.0590 39.490
## ENSG00000137834 1.000e+00 1.816e-12 1.000e+00 0.2622 9.693
## ENSG00000177807 7.014e-01 2.986e-01 7.014e-01 2.3790 8.339
## ENSG00000114115 2.122e-01 7.878e-01 2.122e-01 0.7058 6.987
## edger_p limma_ave limma_t limma_b limma_p
## ENSG00000143333 1.736e-09 1.99000 6.492 -0.2393 0.0002045
## ENSG00000120436 8.155e-04 -0.09402 2.825 -3.3940 0.0227200
## ENSG00000099985 3.300e-10 4.85000 5.981 0.5318 0.0003530
## ENSG00000137834 1.850e-03 -0.02053 3.616 -2.8330 0.0070230
## ENSG00000177807 3.880e-03 2.09500 2.052 -3.9700 0.0748700
## ENSG00000114115 8.210e-03 0.38370 3.042 -3.1270 0.0163500
## limma_adjp_fdr deseq_adjp_fdr edger_adjp_fdr
## ENSG00000143333 2.282e-01 7.363e-05 4.147e-06
## ENSG00000120436 2.438e-01 1.888e-01 5.294e-02
## ENSG00000099985 2.282e-01 6.505e-06 1.314e-06
## ENSG00000137834 2.282e-01 2.751e-01 8.499e-02
## ENSG00000177807 3.169e-01 1.816e-01 1.213e-01
## ENSG00000114115 2.322e-01 3.192e-01 1.662e-01
## basic_adjp_fdr lfc_meta lfc_var lfc_varbymed p_meta
## ENSG00000143333 4.805e-01 1.507 2.720e-03 1.804e-03 6.818e-05
## ENSG00000120436 4.808e-01 1.426 2.011e-03 1.410e-03 1.003e-02
## ENSG00000099985 4.805e-01 1.273 1.195e-02 9.383e-03 1.177e-04
## ENSG00000137834 4.805e-01 1.113 2.700e-03 2.427e-03 8.914e-03
## ENSG00000177807 5.597e-01 1.008 5.935e-03 5.887e-03 2.815e-02
## ENSG00000114115 4.928e-01 1.079 1.284e-02 1.189e-02 1.774e-02
## p_var
## ENSG00000143333 1.394e-08
## ENSG00000120436 1.290e-04
## ENSG00000099985 4.154e-08
## ENSG00000137834 6.684e-05
## ENSG00000177807 1.638e-03
## ENSG00000114115 1.060e-04
Try building a donor*state interaction model.
First make sure that self-healing is the reference.
Then make some designs of potential interest.
data <- edgeR::DGEList(exprs(hs_inf_filt))
data <- edgeR::calcNormFactors(data)
design <- pData(hs_inf_filt)
design[["condition"]] <- relevel(design[["condition"]], ref="sh")
design[["donor"]] <- as.factor(design[["donor"]])
design[["donor"]] <- relevel(design[["donor"]], ref="d107")
chsh <- model.matrix(object=~0+condition, data=design)
head(chsh) ## Looks good to me.
## conditionsh conditionchr
## chr_5430_d108 0 1
## chr_5397_d108 0 1
## chr_2504_d108 0 1
## sh_2272_d108 1 0
## sh_1022_d108 1 0
## sh_2189_d108 1 0
## donord107 donord108 donord110
## chr_5430_d108 0 1 0
## chr_5397_d108 0 1 0
## chr_2504_d108 0 1 0
## sh_2272_d108 0 1 0
## sh_1022_d108 0 1 0
## sh_2189_d108 0 1 0
cond_donor_inter <- model.matrix(object=~condition+donor+condition:donor, data=design)
head(cond_donor_inter)
## (Intercept) conditionchr donord108 donord110
## chr_5430_d108 1 1 1 0
## chr_5397_d108 1 1 1 0
## chr_2504_d108 1 1 1 0
## sh_2272_d108 1 0 1 0
## sh_1022_d108 1 0 1 0
## sh_2189_d108 1 0 1 0
## conditionchr:donord108 conditionchr:donord110
## chr_5430_d108 1 0
## chr_5397_d108 1 0
## chr_2504_d108 1 0
## sh_2272_d108 0 0
## sh_1022_d108 0 0
## sh_2189_d108 0 0
## Why are there no conditionchr:donor107 conditionsh:donor107 columns?
## I know that if I relevel the donor factor to set the reference to another donor, that changes
## but this still does not make sense to me.
## I think the above model should be the same as:
cond_donor_interv2 <- model.matrix(object=~condition*donor, data=design)
head(cond_donor_interv2)
## (Intercept) conditionchr donord108 donord110
## chr_5430_d108 1 1 1 0
## chr_5397_d108 1 1 1 0
## chr_2504_d108 1 1 1 0
## sh_2272_d108 1 0 1 0
## sh_1022_d108 1 0 1 0
## sh_2189_d108 1 0 1 0
## conditionchr:donord108 conditionchr:donord110
## chr_5430_d108 1 0
## chr_5397_d108 1 0
## chr_2504_d108 1 0
## sh_2272_d108 0 0
## sh_1022_d108 0 0
## sh_2189_d108 0 0
testthat::expect_equal(cond_donor_inter, cond_donor_interv2)
## So as I understand it, if I do a test of coef='conditionchr', this is looking at
## chr vs. sh
## If I do coef='conditionchr:donor110' this is the donor effect for chr/sh for donor110?
## If this is true, then how do I get this for donor107?
## Perhaps my understanding is backwards?
donor_cond_inter <- model.matrix(object=~donor+condition+donor:condition, data=design)
donor_cond_interv2 <- model.matrix(object=~donor*condition, data=design)
testthat::expect_equal(donor_cond_inter, donor_cond_interv2)
head(donor_cond_inter)
## (Intercept) donord108 donord110 conditionchr
## chr_5430_d108 1 1 0 1
## chr_5397_d108 1 1 0 1
## chr_2504_d108 1 1 0 1
## sh_2272_d108 1 1 0 0
## sh_1022_d108 1 1 0 0
## sh_2189_d108 1 1 0 0
## donord108:conditionchr donord110:conditionchr
## chr_5430_d108 1 0
## chr_5397_d108 1 0
## chr_2504_d108 1 0
## sh_2272_d108 0 0
## sh_1022_d108 0 0
## sh_2189_d108 0 0
fitted <- limma::lmFit(object=voom, design=cond_donor_inter)
bayes <- limma::eBayes(fitted)
result <- topTable(bayes)
## Removing intercept from test coefficients
disp <- edgeR::estimateDisp(data, design=cond_donor_inter)
fit <- edgeR::glmQLFit(disp, cond_donor_inter)
## I think this is my global chr/sh
chr_sh_qlf <- edgeR::glmQLFTest(fit, coef="conditionchr")
chr_sh_result <- edgeR::topTags(chr_sh_qlf)
summary(chr_sh_result$table)
## logFC logCPM F PValue
## Min. :-0.281 Min. :1.40 Min. :12.5 Min. :0.000285
## 1st Qu.: 0.395 1st Qu.:2.05 1st Qu.:13.2 1st Qu.:0.001452
## Median : 0.638 Median :3.48 Median :13.8 Median :0.001757
## Mean : 0.581 Mean :3.56 Mean :14.7 Mean :0.001629
## 3rd Qu.: 0.899 3rd Qu.:4.78 3rd Qu.:14.5 3rd Qu.:0.002079
## Max. : 1.035 Max. :6.06 Max. :20.9 Max. :0.002615
## FDR
## Min. :0.924
## 1st Qu.:0.924
## Median :0.924
## Mean :0.924
## 3rd Qu.:0.924
## Max. :0.924
## [1] "conditionchr:donord108"
d110_ch_qlf <- edgeR::glmQLFTest(fit, coef="conditionchr:donord110")
d110_ch_result <- edgeR::topTags(d110_ch_qlf)
summary(d110_ch_result$table)
## logFC logCPM F PValue
## Min. :-1.305 Min. :0.762 Min. :10.6 Min. :0.000729
## 1st Qu.:-0.659 1st Qu.:2.330 1st Qu.:10.9 1st Qu.:0.001731
## Median :-0.484 Median :3.884 Median :12.9 Median :0.002407
## Mean :-0.393 Mean :3.428 Mean :13.0 Mean :0.002769
## 3rd Qu.:-0.395 3rd Qu.:4.252 3rd Qu.:13.9 3rd Qu.:0.004282
## Max. : 1.133 Max. :5.837 Max. :17.0 Max. :0.004813
## FDR
## Min. :1
## 1st Qu.:1
## Median :1
## Mean :1
## 3rd Qu.:1
## Max. :1
summarized <- DESeq2::DESeqDataSetFromMatrix(countData=exprs(hs_inf_filt), colData=design,
design=~condition*donor)
## converting counts to integer mode
dataset <- DESeq2::DESeqDataSet(se=summarized, design=~condition*donor)
run <- DESeq2::DESeq(dataset)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## [1] "Intercept" "condition_chr_vs_sh"
## [3] "donor_d108_vs_d107" "donor_d110_vs_d107"
## [5] "conditionchr.donord108" "conditionchr.donord110"
## Length Class Mode
## 6 DESeqResults S4
## log2 fold change (MLE): condition chr vs sh
## Wald test p-value: condition chr vs sh
## DataFrame with 6 rows and 6 columns
## baseMean log2FoldChange lfcSE
## <numeric> <numeric> <numeric>
## ENSG00000000419 214.886619915588 -0.0934303786250222 0.123003930776459
## ENSG00000000457 318.115512380986 -0.068815027486115 0.120178565849457
## ENSG00000000460 102.031345099905 0.197578912145072 0.203833151567596
## ENSG00000000938 5676.81912456484 0.0269256146826769 0.197204584725482
## ENSG00000000971 53.5624271330181 0.344010769796457 0.293375111918846
## ENSG00000001036 460.076692835547 0.0156360632261425 0.148896600722684
## stat pvalue padj
## <numeric> <numeric> <numeric>
## ENSG00000000419 -0.759572300130944 0.447510281800168 0.997804083570585
## ENSG00000000457 -0.572606496006257 0.566911160357569 0.997804083570585
## ENSG00000000460 0.969316868358142 0.332387115533936 0.997804083570585
## ENSG00000000938 0.136536453856581 0.891397208363027 0.997804083570585
## ENSG00000000971 1.17259697847723 0.240957461669005 0.997804083570585
## ENSG00000001036 0.105012895863648 0.916365575881342 0.997804083570585
## Maybe my thinking is just a little wrong: is this the interaction of chr/sh with d110/d107?
## That would make more sense I think.
res_donor110_chrsh <- DESeq2::results(run, name="conditionchr.donord110")
summary(res_donor110_chrsh)
## Length Class Mode
## 6 DESeqResults S4
## log2 fold change (MLE): conditionchr.donord110
## Wald test p-value: conditionchr.donord110
## DataFrame with 6 rows and 6 columns
## baseMean log2FoldChange lfcSE
## <numeric> <numeric> <numeric>
## ENSG00000000419 214.886619915588 0.295162897632011 0.172516639204654
## ENSG00000000457 318.115512380986 0.108194027119009 0.172637547612825
## ENSG00000000460 102.031345099905 0.376710409795487 0.293516835681214
## ENSG00000000938 5676.81912456484 0.0530822519196338 0.278697424287232
## ENSG00000000971 53.5624271330181 -0.388785003193934 0.436191950074647
## ENSG00000001036 460.076692835547 0.106576023570227 0.206872518783625
## stat pvalue padj
## <numeric> <numeric> <numeric>
## ENSG00000000419 1.71092422732548 0.0870951015388801 0.999936246663049
## ENSG00000000457 0.626712025368067 0.530848019781775 0.999936246663049
## ENSG00000000460 1.2834371456792 0.199338967059447 0.999936246663049
## ENSG00000000938 0.19046552746367 0.848944353796083 0.999936246663049
## ENSG00000000971 -0.891316318715647 0.372759496477823 0.999936246663049
## ENSG00000001036 0.515177289844371 0.606429137146667 0.999936246663049
res_donor108_chrsh <- DESeq2::results(run, name="conditionchr.donord108")
summary(res_donor110_chrsh)
## Length Class Mode
## 6 DESeqResults S4
## log2 fold change (MLE): conditionchr.donord110
## Wald test p-value: conditionchr.donord110
## DataFrame with 6 rows and 6 columns
## baseMean log2FoldChange lfcSE
## <numeric> <numeric> <numeric>
## ENSG00000000419 214.886619915588 0.295162897632011 0.172516639204654
## ENSG00000000457 318.115512380986 0.108194027119009 0.172637547612825
## ENSG00000000460 102.031345099905 0.376710409795487 0.293516835681214
## ENSG00000000938 5676.81912456484 0.0530822519196338 0.278697424287232
## ENSG00000000971 53.5624271330181 -0.388785003193934 0.436191950074647
## ENSG00000001036 460.076692835547 0.106576023570227 0.206872518783625
## stat pvalue padj
## <numeric> <numeric> <numeric>
## ENSG00000000419 1.71092422732548 0.0870951015388801 0.999936246663049
## ENSG00000000457 0.626712025368067 0.530848019781775 0.999936246663049
## ENSG00000000460 1.2834371456792 0.199338967059447 0.999936246663049
## ENSG00000000938 0.19046552746367 0.848944353796083 0.999936246663049
## ENSG00000000971 -0.891316318715647 0.372759496477823 0.999936246663049
## ENSG00000001036 0.515177289844371 0.606429137146667 0.999936246663049
## Length Class Mode
## 6 DESeqResults S4
## log2 fold change (MLE): donor d110 vs d107
## Wald test p-value: donor d110 vs d107
## DataFrame with 6 rows and 6 columns
## baseMean log2FoldChange lfcSE
## <numeric> <numeric> <numeric>
## ENSG00000000419 214.886619915588 -0.113766010123853 0.120483955620932
## ENSG00000000457 318.115512380986 -0.456556848180769 0.121122399221616
## ENSG00000000460 102.031345099905 -0.5010401182924 0.210579406027488
## ENSG00000000938 5676.81912456484 0.505694298463598 0.197026331645787
## ENSG00000000971 53.5624271330181 -0.84242480527373 0.30875937518954
## ENSG00000001036 460.076692835547 0.568390991546206 0.145482651751353
## stat pvalue
## <numeric> <numeric>
## ENSG00000000419 -0.944241990873748 0.345046001807526
## ENSG00000000457 -3.76938411982257 0.000163650866259048
## ENSG00000000460 -2.3793405430491 0.0173436449623682
## ENSG00000000938 2.56663307000372 0.0102691214578703
## ENSG00000000971 -2.72841854520721 0.00636388048892617
## ENSG00000001036 3.90693312710339 9.34750101766441e-05
## padj
## <numeric>
## ENSG00000000419 0.476062375176788
## ENSG00000000457 0.000739090391073861
## ENSG00000000460 0.0422654009174772
## ENSG00000000938 0.0271711897470485
## ENSG00000000971 0.0181060512075929
## ENSG00000001036 0.000448806683671478
In the following block, I will take the comparisons performed without any batch in the model/adjustment and use them to search for shared/unique genes among the self-healing vs. uninfected and the chronic vs. uninfected.
hs_pairwise_nobatch_pca <- sm(plot_pca(hs_inf_filt, convert="cpm", transform="log2"))
hs_pairwise_nobatch_pca$plot
excel_file <- glue::glue("excel/{rundate}_hs_infect_nobatch_contr-v{ver}.xlsx")
hs_combined_nobatch <- sm(combine_de_tables(
hs_pairwise_nobatch,
excel=excel_file,
keepers=keepers))
excel_file <- glue::glue("excel/{rundate}_hs_infect_nobatch_sig-v{ver}.xlsx")
hs_sig_nobatch <- sm(extract_significant_genes(
hs_combined_nobatch,
excel=excel_file))
hs_sig_nobatch$deseq$counts
## change_counts_up change_counts_down
## sh_nil 926 173
## ch_nil 927 167
## ch_sh 0 0
limma_deseq_order <- rank_order_scatter(
hs_pairwise_nobatch,
first_type="limma", second_type="deseq",
first_table=1, second_table=1)
limma_deseq_order$plot
up_lst <- list(
"sh_up" = rownames(hs_sig_nobatch[["deseq"]][["ups"]][["sh_nil"]]),
"ch_up" = rownames(hs_sig_nobatch[["deseq"]][["ups"]][["ch_nil"]]))
nobatch_up_venn <- Vennerable::Venn(Sets=up_lst)
Vennerable::plot(nobatch_up_venn, doWeights=FALSE)
## Maria-Adelaida and Najib asked about comparing the following pair of data against
## The intersection of a bunch of stuff later... So don't forget this!
## This gives me the genes only up in self vs. nil
nobatch_up_sh_solo <- nobatch_up_venn@IntersectionSets[["10"]]
## and ch vs nil
nobatch_up_ch_solo <- nobatch_up_venn@IntersectionSets[["01"]]
down_lst <- list(
"sh_down" = rownames(hs_sig_nobatch[["deseq"]][["downs"]][["sh_nil"]]),
"ch_down" = rownames(hs_sig_nobatch[["deseq"]][["downs"]][["ch_nil"]]))
nobatch_down_venn <- Vennerable::Venn(Sets=down_lst)
Vennerable::plot(nobatch_down_venn, doWeights=FALSE)
Repeat the previous set of analyses with d107/108/110 in the model.
hs_pairwise_batch_pca <- sm(plot_pca(hs_inf_filt, batch="limma", convert="cpm", transform="log2"))
hs_pairwise_batch_pca$plot
## Warning in MASS::cov.trob(data[, vars]): Probable convergence failure
## Warning in MASS::cov.trob(data[, vars]): Probable convergence failure
excel_file <- glue::glue("excel/{rundate}_hs_infect_patbatch_contr-v{ver}.xlsx")
hs_combined_batch <- sm(combine_de_tables(
hs_pairwise_batch,
excel=excel_file,
keepers=keepers))
excel_file <- glue::glue("excel/{rundate}_hs_infect_patbatch_sig-v{ver}.xlsx")
hs_sig_batch <- sm(extract_significant_genes(
hs_combined_batch,
excel=excel_file))
hs_sig_batch[["deseq"]][["counts"]]
## change_counts_up change_counts_down
## sh_nil 906 298
## ch_nil 932 279
## ch_sh 0 0
up_lst <- list(
"sh_up" = rownames(hs_sig_batch[["deseq"]][["ups"]][["sh_nil"]]),
"ch_up" = rownames(hs_sig_batch[["deseq"]][["ups"]][["ch_nil"]]))
batch_up_venn <- Vennerable::Venn(Sets=up_lst)
summary(batch_up_venn@IntersectionSets)
## Length Class Mode
## 00 0 -none- NULL
## 10 56 -none- character
## 01 82 -none- character
## 11 850 -none- character
down_lst <- list(
"sh_down" = rownames(hs_sig_batch[["deseq"]][["downs"]][["sh_nil"]]),
"ch_down" = rownames(hs_sig_batch[["deseq"]][["downs"]][["ch_nil"]]))
batch_down_venn <- Vennerable::Venn(Sets=down_lst)
Vennerable::plot(batch_down_venn, doWeights=FALSE)
## Length Class Mode
## 00 0 -none- NULL
## 10 65 -none- character
## 01 46 -none- character
## 11 233 -none- character
## Testing method: limma.
## Adding method: limma to the set.
## Testing method: deseq.
## Adding method: deseq to the set.
## Testing method: edger.
## Adding method: edger to the set.
## Testing method: ebseq.
## The first datum is missing method: ebseq.
## Testing method: basic.
## Adding method: basic to the set.
## Warning in cor(x = fs[["x"]], y = fs[["y"]], method = cor_method): the
## standard deviation is zero
## Warning in cor(x = fs[["x"]], y = fs[["y"]], method = cor_method): the
## standard deviation is zero
## $sh_nil
## $sh_nil$logfc
## [1] 0.9916
##
## $sh_nil$p
## [1] 0.9353
##
## $sh_nil$adjp
## [1] 0.9353
##
##
## $ch_nil
## $ch_nil$logfc
## [1] 0.9925
##
## $ch_nil$p
## [1] 0.9374
##
## $ch_nil$adjp
## [1] 0.9374
##
##
## $ch_sh
## $ch_sh$logfc
## [1] 0.9873
##
## $ch_sh$p
## [1] 0.9304
##
## $ch_sh$adjp
## [1] 0.06891
The following block writes out the unique/shared genes observed among the contrasts which included donor in the model.
kept_columns <- c("ensembltranscriptid", "ensemblgeneid", "description",
"deseq_logfc", "deseq_adjp")
start_data <- hs_sig_batch[["deseq"]]
sh_up_solo_genes <- batch_up_venn@IntersectionSets[["10"]]
ch_up_solo_genes <- batch_up_venn@IntersectionSets[["01"]]
shch_up_shared_genes <- batch_up_venn@IntersectionSets[["11"]]
sh_down_solo_genes <- batch_down_venn@IntersectionSets[["10"]]
ch_down_solo_genes <- batch_down_venn@IntersectionSets[["01"]]
shch_down_shared_genes <- batch_down_venn@IntersectionSets[["11"]]
xls_result <- write_xls(
data=start_data[["ups"]][["sh_nil"]][sh_up_solo_genes, kept_columns],
sheet="sh_up_solo")
xls_result <- write_xls(
data=start_data[["ups"]][["ch_nil"]][ch_up_solo_genes, kept_columns],
sheet="ch_up_solo", wb=xls_result[["workbook"]])
xls_result <- write_xls(
data=start_data[["ups"]][["ch_nil"]][shch_up_shared_genes, kept_columns],
sheet="shch_up_shared", wb=xls_result[["workbook"]])
xls_result <- write_xls(
data=start_data[["downs"]][["sh_nil"]][sh_down_solo_genes, kept_columns],
sheet="sh_down_solo")
xls_result <- write_xls(
data=start_data[["downs"]][["ch_nil"]][ch_down_solo_genes, kept_columns],
sheet="ch_down_solo", wb=xls_result[["workbook"]])
xls_result <- write_xls(
data=start_data[["downs"]][["ch_nil"]][shch_down_shared_genes, kept_columns],
sheet="shch_down_shared", wb=xls_result[["workbook"]],
excel=paste0("excel/figure_5a_stuff-v", ver, ".xlsx"))
## Saving to: excel/figure_5a_stuff-v20180822.xlsx
Repeat, this time attmepting to tamp down the variance by person.
hs_pairwise_ssva_pca <- sm(plot_pca(hs_inf_filt, batch="ssva", norm="quant", transform="log2"))
hs_pairwise_ssva_pca$plot
hs_pairwise_ssva <- sm(all_pairwise(hs_uninf_filt, model_batch="ssva",
parallel=FALSE, do_ebseq=FALSE))
excel_file <- glue::glue("excel/{rundate}_hs_infect_fsva_contr-v{ver}.xlsx")
hs_combined_ssva <- sm(combine_de_tables(
hs_pairwise_ssva,
excel=excel_file,
keepers=keepers))
excel_file <- glue::glue("excel/{rundate}_hs_infect_fsva_sig-v{ver}.xlsx")
hs_sig_ssva <- sm(extract_significant_genes(
hs_combined_ssva,
excel=excel_file))
hs_sig_ssva$deseq$counts
## change_counts_up change_counts_down
## sh_nil 805 507
## ch_nil 991 553
## ch_sh 0 0
up_lst <- list(
"sh_up" = rownames(hs_sig_ssva[["deseq"]][["ups"]][["sh_nil"]]),
"ch_up" = rownames(hs_sig_ssva[["deseq"]][["ups"]][["ch_nil"]]))
ssva_up_venn <- Vennerable::Venn(Sets=up_lst)
summary(ssva_up_venn@IntersectionSets)
## Length Class Mode
## 00 0 -none- NULL
## 10 38 -none- character
## 01 224 -none- character
## 11 767 -none- character
down_lst <- list(
"sh_down" = rownames(hs_sig_ssva[["deseq"]][["downs"]][["sh_nil"]]),
"ch_down" = rownames(hs_sig_ssva[["deseq"]][["downs"]][["ch_nil"]]))
ssva_down_venn <- Vennerable::Venn(Sets=down_lst)
Vennerable::plot(ssva_down_venn, doWeights=FALSE)
## Length Class Mode
## 00 0 -none- NULL
## 10 33 -none- character
## 01 79 -none- character
## 11 474 -none- character
similar <- sm(compare_de_results(hs_combined_nobatch, hs_combined_ssva,
cor_method="spearman"))
similar$result$deseq
## $sh_nil
## $sh_nil$logfc
## [1] 0.2856
##
## $sh_nil$p
## [1] 0.008603
##
## $sh_nil$adjp
## [1] 0.008606
##
##
## $ch_nil
## $ch_nil$logfc
## [1] 0.356
##
## $ch_nil$p
## [1] 0.03392
##
## $ch_nil$adjp
## [1] 0.03392
##
##
## $ch_sh
## $ch_sh$logfc
## [1] 0.9571
##
## $ch_sh$p
## [1] 0.8855
##
## $ch_sh$adjp
## [1] 0.06088
similar <- sm(compare_de_results(hs_combined_batch, hs_combined_ssva,
cor_method="spearman"))
similar$result$deseq
## $sh_nil
## $sh_nil$logfc
## [1] 0.2982
##
## $sh_nil$p
## [1] 0.1252
##
## $sh_nil$adjp
## [1] 0.1252
##
##
## $ch_nil
## $ch_nil$logfc
## [1] 0.3653
##
## $ch_nil$p
## [1] 0.1417
##
## $ch_nil$adjp
## [1] 0.1417
##
##
## $ch_sh
## $ch_sh$logfc
## [1] 0.9735
##
## $ch_sh$p
## [1] 0.9305
##
## $ch_sh$adjp
## [1] 0.9305
Repeat again using fsva.
hs_pairwise_fsva_pca <- sm(plot_pca(hs_inf_filt, batch="fsva", norm="quant", transform="log2"))
hs_pairwise_fsva_pca$plot
hs_pairwise_fsva <- sm(all_pairwise(hs_uninf_filt, model_batch="fsva",
parallel=FALSE, do_ebseq=FALSE))
excel_file <- glue::glue("excel/{rundate}_hs_infect_fsva_contr-v{ver}.xlsx")
hs_combined_fsva <- sm(combine_de_tables(
hs_pairwise_fsva,
excel=excel_file,
keepers=keepers))
excel_file <- glue::glue("excel/{rundate}_hs_infect_fsva_sig-v{ver}.xlsx")
hs_sig_fsva <- sm(extract_significant_genes(
hs_combined_fsva,
excel=excel_file))
up_lst <- list(
"sh_up" = rownames(hs_sig_fsva[["deseq"]][["ups"]][["sh_nil"]]),
"ch_up" = rownames(hs_sig_fsva[["deseq"]][["ups"]][["ch_nil"]]))
fsva_up_venn <- Vennerable::Venn(Sets=up_lst)
summary(fsva_up_venn@IntersectionSets)
## Length Class Mode
## 00 0 -none- NULL
## 10 64 -none- character
## 01 96 -none- character
## 11 864 -none- character
down_lst <- list(
"sh_down" = rownames(hs_sig_fsva[["deseq"]][["downs"]][["sh_nil"]]),
"ch_down" = rownames(hs_sig_fsva[["deseq"]][["downs"]][["ch_nil"]]))
fsva_down_venn <- Vennerable::Venn(Sets=down_lst)
Vennerable::plot(fsva_down_venn, doWeights=FALSE)
## Length Class Mode
## 00 0 -none- NULL
## 10 70 -none- character
## 01 45 -none- character
## 11 225 -none- character
##hs_sig_fsva$deseq$counts$common_solos_fsva <- sm(subset_significants(hs_sig_fsva))
similar <- sm(compare_de_results(hs_combined_nobatch, hs_combined_fsva,
cor_method="spearman"))
similar$result$deseq
## $sh_nil
## $sh_nil$logfc
## [1] 0.9937
##
## $sh_nil$p
## [1] 0.922
##
## $sh_nil$adjp
## [1] 0.922
##
##
## $ch_nil
## $ch_nil$logfc
## [1] 0.9937
##
## $ch_nil$p
## [1] 0.9206
##
## $ch_nil$adjp
## [1] 0.9206
##
##
## $ch_sh
## $ch_sh$logfc
## [1] 0.9743
##
## $ch_sh$p
## [1] 0.9012
##
## $ch_sh$adjp
## [1] 0.06275
similar <- sm(compare_de_results(hs_combined_ssva, hs_combined_fsva,
cor_method="spearman"))
similar$result$deseq
## $sh_nil
## $sh_nil$logfc
## [1] 0.2808
##
## $sh_nil$p
## [1] 0.1256
##
## $sh_nil$adjp
## [1] 0.1256
##
##
## $ch_nil
## $ch_nil$logfc
## [1] 0.3348
##
## $ch_nil$p
## [1] 0.1355
##
## $ch_nil$adjp
## [1] 0.1355
##
##
## $ch_sh
## $ch_sh$logfc
## [1] 0.9896
##
## $ch_sh$p
## [1] 0.9686
##
## $ch_sh$adjp
## [1] 0.9686
Repeat once again, this time using combat to try to limit the contribution of the strain to the data. I do not think we will ever use this set of contrasts, so I will deactivate it but leave it here if it is required later.
old_condition <- hs_uninf$design$condition
names(old_condition) <- hs_uninf$design$sampleid
new_condition <- paste0(hs_uninf$design$state, '_', hs_uninf$design$donor)
hs_uninf_recond <- set_expt_factors(hs_uninf_filt,
batch="pathogenstrain",
condition=new_condition)
combat_input <- normalize_expt(hs_uninf_recond, norm="quant", batch="combat_scale")
## This function will replace the expt$expressionset slot with:
## combat_scale(quant(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 in its current base format, keep in mind that
## some metrics are easier to see when the data is log2 transformed, but
## EdgeR/DESeq do not accept transformed data.
## 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).
## Step 1: not doing count filtering.
## Step 2: normalizing the data with quant.
## Step 3: not converting the data.
## Step 4: not transforming the data.
## Step 5: doing batch correction with combat_scale.
## Note to self: If you get an error like 'x contains missing values' The data has too many 0's and needs a stronger low-count filter applied.
## batch_counts: Before batch correction, 407 entries 0<=x<1.
## batch_counts: Before batch correction, 2 entries are >= 0.
## Passing off to all_adjusters.
## Found arglist convert! raw
## The detected scale of the data is: raw.
## Doing a raw conversion with a filter with 2 threshold.
## batch_counts: Before batch correction, 407 entries 0<=x<1.
## batch_counts: Before batch correction, 2 entries are >= 0.
## The be method chose 3 surrogate variable(s).
## The most likely error in sva::empirical.controls() is a call to density in irwsva.build. Setting control_likelihoods to zero and using unsupervised sva.
## Warning in all_adjusters(count_table, design = design, estimate_type =
## batch, : It is highly likely that the underlying reason for this error is
## too many 0's in the dataset, please try doing a filtering of the data and
## retry.
## batch_counts: Using combat with a prior and with scaling.
## The number of elements which are < 0 after batch correction is: 6181
## The variable low_to_zero sets whether to change <0 values to 0 and is: FALSE
combat_input <- set_expt_conditions(combat_input, fact=old_condition)
combat_input <- set_expt_colors(combat_input, colors=c("green","blue","red"))
## The new colors are a character, changing according to condition.
excel_file <- glue::glue("excel/{rundate}_hs_infect_combatpath_contr-v{ver}.xlsx")
hs_combined_combatpath <- sm(combine_de_tables(
hs_pairwise_combatpath,
excel=excel_file,
keepers=keepers))
excel_file <- glue::glue("excel/{rundate}_hs_infect_combatpath_sig-v{ver}.xlsx")
hs_sig_combatpath <- sm(extract_significant_genes(
hs_combined_combatpath,
excel=excel_file))
hs_sig_combatpath$deseq$counts
## change_counts_up change_counts_down
## sh_nil 1518 22
## ch_nil 2289 2056
## ch_sh 470 1091
up_lst <- list(
"sh_up" = rownames(hs_sig_combatpath[["deseq"]][["ups"]][["sh_nil"]]),
"ch_up" = rownames(hs_sig_combatpath[["deseq"]][["ups"]][["ch_nil"]]))
combatpath_up_venn <- Vennerable::Venn(Sets=up_lst)
summary(combatpath_up_venn@IntersectionSets)
## Length Class Mode
## 00 0 -none- NULL
## 10 0 -none- NULL
## 01 771 -none- character
## 11 1518 -none- character
down_lst <- list(
"sh_down" = rownames(hs_sig_combatpath[["deseq"]][["downs"]][["sh_nil"]]),
"ch_down" = rownames(hs_sig_combatpath[["deseq"]][["downs"]][["ch_nil"]]))
combatpath_down_venn <- Vennerable::Venn(Sets=down_lst)
Vennerable::plot(combatpath_down_venn, doWeights=FALSE)
## Length Class Mode
## 00 0 -none- NULL
## 10 0 -none- NULL
## 01 2034 -none- character
## 11 22 -none- character
similar <- sm(compare_de_results(hs_combined_nobatch, hs_combined_combatpath,
cor_method="spearman"))
similar$result$deseq
## $sh_nil
## $sh_nil$logfc
## [1] -0.07967
##
## $sh_nil$p
## [1] -0.04815
##
## $sh_nil$adjp
## [1] -0.04815
##
##
## $ch_nil
## $ch_nil$logfc
## [1] -0.1114
##
## $ch_nil$p
## [1] -0.02765
##
## $ch_nil$adjp
## [1] -0.02765
##
##
## $ch_sh
## $ch_sh$logfc
## [1] 0.01295
##
## $ch_sh$p
## [1] -0.1028
##
## $ch_sh$adjp
## [1] 0.002389
similar <- sm(compare_de_results(hs_combined_fsva, hs_combined_combatpath,
cor_method="spearman"))
similar$result$deseq
## $sh_nil
## $sh_nil$logfc
## [1] -0.08732
##
## $sh_nil$p
## [1] -0.004519
##
## $sh_nil$adjp
## [1] -0.004516
##
##
## $ch_nil
## $ch_nil$logfc
## [1] -0.1309
##
## $ch_nil$p
## [1] 0.04731
##
## $ch_nil$adjp
## [1] 0.04731
##
##
## $ch_sh
## $ch_sh$logfc
## [1] -0.04856
##
## $ch_sh$p
## [1] -0.02353
##
## $ch_sh$adjp
## [1] -0.0235
For each of the following, perform a simple DE and see what happens:
The data used in the following is the quantile(cpm(filter())) where the condition was set to a concatenation of patient and healing state, combat was also performed, so we no longer want batch in the experimental model and also we need to pass ‘force=TRUE’ because deseq/edger will need to be coerced into accepting these modified data.
## chr_5430_d108 chr_5397_d108 chr_2504_d108 sh_2272_d108 sh_1022_d108
## chr chr chr sh sh
## sh_2189_d108 chr_5430_d110 chr_5397_d110 chr_2504_d110 sh_2272_d110
## sh chr chr chr sh
## sh_1022_d110 sh_2189_d110 chr_5430_d107 chr_5397_d107 chr_2504_d107
## sh sh chr chr chr
## sh_2272_d107 sh_1022_d107 sh_2189_d107
## sh sh sh
## Levels: sh chr
## Start by leaving the data relatively alone, especially noting that we do not
## have a usable batch by default.
hs_uninf_filtv2 <- hs_uninf_filt
donor_state <- paste0(hs_uninf_filtv2$design$state, "_", hs_uninf_filtv2$design$donor)
hs_uninf_filtv2 <- set_expt_factors(hs_uninf_filtv2, condition=donor_state)
uninf_patient_keepers <- list(
"d107_chun" = c("chronic_d107", "uninfected_d107"),
"d107_shun" = c("self_heal_d107", "uninfected_d107"),
"d107_chsh" = c("chronic_d107", "self_heal_d107"),
"d108_chun" = c("chronic_d108", "uninfected_d108"),
"d108_shun" = c("self_heal_d108", "uninfected_d108"),
"d108_chsh" = c("chronic_d108", "self_heal_d108"),
"d110_chun" = c("chronic_d110", "uninfected_d110"),
"d110_shun" = c("self_heal_d110", "uninfected_d110"),
"d110_chsh" = c("chronic_d110", "self_heal_d110"))
hs_uninf_filtv2_pairwise <- sm(all_pairwise(hs_uninf_filtv2, parallel=FALSE,
model_batch=FALSE, do_ebseq=FALSE))
hs_uninf_filtv2_combined <- sm(combine_de_tables(
hs_uninf_filtv2_pairwise,
keepers=uninf_patient_keepers,
excel=paste0("excel/hs_infect_patient_nobatch-v", ver, ".xlsx")))
hs_uninf_filtv2_sig <- sm(extract_significant_genes(
hs_uninf_filtv2_combined, according_to="deseq",
excel=paste0("excel/hs_infect_patient_nobatch_sig-v", ver, ".xlsx")))
##hs_uninf_filtv3_pairwise <- all_pairwise(hs_uninf_filtv2, model_batch="svaseq", surrogates=1)
##hs_uninf_filtv3_combined <- sm(combine_de_tables(hs_uninf_filtv3_pairwise,
## keepers=uninf_patient_keepers,
## excel=paste0("excel/hs_infect_patient_fsva-v", ver, ".xlsx")))
##hs_uninf_filtv3_sig <- sm(extract_significant_genes(hs_uninf_filtv3_combined,
## excel=paste0("excel/hs_infect_patient_fsva_sig-v", ver, ".xlsx")))
Now we want to look at intersections from the perspective of contrasts performed comparing the self-healing/chronic vs. uninfected for the three donors separately.
This time for each of the three donors: self-healing up vs. uninfected.
up_sig <- hs_uninf_filtv2_sig$deseq$ups
## Do this in a way which is not stupid...
comp_lst <- list(
"donor_107" = rownames(up_sig[["d107_shun"]]),
"donor_108" = rownames(up_sig[["d108_shun"]]),
"donor_110" = rownames(up_sig[["d110_shun"]]))
comp_shun_up <- Vennerable::Venn(Sets=comp_lst)
up_res <- Vennerable::plot(comp_shun_up, doWeights=FALSE)
shared_shun_up <- comp_shun_up@IntersectionSets[["111"]]
de_table_shared_up_sh_first <- hs_uninf_filtv2_combined[["data"]][["d107_shun"]][shared_shun_up, ]
de_table_shared_up_sh_second <- hs_uninf_filtv2_combined[["data"]][["d108_shun"]][shared_shun_up, ]
de_table_shared_up_sh_third <- hs_uninf_filtv2_combined[["data"]][["d110_shun"]][shared_shun_up, ]
de_table_shared_up_sh_all <- merge(
de_table_shared_up_sh_first[, c("description", "deseq_logfc", "deseq_adjp")],
de_table_shared_up_sh_second[, c("deseq_logfc", "deseq_adjp")],
by="row.names")
de_table_shared_up_sh_all <- merge(
de_table_shared_up_sh_all,
de_table_shared_up_sh_third[, c("deseq_logfc", "deseq_adjp")],
by.x="Row.names", by.y="row.names")
rownames(de_table_shared_up_sh_all) <- de_table_shared_up_sh_all[["Row.names"]]
de_table_shared_up_sh_all <- de_table_shared_up_sh_all[, -1]
colnames(de_table_shared_up_sh_all) <- c("description", "logfc_107", "adjp_107",
"logfc_108", "adjp_108", "logfc_110", "adjp_110")
write.csv(de_table_shared_up_sh_all, file="images/de_table_shared_up_sh_all.csv")
This time for each of the three donors: chronic up vs. uninfected.
up_sig <- hs_uninf_filtv2_sig$deseq$ups
comp_lst <- list(
"donor_107" = rownames(up_sig[["d107_chun"]]),
"donor_108" = rownames(up_sig[["d108_chun"]]),
"donor_110" = rownames(up_sig[["d110_chun"]]))
comp_chun_up <- Vennerable::Venn(Sets=comp_lst)
up_res <- Vennerable::plot(comp_chun_up, doWeights=FALSE)
shared_chun_up <- comp_chun_up@IntersectionSets[["111"]]
de_table_shared_up_ch_first <- hs_uninf_filtv2_combined[["data"]][["d107_chun"]][shared_chun_up, ]
de_table_shared_up_ch_second <- hs_uninf_filtv2_combined[["data"]][["d108_chun"]][shared_chun_up, ]
de_table_shared_up_ch_third <- hs_uninf_filtv2_combined[["data"]][["d110_chun"]][shared_chun_up, ]
de_table_shared_up_ch_all <- merge(
de_table_shared_up_ch_first[, c("description", "deseq_logfc", "deseq_adjp")],
de_table_shared_up_ch_second[, c("deseq_logfc", "deseq_adjp")],
by="row.names")
de_table_shared_up_ch_all <- merge(
de_table_shared_up_ch_all,
de_table_shared_up_ch_third[, c("deseq_logfc", "deseq_adjp")],
by.x="Row.names", by.y="row.names")
rownames(de_table_shared_up_ch_all) <- de_table_shared_up_ch_all[["Row.names"]]
de_table_shared_up_ch_all <- de_table_shared_up_ch_all[, -1]
colnames(de_table_shared_up_ch_all) <- c("description", "logfc_107", "adjp_107",
"logfc_108", "adjp_108", "logfc_110", "adjp_110")
write.csv(de_table_shared_up_ch_all, file="images/de_table_shared_up_ch_all.csv")
This time for each of the three donors: self-healing down vs. uninfected.
down_sig <- hs_uninf_filtv2_sig$deseq$downs
comp_lst <- list(
"donor_107" = rownames(down_sig[["d107_shun"]]),
"donor_108" = rownames(down_sig[["d108_shun"]]),
"donor_110" = rownames(down_sig[["d110_shun"]]))
comp_shun_down <- Vennerable::Venn(Sets=comp_lst)
down_res <- Vennerable::plot(comp_shun_down, doWeights=FALSE)
shared_shun_down <- comp_shun_down@IntersectionSets[["111"]]
de_table_shared_down_sh_first <- hs_uninf_filtv2_combined[["data"]][["d107_shun"]][shared_shun_down, ]
de_table_shared_down_sh_second <- hs_uninf_filtv2_combined[["data"]][["d108_shun"]][shared_shun_down, ]
de_table_shared_down_sh_third <- hs_uninf_filtv2_combined[["data"]][["d110_shun"]][shared_shun_down, ]
de_table_shared_down_sh_all <- merge(
de_table_shared_down_sh_first[, c("description", "deseq_logfc", "deseq_adjp")],
de_table_shared_down_sh_second[, c("deseq_logfc", "deseq_adjp")],
by="row.names")
de_table_shared_down_sh_all <- merge(
de_table_shared_down_sh_all,
de_table_shared_down_sh_third[, c("deseq_logfc", "deseq_adjp")],
by.x="Row.names", by.y="row.names")
rownames(de_table_shared_down_sh_all) <- de_table_shared_down_sh_all[["Row.names"]]
de_table_shared_down_sh_all <- de_table_shared_down_sh_all[, -1]
colnames(de_table_shared_down_sh_all) <- c("description", "logfc_107",
"adjp_107", "logfc_108", "adjp_108",
"logfc_110", "adjp_110")
write.csv(de_table_shared_down_sh_all, file="images/de_table_shared_down_sh_all.csv")
This time for each of the three donors: chronic down vs. uninfected.
down_sig <- hs_uninf_filtv2_sig$deseq$downs
comp_lst <- list(
"donor_107" = rownames(down_sig[["d107_chun"]]),
"donor_108" = rownames(down_sig[["d108_chun"]]),
"donor_110" = rownames(down_sig[["d110_chun"]]))
comp_chun_down <- Vennerable::Venn(Sets=comp_lst)
down_res <- Vennerable::plot(comp_chun_down, doWeights=FALSE)
shared_chun_down <- comp_chun_down@IntersectionSets[["111"]]
de_table_shared_down_ch_first <- hs_uninf_filtv2_combined[["data"]][["d107_chun"]][shared_chun_down, ]
de_table_shared_down_ch_second <- hs_uninf_filtv2_combined[["data"]][["d108_chun"]][shared_chun_down, ]
de_table_shared_down_ch_third <- hs_uninf_filtv2_combined[["data"]][["d110_chun"]][shared_chun_down, ]
de_table_shared_down_ch_all <- merge(
de_table_shared_down_ch_first[, c("description", "deseq_logfc", "deseq_adjp")],
de_table_shared_down_ch_second[, c("deseq_logfc", "deseq_adjp")],
by="row.names")
de_table_shared_down_ch_all <- merge(
de_table_shared_down_ch_all,
de_table_shared_down_ch_third[, c("deseq_logfc", "deseq_adjp")],
by.x="Row.names", by.y="row.names")
rownames(de_table_shared_down_ch_all) <- de_table_shared_down_ch_all[["Row.names"]]
de_table_shared_down_ch_all <- de_table_shared_down_ch_all[, -1]
colnames(de_table_shared_down_ch_all) <- c("description", "logfc_107",
"adjp_107", "logfc_108", "adjp_108",
"logfc_110", "adjp_110")
write.csv(de_table_shared_down_ch_all, file="images/de_table_shared_down_ch_all.csv")
At this point, we should have a set of genes which are up/down in the self/uninfected and chronic/uninfected, kept in variables with names like: ‘shared_shun_down’ and ‘shared_chun_down’
Now we want a sense of what genes are shared/unique among the self-healing vs. uninfected and the chronic vs. uninfected comparisons performed above. One would assume that the most interesting genes in these sets will prove to be the the ones which are not shared.
shch_up_lst <- list(
"up_sh" = shared_shun_up,
"up_ch" = shared_chun_up)
shared_up <- Vennerable::Venn(Sets=shch_up_lst)
Vennerable::plot(shared_up, doWeights=FALSE)
shch_down_lst <- list(
"up_sh" = shared_shun_down,
"up_ch" = shared_chun_down)
shared_down <- Vennerable::Venn(Sets=shch_down_lst)
Vennerable::plot(shared_down, doWeights=FALSE)
upup_genes <- shared_up@IntersectionSets[["11"]]
upsh_notch <- shared_up@IntersectionSets[["10"]]
upch_notsh <- shared_up@IntersectionSets[["01"]]
downdown_genes <- shared_down@IntersectionSets[["11"]]
downsh_notch <- shared_down@IntersectionSets[["10"]]
downch_notsh <- shared_down@IntersectionSets[["01"]]
kept_columns <- c("ensembltranscriptid", "ensemblgeneid", "description",
"deseq_logfc", "deseq_adjp")
## Get the shared things in up_sh and up_ch, ergo can use either sheet
xls_result <- write_xls(data=up_sig[["d107_shun"]][upup_genes, kept_columns],
sheet="upsh_upch")
## Get the only-up_sh
xls_result <- write_xls(data=up_sig[["d107_shun"]][upsh_notch, kept_columns],
sheet="upsh_noch",
wb=xls_result[["workbook"]])
## Get the only-up_ch
xls_result <- write_xls(data=up_sig[["d107_chun"]][upch_notsh, kept_columns],
sheet="upch_nosh",
wb=xls_result[["workbook"]])
## Now repeat for the down: down-shared
## Get shared down down_sh down_ch
xls_result <- write_xls(data=down_sig[["d107_shun"]][downdown_genes, kept_columns],
sheet="downsh_downch",
wb=xls_result[["workbook"]])
## The down_sh only
xls_result <- write_xls(data=down_sig[["d107_shun"]][downsh_notch, kept_columns],
sheet="downsh_noch",
wb=xls_result[["workbook"]])
## The down_ch
xls_result <- write_xls(data=down_sig[["d107_chun"]][downch_notsh, kept_columns],
sheet="downch_nosh",
wb=xls_result[["workbook"]],
excel=paste0("excel/figure_5c_stuff-v", ver, ".xlsx"))
## Saving to: excel/figure_5c_stuff-v20180822.xlsx
Do I think the exact same thing as in the previous comparison, but now simplify the ‘condition’ factor to just self-healing vs. chronic and see what happens.
uninf_strainbatch_qcf <- set_expt_batches(expt=hs_cds_uninf, fact="pathogenstrain")
uninf_strainbatch_qcf <- set_expt_conditions(expt=uninf_strainbatch_qcf, fact="state")
withuninf_strainbatch_pairs_chsh <- all_pairwise(
parallel=FALSE, uninf_strainbatch_qcf,
model_batch=FALSE, force=TRUE, do_ebseq=FALSE)
chsh_keepers <- list(
"ch_sh" = c("chronic", "self_heal"),
"ch_nil" = c("chronic", "uninfected"),
"sh_nil" = c("self_heal", "uninfected"))
withuninf_strainbatch_tables_chsh <- sm(combine_de_tables(
withuninf_strainbatch_pairs_chsh,
keepers=chsh_keepers,
excel=paste0("excel/withuninf_strainbatch_chsh_pairwise-v", ver, ".xlsx")))
withuninf_strainbatch_sig_chsh <- extract_significant_genes(
withuninf_strainbatch_tables_chsh,
excel=paste0("excel/withuninf_strainbatch_chsh_sig-v", ver, ".xlsx"))
##withuninf_strainbatch_tables_chsh$limma_plots
##withuninf_strainbatch_tables_chsh$edger_plots
##withuninf_strainbatch_tables_chsh$deseq_plots
Generate DE lists of each donor for all contrasts for PBMCs.
I renamed these plots and am now hopelessly confused as to which is which. I think I will not run this for now but instead generate the worksheet without them and then return to this in the hopes that I can do a better job.
pp(file="images/fig_05a-sh_uninf_vs_chr_uninf_up.pdf")
Vennerable::plot(common_solos_batch$up_venn, doWeights=FALSE)
dev.off()
pp(file="images/fig_05b-sh_uninf_vs_chr_uninf_down.pdf")
Vennerable::plot(common_solos_batch$down_venn, doWeights=FALSE)
dev.off()
pp(file="images/fig_05c-sh_uninf_donors_up.pdf")
Vennerable::plot(sh_up_venn, doWeights=FALSE)
dev.off()
pp(file="images/fig_05d-sh_uninf_donors_down.pdf")
Vennerable::plot(sh_down_venn, doWeights=FALSE)
dev.off()
pp(file="images/fig_05e-chr_uninf_donors_up.pdf")
Vennerable::plot(chr_up_venn, doWeights=FALSE)
dev.off()
pp(file="images/fig_05f-chr_uninf_donors_down.pdf")
Vennerable::plot(chr_down_venn, doWeights=FALSE)
dev.off()
pp(file="images/fig_05g-up_common.pdf")
Vennerable::plot(shared_up, doWeights=FALSE)
dev.off()
pp(file="images/fig_05h-down_common.pdf")
Vennerable::plot(shared_down, doWeights=FALSE)
dev.off()
lp_pairwise_nobatch <- sm(all_pairwise(lp_inf_filt, model_batch=FALSE,
parallel=FALSE, do_ebseq=FALSE))
excel_file <- glue::glue("excel/{rundate}_lp_infect_nobatch_contr-v{ver}.xlsx")
lp_combined_nobatch <- sm(combine_de_tables(lp_pairwise_nobatch, excel=excel_file))
excel_file <- glue::glue("excel/{rundate}_lp_infect_nobatch_sig-v{ver}.xlsx")
lp_sig_nobatch <- sm(extract_significant_genes(lp_combined_nobatch, excel=excel_file))
lp_pairwise_batch <- sm(all_pairwise(lp_inf_filt, model_batch=TRUE))
excel_file <- glue::glue("excel/{rundate}_lp_infect_batch_contr-v{ver}.xlsx")
lp_combined_batch <- sm(combine_de_tables(lp_pairwise_batch, excel=excel_file))
excel_file <- glue::glue("excel/{rundate}_lp_infect_batch_sig-v{ver}.xlsx")
lp_sig_batch <- sm(extract_significant_genes(lp_combined_batch, excel=excel_file))
lp_pairwise_ssva <- sm(all_pairwise(lp_inf_filt, model_batch="ssva"))
excel_file <- glue::glue("excel/{rundate}_lp_infect_ssva_contr-v{ver}.xlsx")
lp_combined_ssva <- sm(combine_de_tables(lp_pairwise_ssva, excel=excel_file))
excel_file <- glue::glue("excel/{rundate}_lp_infect_ssva_sig-v{ver}.xlsx")
lp_sig_ssva <- sm(extract_significant_genes(lp_combined_ssva, excel=excel_file))
lp_pairwise_fsva <- sm(all_pairwise(lp_inf_filt, model_batch="fsva"))
excel_file <- glue::glue("excel/{rundate}_lp_infect_fsva_contr-v{ver}.xlsx")
lp_combined_fsva <- sm(combine_de_tables(lp_pairwise_fsva, excel=excel_file))
excel_file <- glue::glue("excel/{rundate}_lp_infect_fsva_sig-v{ver}.xlsx")
lp_sig_fsva <- sm(extract_significant_genes(lp_combined_fsva, excel=excel_file))
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: parallel, stats, graphics, grDevices, utils, datasets, methods and base
other attached packages: edgeR(v.3.24.0), ruv(v.0.9.7), bindrcpp(v.0.2.2), variancePartition(v.1.12.0), scales(v.1.0.0), foreach(v.1.4.4), limma(v.3.38.3), ggplot2(v.3.1.0), hpgltools(v.2018.11), Biobase(v.2.42.0) and BiocGenerics(v.0.28.0)
loaded via a namespace (and not attached): tidyselect(v.0.2.5), lme4(v.1.1-19), RSQLite(v.2.1.1), AnnotationDbi(v.1.44.0), htmlwidgets(v.1.3), grid(v.3.5.1), BiocParallel(v.1.16.2), devtools(v.2.0.1), munsell(v.0.5.0), codetools(v.0.2-15), preprocessCore(v.1.44.0), units(v.0.6-1), withr(v.2.1.2), colorspace(v.1.3-2), GOSemSim(v.2.8.0), OrganismDbi(v.1.24.0), knitr(v.1.20), rstudioapi(v.0.8), stats4(v.3.5.1), Vennerable(v.3.1.0.9000), robustbase(v.0.93-3), DOSE(v.3.8.0), labeling(v.0.3), urltools(v.1.7.1), GenomeInfoDbData(v.1.2.0), bit64(v.0.9-7), farver(v.1.1.0), rprojroot(v.1.3-2), R6(v.2.3.0), doParallel(v.1.0.14), GenomeInfoDb(v.1.18.1), locfit(v.1.5-9.1), bitops(v.1.0-6), fgsea(v.1.8.0), gridGraphics(v.0.3-0), DelayedArray(v.0.8.0), assertthat(v.0.2.0), ggraph(v.1.0.2), nnet(v.7.3-12), enrichplot(v.1.2.0), gtable(v.0.2.0), sva(v.3.30.0), processx(v.3.2.0), rlang(v.0.3.0.1), genefilter(v.1.64.0), splines(v.3.5.1), rtracklayer(v.1.42.1), lazyeval(v.0.2.1), acepack(v.1.4.1), checkmate(v.1.8.5), europepmc(v.0.3), BiocManager(v.1.30.4), yaml(v.2.2.0), reshape2(v.1.4.3), GenomicFeatures(v.1.34.1), backports(v.1.1.2), qvalue(v.2.14.0), Hmisc(v.4.1-1), clusterProfiler(v.3.10.0), RBGL(v.1.58.1), tools(v.3.5.1), usethis(v.1.4.0), ggplotify(v.0.0.3), gplots(v.3.0.1), RColorBrewer(v.1.1-2), sessioninfo(v.1.1.1), ggridges(v.0.5.1), Rcpp(v.1.0.0), plyr(v.1.8.4), base64enc(v.0.1-3), progress(v.1.2.0), zlibbioc(v.1.28.0), purrr(v.0.2.5), RCurl(v.1.95-4.11), ps(v.1.2.1), prettyunits(v.1.0.2), rpart(v.4.1-13), viridis(v.0.5.1), cowplot(v.0.9.3), S4Vectors(v.0.20.1), SummarizedExperiment(v.1.12.0), ggrepel(v.0.8.0), cluster(v.2.0.7-1), colorRamps(v.2.3), fs(v.1.2.6), magrittr(v.1.5), data.table(v.1.11.8), openxlsx(v.4.1.0), DO.db(v.2.9), triebeard(v.0.3.0), packrat(v.0.5.0), matrixStats(v.0.54.0), pkgload(v.1.0.2), hms(v.0.4.2), evaluate(v.0.12), xtable(v.1.8-3), pbkrtest(v.0.4-7), XML(v.3.98-1.16), IRanges(v.2.16.0), gridExtra(v.2.3), testthat(v.2.0.1), compiler(v.3.5.1), biomaRt(v.2.38.0), tibble(v.1.4.2), KernSmooth(v.2.23-15), crayon(v.1.3.4), minqa(v.1.2.4), htmltools(v.0.3.6), mgcv(v.1.8-26), corpcor(v.1.6.9), snow(v.0.4-3), Formula(v.1.2-3), geneplotter(v.1.60.0), tidyr(v.0.8.2), DBI(v.1.0.0), tweenr(v.1.0.0), MASS(v.7.3-51.1), Matrix(v.1.2-15), cli(v.1.0.1), quadprog(v.1.5-5), gdata(v.2.18.0), bindr(v.0.1.1), igraph(v.1.2.2), GenomicRanges(v.1.34.0), pkgconfig(v.2.0.2), rvcheck(v.0.1.1), GenomicAlignments(v.1.18.0), foreign(v.0.8-71), plotly(v.4.8.0), xml2(v.1.2.0), annotate(v.1.60.0), XVector(v.0.22.0), stringr(v.1.3.1), callr(v.3.0.0), digest(v.0.6.18), graph(v.1.60.0), Biostrings(v.2.50.1), rmarkdown(v.1.10), fastmatch(v.1.1-0), htmlTable(v.1.12), directlabels(v.2018.05.22), Rsamtools(v.1.34.0), gtools(v.3.8.1), nloptr(v.1.2.1), nlme(v.3.1-137), jsonlite(v.1.5), desc(v.1.2.0), viridisLite(v.0.3.0), pillar(v.1.3.0), lattice(v.0.20-38), DEoptimR(v.1.0-8), httr(v.1.3.1), pkgbuild(v.1.0.2), survival(v.2.43-3), GO.db(v.3.7.0), glue(v.1.3.0), remotes(v.2.0.2), zip(v.1.0.0), UpSetR(v.1.3.3), iterators(v.1.0.10), pander(v.0.6.3), bit(v.1.1-14), ggforce(v.0.1.3), stringi(v.1.2.4), blob(v.1.1.1), DESeq2(v.1.22.1), doSNOW(v.1.0.16), latticeExtra(v.0.6-28), caTools(v.1.17.1.1), memoise(v.1.1.0) and dplyr(v.0.7.8)
## If you wish to reproduce this exact build of hpgltools, invoke the following:
## > git clone http://github.com/abelew/hpgltools.git
## > git reset 242609d9ad73083ea13099760f8f0678a4befbf8
## This is hpgltools commit: Wed Dec 5 15:02:17 2018 -0500: 242609d9ad73083ea13099760f8f0678a4befbf8
this_save <- paste0(gsub(pattern="\\.Rmd", replace="", x=rmd_file), "-v", ver, ".rda.xz")
message(paste0("Saving to ", this_save))
## Saving to 03_expression_infection_20180822-v20180822.rda.xz
this_save