mofaflex.DataOptions#

class mofaflex.DataOptions(*, group_by=None, layer=None, scale_per_group=True, annotations_varm_key=None, covariates_obs_key=None, covariates_obsm_key=None, guiding_vars_obs_keys=None, use_obs='union', use_var='union', subset_var='highly_variable', plot_data_overview=True, remove_constant_features=True)#

Options for the data.

Attributes table#

annotations_varm_key

Key of .varm attribute of each AnnData object that contains annotation values.

covariates_obs_key

Key of .obs attribute of each AnnData object that contains covariate values.

covariates_obsm_key

Key of .obsm attribute of each AnnData object that contains covariate values.

group_by

Columns of .obs in MuData objects to group data by.

guiding_vars_obs_keys

Keys of .obs attribute of each AnnData object that contains guiding variable values.

layer

Which layer to use.

plot_data_overview

Plot data overview.

remove_constant_features

Remove constant features from the data.

scale_per_group

Scale Normal likelihood data per group, otherwise across all groups.

subset_var

.var column with boolean values to select features.

use_obs

How to align observations across views.

use_var

How to align variables across groups.

Methods table#

Attributes#

DataOptions.annotations_varm_key: Mapping[str, str] | str | None = None#

Key of .varm attribute of each AnnData object that contains annotation values.

DataOptions.covariates_obs_key: Mapping[str, str] | str | None = None#

Key of .obs attribute of each AnnData object that contains covariate values.

DataOptions.covariates_obsm_key: Mapping[str, str] | str | None = None#

Key of .obsm attribute of each AnnData object that contains covariate values.

DataOptions.group_by: str | Sequence[str] | None = None#

Columns of .obs in MuData objects to group data by. Ignored if the input data is not a MuData object.

DataOptions.guiding_vars_obs_keys: str | Sequence[str] | Mapping[str, Mapping[str, str]] | None = None#

Keys of .obs attribute of each AnnData object that contains guiding variable values.

DataOptions.layer: Mapping[str, str | None] | Mapping[str, Mapping[str, str | None]] | str | None = None#

Which layer to use. If None, the .X element will be used. If str, the same layer will be used for all groups and views. If a dict of strings, the keys must correspond to view names and the values to layers. If a nested dict, different layers can be used for each combination of group and view. The last format is only accepted if the data is a nested dictionary of AnnData objects.

DataOptions.plot_data_overview: bool = True#

Plot data overview.

DataOptions.remove_constant_features: bool = True#

Remove constant features from the data.

DataOptions.scale_per_group: bool = True#

Scale Normal likelihood data per group, otherwise across all groups.

DataOptions.subset_var: str | None = 'highly_variable'#

.var column with boolean values to select features.

DataOptions.use_obs: Literal['union', 'intersection'] | None = 'union'#

How to align observations across views. Ignored if the data is not a nested dict of AnnData objects.

DataOptions.use_var: Literal['union', 'intersection'] | None = 'union'#

How to align variables across groups. Ignored if the data is not a nested dict of AnnData objects.

Methods#