partipy.compute_t_ratio#
- partipy.compute_t_ratio(adata, /, *, result_filters=None, save_to_anndata=True, return_result=False)#
Compute the t-ratio from an AnnData object that contains archetypes.
- Parameters:
adata (anndata.AnnData) – AnnData object with AA configuration and stored archetypes.
result_filters (Mapping[str, Any] | None, optional) – Filters passed to
get_aa_result()to disambiguate which AA result to use when multiple configurations are cached. Ignored whenadata.uns["AA_results"]uses the legacy format.save_to_anndata (bool, default
True) – Whether to store the computed t-ratio inadata.uns["AA_t_ratio"].return_result (bool, default
False) – If True, return the t-ratio value.
- Return type:
- Returns:
Optional[float] The computed t-ratio when
return_resultis True orsave_to_anndatais False. Otherwise, None.