Skip to content

Commit

Permalink
Fix #44.
Browse files Browse the repository at this point in the history
Quick & dirty fix by setting the default target_col to `has_tcr`.
Can be improved in a later stage.
  • Loading branch information
grst committed Mar 30, 2020
1 parent 8ce1265 commit d0ce730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion scirpy/_plotting/_group_abundance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scirpy/_tools/_group_abundance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d0ce730

Please sign in to comment.