Drizzle-Zhang / scMAGIC

Accurately annotating scRNA-seq data using two rounds of reference-based classification
GNU General Public License v3.0
6 stars 3 forks source link

Reference-free annotation with Seurat object #17

Open cathalgking opened 1 year ago

cathalgking commented 1 year ago

I have a Seurat object and I would like to do a 'Reference-free annotation' with scMAGIC. How can I do this? I have tried various options with the data and have had no luck.

cathalgking commented 1 year ago

I seem to have got this working with the following code, but am getting an error for one of my Seurat objects.

D1_scMAGIC <- scMAGIC_atlas(exp_sc_mat = D1_seu@assays$SCT, MCA_ref, atlas = 'MCA')

Error in checkForRemoteErrors(val) : 4 nodes produced errors; first error: probabilities must be finite, non-negative and not all 0

Do you know why this might be? I have almost the same type of object but with different data and have not gotten that error.

Any help would be greatly appreciated.

Drizzle-Zhang commented 1 year ago

A count matrix should be input to "exp_sc_mat ". So, you can try to use the following code: D1_scMAGIC <- scMAGIC_atlas(exp_sc_mat = D1_seu@assays$RNA@counts, MCA_ref, atlas = 'MCA', type_ref = 'sum-counts', use_RUVseq = F)