Skip to content

Instantly share code, notes, and snippets.

@azkalot1
Created February 12, 2019 22:40
Show Gist options
  • Save azkalot1/f86cac2d928655eab8df363375b3519e to your computer and use it in GitHub Desktop.
Save azkalot1/f86cac2d928655eab8df363375b3519e to your computer and use it in GitHub Desktop.
mat = mat[:,CV>=10]
f, ax = plt.subplots(1,2,figsize=(15,5))
per_cell_sum = mat.sum(axis=1)
ax[0].hist(np.log10(per_cell_sum+1));
ax[0].set_title('Distribtion of #UMIs per cell\n min {}, max {}, mean {} +- {}'.format(min(per_cell_sum),
max(per_cell_sum), np.mean(per_cell_sum),
np.sqrt(np.std(per_cell_sum))));
per_gene_sum = mat.sum(axis=0)
ax[1].hist(np.log10(per_gene_sum+1));
ax[1].set_title('Distribtion of #UMIs per gene\n min {}, max {}, mean {} +- {}'.format(min(per_gene_sum),
max(per_gene_sum), np.mean(per_gene_sum),
np.sqrt(np.std(per_gene_sum))));
plt.tight_layout()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment