factor_significance

factor_significance#

mofaflex.pl.factor_significance(model, n_factors=None, views=None, groups=None, alpha=0.05, figsize=None)#

Plot an overview of the factors summarizing the PCGSE results along with the variance explained per factor.

This is a diagnostic plot showing only the results of testing a factor against its matching annotation. Of the two one-sided tests, only the most significant one is shown. The factor names of the factors significant at alpha FDR will be annotated with the direction of the test.

Parameters:
  • model (MOFAFLEX) – The MOFA-FLEX model.

  • n_factors (int | None (default: None)) – Number of top factors to plot. If None, plot all factors (ordered).

  • views (str | Sequence[str] | None (default: None)) – The views to consider in the ranking. If None, plot all views.

  • groups (str | Sequence[str] | None (default: None)) – The groups to consider in the ranking. If None, plot all groups.

  • alpha (float (default: 0.05)) – False discovery rate threshold.

  • figsize (tuple[float, float] | None (default: None)) – Figure size in inches.

Return type:

plotnine.ggplot