carmonalab / ProjecTILs

Interpretation of cell states using reference single-cell maps
GNU General Public License v3.0
231 stars 27 forks source link

Error in match.arg while running Run.ProjecTILs #80

Closed Merguerrero closed 2 months ago

Merguerrero commented 2 months ago

Hello!

I'm trying to map new cells to a reference of a previous dataset I've used. So, i have 2 objects: Query:

      > obj
      An object of class Seurat 
      33538 features across 37100 samples within 1 assay 
      Active assay: RNA (33538 features, 2000 variable features)
       3 layers present: data, counts, scale.data
       10 dimensional reductions calculated: pca, umap, integrated.cca, integrated.rpca, harmony, integrated.pca, umap.cca, umap.rpca, umap.harmony, umap.pca

Ref:

      >integrated.obj
      An object of class Seurat 
      33538 features across 38190 samples within 1 assay 
      Active assay: RNA (33538 features, 2000 variable features)
       3 layers present: counts, data, scale.data
       2 dimensional reductions calculated: umap, pca

And when execute this:

        obj_projectils<-Run.ProjecTILs(obj, ref = integrated.obj)

I got this error:

        obj_projectils<-Run.ProjecTILs(obj, ref = integrated.obj)
        |======================================================================| 100%
        Error: BiocParallel errors
        1 remote errors, element index: 1
        0 unevaluated and other errors
        first remote error:
        Error in match.arg(arg = value, choices = Assays(object = object)): 'arg' should be "RNA"

Is this something related to Seurat v5? What can I do?

Thanks in advance

mass-a commented 2 months ago

Hello Mercedes, to use a custom reference for data projection, you need first to convert your object into a reference. The make.reference() function can do this for you. You can have a look at this document for an example of building a custom reference map. Let us know if this works for you. -m

Merguerrero commented 2 months ago

Ups!

I'm extremely sorry, I was so convinced that this was related to v5... Thank you so much for the information ☺️