Skip to content

Commit

Permalink
Fix #302
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Nov 8, 2021
1 parent 4e8fdc5 commit 300189c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sinfo-requirements.txt
*.code-workspace
.vscode/*
!.vscode/settings.json.default
Expand Down
6 changes: 3 additions & 3 deletions scirpy/tl/_repertoire_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ def repertoire_overlap(

# Remove NA rows
na_mask = _is_na(adata.obs[groupby]) | _is_na(adata.obs[target_col])
df = adata.obs.loc[~na_mask, :]
df = adata.obs.loc[~na_mask, :].copy()

# Normalize to fractions
df = df.assign(
cell_weights=_normalize_counts(adata.obs, fraction)
df["cell_weights"] = (
_normalize_counts(df, fraction)
if isinstance(fraction, (bool, str)) or fraction is None
else fraction
)
Expand Down

0 comments on commit 300189c

Please sign in to comment.