diff --git a/scirpy/_plotting/_group_abundance.py b/scirpy/_plotting/_group_abundance.py index 0872010de..f9d1c4ef7 100644 --- a/scirpy/_plotting/_group_abundance.py +++ b/scirpy/_plotting/_group_abundance.py @@ -12,7 +12,7 @@ def group_abundance( adata: Union[dict, AnnData], groupby: str, - target_col: str, + target_col: str = "has_tcr", *, fraction: Union[None, str, bool] = None, max_cols: Union[None, int] = None, @@ -30,6 +30,8 @@ def group_abundance( Group by this column from `obs`. Samples or diagnosis for example. target_col Column on which to compute the abundance. + Defaults to `has_tcr` which computes the number of all cells + that have a T-cell receptor. fraction If True, compute fractions of abundances relative to the `groupby` column rather than reporting abosolute numbers. Alternatively, a column diff --git a/scirpy/_tools/_group_abundance.py b/scirpy/_tools/_group_abundance.py index 057818cee..9e9749368 100644 --- a/scirpy/_tools/_group_abundance.py +++ b/scirpy/_tools/_group_abundance.py @@ -54,7 +54,7 @@ def _group_abundance( def group_abundance( adata: AnnData, groupby: str, - target_col: str, + target_col: str = "has_tcr", *, fraction: Union[None, str, bool] = None, ) -> pd.DataFrame: