Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hannaml committed Nov 13, 2020
2 parents 27b2070 + 875782d commit 137aa42
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/cluster_diffex.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ def main():
print('Exiting because received flag --markers-only')
return

# check that all cells have some marker expression
marker_per_cell = redux.astype(bool).sum()
if np.any(marker_per_cell == 0):
ncells_nomark = np.sum(marker_per_cell == 0)
msg = '{} of {} cells'.format(ncells_nomark, redux.shape[1])
msg += ' do not express any of the {}'.format(len(marker_ix))
msg += ' marker genes. Either remove these cells or alter thresholds'
msg += ' to increase the number of molecules.'
raise ValueError(msg)


# get distance
metric_label = _get_distance_label(args.distance)
running_prefix.append(metric_label)
Expand Down

0 comments on commit 137aa42

Please sign in to comment.