emosca-cnr / scMuffin

scMuffin - A MUlti-Features INtegrative approach for SC data analysis
https://emosca-cnr.github.io/scMuffin/
2 stars 0 forks source link

Mouse dataset for scMuffin analysis #5

Open ylxing0 opened 1 month ago

ylxing0 commented 1 month ago

Hi,

I have an issue running the code below with the mouse dataset.

gsc <- prepare_gsls(gs_sources = c("PNDB","CancerSEA","msigdb"), CM_tissues=c("Brain"), PNDB_tissues = c("Brain"), msigdb_hs_cat_subcat = c("Mus musculus","C2","CP:REACTOME"), scMuffinList = scML, genes_min = 3)

Error in apply(msigdb_hs_catsubcat, 1, function(x) paste(x, collapse = "")) : dim(X) must have a positive length.

Could you please help?

Thanks, LX.

emosca-cnr commented 1 month ago

Dear LX, thanks for your interest in our tool! I think the error is caused by your definition of msigdb_hs_cat_subcat, which must be a data.frame, see ?prepare_gsls. So:

gsc <- prepare_gsls(gs_sources = c("PNDB","CancerSEA","msigdb"), CM_tissues=c("Brain"), PNDB_tissues = c("Brain"), msigdb_hs_cat_subcat = data.frame(species="Mus musculus", category="C2", subcategory="CP:REACTOME") scMuffinList = scML, genes_min = 3)

should do.

ylxing0 commented 1 month ago

Thank you so much, it worked. I encountered another issue, please see the details below:

scML <- CNV_analysis(scML, na.rm=TRUE) IMPORTANT: CNV analysis requires gene symbols as gene identifiers! Genes-by-cells matrix size 18718 19438 Filtering... done Genes-by-cells matrix size 5810 7703 Preprocess object to calculate CNV... Retrieving gene locations... Genes with known location 4 Genes in chromosomes: 1 5 11 19 1 1 1 1 Excluding chromosomes 1 5 11 19 Consider reducing wnd_size parameter. Calculating CNV... Chromosome NA ... Error in ans[[i]] : subscript out of bounds

emosca-cnr commented 2 weeks ago

The issue is that genomic location was found only for four genes: "Genes with known location 4". This is because by default CNV_analysis() was intended for human.

Please see https://github.com/emosca-cnr/scMuffin/issues/2 to understand how to provide a custom annotation.