drisso / zinbwave

Clone of the Bioconductor repository for the zinbwave package, see https://bioconductor.org/packages/zinbwave
43 stars 10 forks source link

reducedDim() returns only 0 #66

Closed yeroslaviz closed 4 years ago

yeroslaviz commented 4 years ago

I am trying to get low-dimensional representation of my data, but struggle to get reasonable results.

I am running the command with my own data set, creating the sce object from the Seurat data (from scratch)

counts <- as.matrix(seu.obj@assays$RNA@counts)
df <- seu.obj[[]]
sce <- SingleCellExperiment(list(counts=counts),colData=DataFrame(df))

filter <- rowSums(assay(sce)>5)>5
sce <- sce[filter,] 

assay(sce) %>% log1p %>% as.matrix %>% rowVars() -> vars
names(vars) <- rownames(sce)
vars<- sort(vars.tmp, decreasing = TRUE)
sce.rowVars <- sce[names(vars)[1:2000],]

sce.rowVars_zinb_K2 <- zinbwave(sce.rowVars, K = 2, epsilon=1e12, , BPPARAM=MulticoreParam(12))

But when it is done, I get only 0 in the second column of the reduceDim() matrix.

> head(reducedDim(sce.rowVars_zinb_K2))
                                    W1 W2
e18.1_AAACCCAAGATGCAGC-1 -1.717119e-07  0
e18.1_AAACCCACAAGCTCTA-1  1.842255e-07  0
e18.1_AAACCCAGTTTCGTTT-1  1.374396e-07  0
e18.1_AAACGAAGTGCCTTTC-1 -3.024275e-07  0
e18.1_AAACGAATCTACCAGA-1 -2.028772e-08  0
e18.1_AAACGCTAGGAACGTC-1 -5.856426e-08  0

Can this reflects the tru nature of the data, or is there something wrong in my analysis

thanks

Assa

drisso commented 4 years ago

This seems related to this: https://github.com/drisso/zinbwave/issues/59

It should be fixed in version >= 1.11.6. What version are you using?

Updating to the latest version should fix your issue, but let me know in case it doesn't.

yeroslaviz commented 4 years ago

I'm using version 1.10.0. Where can I get the next version?

yeroslaviz commented 4 years ago

ok. I have updated it from the github repository to 1.11.6. I'll give it a try.

drisso commented 4 years ago

Please, reopen this if it still happens.