Seurat: FindTransferAnchors: Error in intI(i, n = d[1], dn[[1]], give.dn = FALSE)

Created on 22 Jan 2019  路  5Comments  路  Source: satijalab/seurat

I am trying to use FindTransferAnchors between an integrated query dataset and a reference dataset, as in the Seurat 3.0 pancreas vignette.

Both objects have been through NormalizeData, FindVariableFeatures, ScaleData and RunPCA.

The function fails with

Performing PCA on the provided reference using 2000 features as input. Projecting PCA Finding neighborhoods Finding mutual nearest neighborhoods Found 3854 anchors Filtering Anchors Error in intI(i, n = d[1], dn[[1]], give.dn = FALSE): invalid character indexing

A colleague encountered the same problem independently using different datasets.
We were able to get FindTransferAnchors to work by setting project.query = T

Most helpful comment

Hello I am having fun with new features thanks! Unfortunately I am stuck now. I am seeing the same error at this stage following the PBMC scATAC-seq Vignette with my own datasets.

transfer.anchors <- FindTransferAnchors(reference = pbmc.rna, query = pbmc.atac, features = VariableFeatures(object = pbmc.rna), reference.assay = "RNA", query.assay = "ACTIVITY", reduction = "cca")

...
Error in intI(i, n = d[1], dn[[1]], give.dn = FALSE): invalid character indexing

I tried the project.query = TRUE and still returned the same error. not sure if the 2000 features I am using are present/scaled in both datasets as I thought they were generated by functions in the pipeline. Any advice on how to find the Features/check for this or otherwise proceed would be much appreciated.
thanks

All 5 comments

Hi,

Are the 2000 features you're using present/scaled in both datasets?

Hi,

I had the same issue, is there a way to quickly check if all of the features are present in both of the datasets?

They should be as the chosen features are overlapping DEGs between the two data sets.

You can use the intersect. This example works for Seurat2 objects:
intersect(unlist([email protected]@Dimnames[1]),YourFeatures)

Hi, I'm going to close this issue now as we haven't heard back from you @JonThom, but if you see the same error with the latest version of Seurat from the develop branch, please reopen the issue or create a new issue

Hello I am having fun with new features thanks! Unfortunately I am stuck now. I am seeing the same error at this stage following the PBMC scATAC-seq Vignette with my own datasets.

transfer.anchors <- FindTransferAnchors(reference = pbmc.rna, query = pbmc.atac, features = VariableFeatures(object = pbmc.rna), reference.assay = "RNA", query.assay = "ACTIVITY", reduction = "cca")

...
Error in intI(i, n = d[1], dn[[1]], give.dn = FALSE): invalid character indexing

I tried the project.query = TRUE and still returned the same error. not sure if the 2000 features I am using are present/scaled in both datasets as I thought they were generated by functions in the pipeline. Any advice on how to find the Features/check for this or otherwise proceed would be much appreciated.
thanks

Was this page helpful?
0 / 5 - 0 ratings