Closed ljouneau closed 3 years ago
Session information?
Ah, Yes !!! Sorry
This call:
denoised.pca=denoisePCA(sce.filtered.hvg,technical=modelGeneVariance[highly_variables_genes,])
Does not look correct. I'm guessing it should be something more like:
denoised.pca <- denoisePCA(sce.filtered.hvg,technical=modelGeneVariance, subset.row=highly_variables_genes)
x=
and technical=
should have the same number of rows, as desecribed in ?denoisePCA
.
I thought it was the case because sce.filtered.hvg only contains the highly variable genes I identified, but in fact I added in sce object a gene I wanted to keep (although not identified as highly variable gene) and forgot to add it also to highly_variable_genes vector. Now it works fine ! Thank you.
FYI, added some extra defensive checks against misspecified inputs in 4e6f5d62c14d71bc67fc75bf61fe9ef1a650da41.
I encountered an issue while trying to denoise a PCA on a SingleCellExperiment object. Here is the error:
I tried to pass through this error using getDenoisedPCs and transforming my sparse matrix in regular matrix:
This new error seems quite related to Issue #15 (https://github.com/MarioniLab/scran/issues/15) So I followed LTLA advices: (i) ensure that all values in the matrix y are finite,
If I run the PCA on log counts matrix using a different algorithm (scater::runPCA or PCA function of FactoMineR package), it works fine.
If I used BSPARAM to avoid getDenoisedPCs using Irlba algorithm, I get another error:
according to https://stackoverflow.com/questions/21423375/r-svd-function-infinite-or-missing-values-in-x I checked I have no NA values after scaling of columns:
But when I sum the counts of the columns, I have one column with a sum of 0:
Although this column seems perfectly normal:
But it still doesn't work if I try to run again getDenoisedPCs without this cell:
So, this cell does not seem to be the reason of my problems.
I have no more ideas for a workaround or have some clue on this error ... Thanks if someone has some ideas about it. Best regards