quadbio / Pando

Multiome GRN inference.
https://quadbio.github.io/Pando/
MIT License
106 stars 21 forks source link

infer_grn() error #2

Closed zhenzuo2 closed 2 years ago

zhenzuo2 commented 2 years ago

Hi, I have a seurat obejct with RNA and peaks

seurat_object
An object of class SeuratPlus
268809 features across 79970 samples within 4 assays
Active assay: integrated (3500 features, 3500 variable features)
 3 other assays present: RNA, SCT, peaks
 4 dimensional reductions calculated: scpred, scpred_projection, pca, umap

But I got an error when running infer_grn() function

seurat_celltype <- infer_grn(
    seurat_object,
    peak_to_gene_method = 'Signac',
    method = 'glm',
    prallel=TRUE
)
Selecting candidate regulatory regions near genes
Error in as(groupings2, "data.frame") :
  no method or default for coercing “NULL” to “data.frame”

Could you please help me figure out what this error means? Thank you.

joschif commented 2 years ago

Hi @zhenzuo2, could you maybe post how the gene annotation you are using looks like Annotation(seurat_object)? I think Pando requires there to be a gene_name column to indicate the name of the gene range. If there is no such column, it might cause this error.

zhenzuo2 commented 2 years ago

Hi @joschif. Thank you for your information. It turns out I need to add the 'RNA' assay to the peak Seurat object instead of what I did before was adding 'peaks' assay to the RNA Seurat object. Everything works now. Thank you! Sorry for the late response.

joschif commented 2 years ago

Great, thanks!