Skip to content

Commit

Permalink
Adapted min_count filter of get_pseudobulk to work with neg vals
Browse files Browse the repository at this point in the history
  • Loading branch information
PauBadiaM committed Jul 12, 2023
1 parent b38c07a commit f422423
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions decoupler/utils_anndata.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def compute_psbulk(n_rows, n_cols, X, sample_col, groups_col, smples, groups, ob
count = np.sum(profile)
ncells[i] = ncell
counts[i] = count
if ncell < min_cells or count < min_counts:
if ncell < min_cells or np.abs(count) < min_counts:
i += 1
continue

Expand Down Expand Up @@ -261,7 +261,7 @@ def compute_psbulk(n_rows, n_cols, X, sample_col, groups_col, smples, groups, ob
count = np.sum(profile)
ncells[i] = ncell
counts[i] = count
if ncell < min_cells or count < min_counts:
if ncell < min_cells or np.abs(count) < min_counts:
i += 1
continue

Expand Down

0 comments on commit f422423

Please sign in to comment.