Hello,
I was reading your paper about cortical inhibitory interneurons https://www.nature.com/articles/nature25999 and I was wondering how you performed your normalization on sequencing depth of each cell using the theta overdispersion parameter.
Will this feature be integrated in Seurat ? I would be interested to test it on our data but I'm not sure how to get the theta parameter.
Thanks a lot !
Best regards
Hi,
Please refer to issue #268.
Best,
Leon
Hi,
Already read this thread, but the function RegressOutNBreg is masked in the package (v2.3) I don't know why... although it is accessible with three semi colon. I can find the code here but I don't know how to regress out reads number+nGene/nUMI as latent vars in input are strings and not formulas...
When I run it on my read number, I also get an error :
Error in (UMI.mean^2)/theta.estimate :
Hi,
Is the data a sparse matrix? If yes, you might want to use the updated function that you can find in the develop branch of Seurat's GitHub page.
If you have the read number stored in your [email protected]$nRead, you can do as follows:
# Calculate number of UMI per detected gene
[email protected]$nUMI.per.gene <- [email protected]$nUMI / [email protected]$nGene
# Regress out technical effects using regularized Negative Binomial regression
object <- RegressOutNBreg(object = object,
latent.vars = c("nRead", "nUMI.per.gene"),
genes.regress = [email protected], # regress only for variable genes: speeds computing time!
pr.clip.range = c(-30, 30),
min.theta = 0.01)
Best,
Leon
Thanks Leon. We think this is a powerful method for preprocessing but is still under development (and quite slow), so we haven't integrated it into our public workflows. Hopefully Leon's answer solves the technical question you had.
To anyone using RegressOutNBreg: prior to commit 86e4c83 in the develop branch (April 30, 2018 at 12:01:59 PM GMT+2) gene.regress would also be applied to the theta estimation step. As a result it was not advisable to set genes.regress to just variable genes as that would attenuate regularization. This has been fixed and the genes used during the first step (theta estimation) are now separate from the genes used during the second step (regression).
Hi Christoph,
I can't find the commit you mentioned.
Best,
Leon
Sorry, I did not merge the changes into the public repo. You should see the changes now.
Hi Christoph,
Could you please also export the function from Seurat in the develop branch?
Thank you in advance!
Best,
Leon
Hi there,
I noticed in the version 2.0.1, FindMarkers was automatically run with latent.vars="nUMI", but this has been removed in the current version (now latent.vars = NULL).
Thus when I now use NegBinDETest, the nUMI are not considered as latent variables any more by default. But this used to be the case (e.g. in version 2.0.1) - and made sense to me - so my question: why was it changed?
Thank you!