liana.mt.AggregateClass#
- class liana.mt.AggregateClass(_SCORE, methods)#
LIANA’s Method Consensus Class
- Parameters:
- _SCORE
MethodMeta Scoring method instance
- methods
list[Method] List of method instances to aggregate
- _SCORE
- _SCORE#
Scoring method instance
- methods#
List of method instances to aggregate
- specificity_specs#
Collection of method specificity’s specifications
- magnitude_specs#
Collection of method magnitudes’ specifications
- add_cols#
Additional columns required for each method
- complex_cols#
Columns relevant for protein complexes for each method
Methods table#
Methods#
- AggregateClass.by_sample(adata, sample_key, key_added='liana_res', inplace=True, verbose=False, **kwargs)#
Run a method by sample.
- Parameters:
- adata
AnnData|MuData Annotated data object.
- sample_key
str key in
adata.obsto use for grouping by sample or context.- key_added
str(default:'liana_res') Key under which the results will be stored in
adata.unsifinplaceis True.- inplace
bool(default:True) Whether to store results in place, or else to return them.
- verbose
bool|None|Literal['full'] (default:False) Possible values: False, True, ‘full’, where ‘full’ will print the results for each sample, and True will only print the sample progress bar. Default is False.
- **kwargs
object Keyword arguments to pass to the method
- adata
- Raises:
ValueError – If
sample_keyis not present inadata.obs- Return type:
- Returns:
A pandas DataFrame with the results and a column sample is stored in
adata.uns[key_added]ifinplaceis True, else the DataFrame is returned.