jlakkis / CarDEC

Other
19 stars 4 forks source link

Finding marker genes and plotting violin plots! #7

Open mvis1231 opened 3 years ago

mvis1231 commented 3 years ago

Hi, Thank you so much for your amazing package!

I have been following one of your example codes: https://github.com/jlakkis/CarDEC_Codes/blob/main/Evaluations%20of%20CarDEC/CarDEC_monocyte.ipynb.

And I was wondering if there is a way for me to find marker genes and plot their violin plots. To do this, I guess I need to use scanpy by using the denoised counts in CarDEC (please correct me if I am wrong).

Could you please provide a simple guide code that shows how to get marker genes and plot the violin plots using the denoised data in CarDEC?

I am pretty new to Python, Scanpy, and CarDEC, so your assistance will be greatly helpful. Thank you very much!

eleozzr commented 3 years ago

I suggest you extract the denoised count from adata.layer['denoised_count'] and meta data from adata.obs, then create a new AnnData object.

For the downstream analysis (preprocessing, finding marker genes, visualization, et al) you can refer to the standard tutorial of scanpy:

https://scanpy-tutorials.readthedocs.io/en/latest/pbmc3k.html.

Hope this helps.