aertslab / scenicplus

SCENIC+ is a python package to build gene regulatory networks (GRNs) using combined or separate single-cell gene expression (scRNA-seq) and single-cell chromatin accessibility (scATAC-seq) data.
Other
162 stars 27 forks source link

Interoperability between mudata and scplus obj #358

Closed jesswhitts closed 2 months ago

jesswhitts commented 2 months ago

Hello,

I have ran the development pipeline and have some pretty nice results for my data!

I would like to use some of the downstream functions (like pertubation simulation, exporting network files) but it seems they do not work with the mudata object... I realise these will be updated for mudata compatibility in due course, but is there a temporary workaround you could suggest? Is there an easy way to convert the mudata into a scplus obj?

Many thanks, Jess

SeppeDeWinter commented 2 months ago

Hi @jesswhitts

Thanks for the nice words. I added a function for this https://github.com/aertslab/scenicplus/blob/development/src%2Fscenicplus%2Fscenicplus_class.py#L717

Let me know if you encounter any issues.

Best, Seppe

jesswhitts commented 2 months ago

Thank you Seppe!

It seems there is no 'eRegulon_signatures' field in the converted scplus obj, how can I create this?

I also have a quick question - with the original version of the pipeline there are some additional filtering steps done on the scplus obj (applying filters, scoring eregulons etc) Is this no longer required when using the development version?

Best, Jess

SeppeDeWinter commented 2 months ago

Hi @jesswhitts

To get this field you can run


from scenicplus.eregulon_enrichment import get_eRegulons_as_signatures
scplus_obj.uns["eRegulon_signatures"] = get_eRegulons_as_signatures(scplus_obj.uns["eRegulon_metadata"])

If you wish you can still apply the old filtering steps, this is not a requirement however.

Best,

Seppe

jesswhitts commented 2 months ago

Excellent, thank you!