Skip to content

Add a signifiance threshold for plot_fold_change() #967

@LuisHeinzlmeier

Description

@LuisHeinzlmeier

Description of feature

While updating the DGE chapter in single cell best practices, I noticed that plot_fold_change() is plotting the top n log fold changes of all results, even those with high p-values. So, I filtered the results like that:

pds2.plot_fold_change(res_df[res_df["adj_p_value"] < 0.01].copy(), n_top_vars=15)

I was wondering if there shouldn't be a parameter in plot_fold_change() that filters the significant results. The parameter could be called sig_thres or alpha, for example. I would even say sig_thres should have a default (e.g., sig_thres=0.01).

I'd be happy to make this small improvement myself. I welcome any feedback.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions