satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.25k stars 904 forks source link

IntegrateData error: Finding integration vector weights Error in Embeddings(reduction)[nn.cells2, dims] : subscript out of bounds #7597

Closed ZhenyaoYe closed 1 year ago

ZhenyaoYe commented 1 year ago

Hi,

I used IntegrateData function and obtained error:

Finding integration vector weights Error in Embeddings(reduction)[nn.cells2, dims] : subscript out of bounds

My anchorset,GABAobj.anchors, is An AnchorSet object containing 2390 anchors between 2 Seurat objects This can be used as input to IntegrateData.

Compared to the example (https://rdrr.io/cran/Seurat/man/IntegrateData.html), the example of anchorset ispancreas.anchors An AnchorSet object containing 20022 anchors between 3 Seurat objects This can be used as input to IntegrateData.

My number of anchors are smaller than the example one. No ideas about this error. Anyone can help? Thank you!

Best regards, Zhenyao

jules-samaran commented 1 year ago

Dear @ZhenyaoYe, what was the solution to your problem? I am facing the same situation (my issue in the signac repo: stuart-lab/signac#1453) where I found anchors between two Seurat objects but when I try to use Transfer data I encounter this error:

Error in Embeddings(reduction)[nn.cells2, dims] : subscript out of bounds

ZhenyaoYe commented 1 year ago

Dear @ZhenyaoYe, what was the solution to your problem? I am facing the same situation (my issue in the signac repo: stuart-lab/signac#1453) where I found anchors between two Seurat objects but when I try to use Transfer data I encounter this error:

Error in Embeddings(reduction)[nn.cells2, dims] : subscript out of bounds

Upon confirming that the gene names matched in each object list, this matter was resolved. For example, in my case, I incorporated genes from both human and mouse species. Since gene names differ between these two species, I converted human gene names into their corresponding mouse gene names.