if layer_norm == "after":
after = cell_sum_after
elif layer_norm == "X":
after = np.median(counts_per_cell[counts_per_cell>0])
elif layer_norm is None:
after = None
else: raise ValueError("layer_norm should be "after", "X" or None")
After Change
if layer_norm == "after":
after = cell_sum_after
elif layer_norm == "X":
after = np.median(counts_per_cell[cell_subset])
elif layer_norm is None:
after = None
else: raise ValueError("layer_norm should be "after", "X" or None")
del cell_subset