saeyslab / nichenetr

NicheNet: predict active ligand-target links between interacting cells
469 stars 117 forks source link

SeuratV5 #257

Closed shayansaniei closed 5 months ago

shayansaniei commented 7 months ago

Hi, I want to run nichenet on a Seurat object v5 but I am having troubles. I was wondering if you can provide some insight, Thank you

wanwan26 commented 6 months ago

Me too. when I ran 'get_expressed_genes' , it can not match the version of seuratv5. expressed_genes_receiver = get_expressed_genes(receiver, IMC, pct = 0.10) Error in get_expressed_genes(receiver, IMC, pct = 0.1) : no slot of name "data" for this object of class "Assay5"

RolantusdataExp commented 6 months ago

Based on their GitHub, it seems that the package is built for Seurat V3/V4, thus I would expect the V5 format/assay won't work. You can try converting your Seurat V5 objects to Seurat V4 by: obj[["RNA"]] <- as(obj[["RNA"]], "Assay")

Hope this helps

Best regards, Peter

csangara commented 6 months ago

Hi, @shayansaniei @wanwan26 Can you try following my suggestion from #253 to see if you can follow the classical pipeline?

I'm aware that there's currently an issue with the wrapper functions and the alias conversion function, but if you update to v2.0.5, I think you will be able to run the step-by-step analysis. Please let me know if that's not the case.

Thanks Peter for the possible solution :)

csangara commented 6 months ago

If you update to NicheNet v2.0.6, the wrapper function should also work with v5 objects now.