constantAmateur / SoupX

R package to quantify and remove cell free mRNAs from droplet based scRNA-seq data
253 stars 34 forks source link

Running autoEstCont() gets error message #59

Closed mouni521 closed 3 years ago

mouni521 commented 3 years ago

Hi, I'm trying to use SoupX and do the quickstart. First I have the 10X data, both raw and filtered matrix. The "load10X()" function is worked, but when I run "autoEstCont()" it told me I should run clustering first. So I run

sc = setClusters(sc,srat@active.ident)

Then do

sc = autoEstCont(sc)

But this time I got the error message about "Error in dimnames(x) <- dn: The length of 'dimnames' [1] must be equal to the array range" How can I fix this problem?

constantAmateur commented 3 years ago

This is strange, the clustering information should be loaded from cellranger.

Can you share the output of head(sc$metaData)? And the results of sessionInfo() after you've loaded SoupX?

mouni521 commented 3 years ago

head(sc$metaData)

截圖 2020-10-20 上午10 05 21

sessionInfo()

截圖 2020-10-20 上午10 01 56

There's no clustering information in the head(sc$metaData) Does the folder need only raw & filtered matrices? Or need other files? I haven't run CellRanger by myself, these matrices are from my collaborator.

constantAmateur commented 3 years ago

The cellranger folder needs to also contain the "analysis" directory, as this is where the clustering output is stored. If you don't have that, this will be why it's not loading automatically.

I'd also make sure the clustering data is included after running setClusters. I suspect that your Seurat object may contain a different number of cells and this may be causing your error.

It also appears Seurat has changed the output of the Read10X function in the newest version yet again (load10X calls it internally). I'll update load10X to deal with this in the next version.