mofaflex.priors.GSFA#

class mofaflex.priors.GSFA(targets_obsm_key, s_b=20)#

Guided sparse factor analysis prior for CRISPR perturbation screens.

Important

This prior can only be used for factors.

Important

All methods and properties of this class are only accessible through the MofaFlex class.

Parameters:
  • targets_obsm_key (str) – The key in .obsm that contains the perturbation matrix.

  • s_b (float (default: 20)) – The $s_b$ parameter for the hyperprior on the non-zero probability.

Methods table#

get_perturbation_effects([ordered])

The perturbation effect matrix \(\mat\beta\).

get_posterior_inclusion_probabilities([ordered])

The posterior inclusion probabilities \(p\).

Methods#

get_perturbation_effects(ordered: bool = False) Mapping[str, ndarray[tuple[int, int], floating]]#

The perturbation effect matrix \(\mat\beta\).

Parameters:

ordered (bool (default: False)) – Whether to return the factors ordered by explained variance (highest to lowest).

Return type:

Mapping[str, DataFrame]

get_posterior_inclusion_probabilities(ordered: bool = False) Mapping[str, ndarray[tuple[int, int], floating]]#

The posterior inclusion probabilities \(p\).

Parameters:

ordered (bool (default: False)) – Whether to return the factors ordered by explained variance (highest to lowest).

Return type:

Mapping[str, DataFrame]