omicverse.single.get_weights

omicverse.single.get_weights(hdf5_path, view, factor, scale=True)[source]

Extract feature loadings for one factor from a MOFA model.

Parameters:
  • hdf5_path (str) – Path to MOFA .hdf5 model file.

  • view (str) – View/modality name to query.

  • factor (int) – 1-based factor index.

  • scale (bool) – If True, rescale weights by maximum absolute value.

Returns:

Feature table containing raw/absolute weights and sign label.

Return type:

pd.DataFrame