Skip to content

Reusing calculated data for gene trend models #1267

@jmkotah

Description

@jmkotah

...

Hello again,

I wanted to ask a question to do with the pl.gene_trends function.

I was wondering how the fitted model can be reused for subsequent line plots. From the docs I see that there is an option to set return_models=True, but I am not sure how to load it back for the plotting function. I have tried saving the resulting model dictionary as a variable, and using that dictionary in the model argument, i.e.:

a = cr.pl.gene_trends(ad, model = model, ...) #where model is the GAM model as in the vignette
cr.pl.gene_trends(ad, model = a, ...)

But this results in recalculating the gene trends before plotting anyways. Do you have advice on how to implement this properly?

Thanks!

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions