theislab / cellrank

CellRank: dynamics from multi-view single-cell data
https://cellrank.org
BSD 3-Clause "New" or "Revised" License
350 stars 46 forks source link

Extract gene expression on pseudotime from cellrank.pl.gene_trends #1197

Open TinyTasy opened 6 months ago

TinyTasy commented 6 months ago

Dear Cellrank Team,

Thank you for your amazing tool.

I have a question regarding cellrank.plot.gene_trends, maybe somewhat naive.

Is there any way to extract the underlying data from the plots? Ideally, I'd like to have the distribution along the pseudotime of a gene in some kind of dataframe or matrix as I'd like to compare the distributions of some genes against each other with statistical tests to see if their expression differs, for a more unbiased approach. I tried setting return_models=True and got the degrees of freedom and GCV score, but I'd like to have the values for the whole expression. I hope I expressed clearly enough what I mean.

Any information on this is greatly supported, as I am a beginner when it comes to Python!

Best wishes, Anastasiya