No weights after zinbwave()
Closed this issue · 2 comments
Hi
I'm following the zinbwave tutorial with my own data. I want to perform a DEG analysis, but I do not get the weights for the counts matrix.
summ.exp_norm
is just a SummarizedExperiment object
with a raw count matrix in assay
zinb <- zinbFit(summ.exp_norm, K=2, epsilon=1000)`
> zinb
Object of class ZinbModel.
7494 samples; 635 genes.
1 sample-level covariate(s) (mu); 1 sample-level covariate(s) (pi);
1 gene-level covariate(s) (mu); 1 gene-level covariate(s) (pi);
2 latent factor(s).
summ.exp_norm <- zinbwave(summ.exp, fitted_model=zinb,K=2, X="~Patient", epsilon=1000,
+ normalizedValues=TRUE, residuals = TRUE)
> summ.exp_norm
class: SingleCellExperiment
dim: 635 7494
metadata(0):
assays(3): counts normalizedValues residuals
rownames(635): TXNIP CCL5 ... PPP3R1 HSPA6
rowData names(0):
colnames(7494): Cell_1 Cell_2 ... Cell_7493 Cell_7494
colData names(3): Cell.id Cell.type Patient
reducedDimNames(1): zinbwave
spikeNames(0):
I've tried different combinations just in case.
I know zimbwave performs normalization only for visual ization purposes, but how does it deals with batch effect (2 conditions but from several patients) or normalization of the data.
thanks for your help
Hi Kevin,
which version of zinbwave are you using? Note that the function zinbwave
computes observational weights only since version 1.1.5, so if you have an older version, you may need to either set observationalWeights = TRUE
or to use the stand-alone function computeObservationalWeights
depending on how old your version is.
In any case, I recommend that you update to the latest version of the package.
The details on how zinbwave
deals with batch effects are in the paper, available here: https://www.nature.com/articles/s41467-017-02554-5
Please, let me know if there are specific points that are unclear.
Thanks.
zinbwave version is older.
I'll read again the paper.