Question: DESeq2 -- Bootstrap subsampling to estimate distribution of expression
gravatar for David Eccles (gringer)
4.7 years ago by
New Zealand
David Eccles (gringer)10 wrote:

I'm working in collaboration with a clinical diagnostics / research team in New Zealand, trying to use RNA biomarkers to determine disease risk. What we would ideally like to do is to generate expression ranges (in log space) using the reference samples, and then use those ranges to generate individual likelihoods per biomarker that are combined to generate a disease risk score. The original expectation was that this would be using the negative binomial distribution, but I can't find any documentation about how to estimate Nbinom parameters from a set of data (i.e. in a similar way that mean and sd can be used for normally-distributed data). Does anyone know of any ways to do this?

In light of this difficulty, I've been playing round with the 'boot' package to see if I can do bootstrap sub-sampling to estimate the expression distribution. One of our concerns is whether or not 6 samples is enough to be able to do this (that's what we've got at the moment, but we will have more in the future). Another concern is whether or not the approach I'm using is correct -- it's not something I've had much experience with previously, so I'm flailing around a bit. I'm currently subsampling reference samples with replacement, then calculating probability thresholds based on the distribution produced from the subsampling:

## extract out size-normalised counts for reference set
## [dgd.full is a DESeq2 dataset]
normcounts.ref.mat <-
    counts(dgd.full, normalized=TRUE)[,dgd.full$reference == "Ref"];
## subsample individuals (with replacement) to generate per-marker stats
ref.boot <- boot(data=t(normcounts.ref.mat), statistic = function(data,indices){
}, R = 10000);

## extract out descriptive statistics
ref.stats <- data.frame(row.names=rownames(normcounts.ref.mat));
for(stat in c("median","mean","sd","min","max")){
    ref.stats[[sprintf("LogT.%s",stat)]] <-
for(prob in c(0.005,0.025,0.15,0.5,0.85,0.975,0.995)){
    ref.stats[[sprintf("Q%s",prob)]] <-
### this can be done with as well:
## a <-,index=1, type="perc", hinv=expm1, conf=c(0.7,0.95,0.99))

Does this method make sense? We're doing both subsampling and a DESeq2 DE analysis so that we can compare methods, and hopefully get an idea of which approach works best for our disease.


David Eccles
Bioinformatics Research Analyst, Gringene Bioinformatics
Room 2.10 x857
Malaghan Institute of Medical Research

ADD COMMENTlink modified 4.7 years ago by Michael Love26k • written 4.7 years ago by David Eccles (gringer)10
Answer: DESeq2 -- Bootstrap subsampling to estimate distribution of expression
gravatar for Michael Love
4.7 years ago by
Michael Love26k
United States
Michael Love26k wrote:

I don't have advice for the alternate methods but to answer this: "how to estimate Nbinom parameters from a set of data"

You can plug in ~1 for the design and then run DESeq() to estimate means and dispersions. See the section "Access to all calculated values" in the DESeq2 vignette.

ADD COMMENTlink written 4.7 years ago by Michael Love26k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 218 users visited in the last hour