Skip to content

Instantly share code, notes, and snippets.

@azkalot1
Created February 12, 2019 22:38
Show Gist options
  • Save azkalot1/98c3c75a467ba93f4cb651f98ac56fbe to your computer and use it in GitHub Desktop.
Save azkalot1/98c3c75a467ba93f4cb651f98ac56fbe to your computer and use it in GitHub Desktop.
low_expr_thr = 100
high_expr_thr = 100000
mat = mat[:,(per_gene_sum>=low_expr_thr) & (per_gene_sum<=high_expr_thr)] #just remove extreme outliers
mean_exp = mat.mean(axis=0)
std_exp = np.sqrt(mat.std(axis=0))
CV = std_exp/mean_exp
plt.hist(CV);
plt.title('Distribution of CV, mean {} sd {}'.format(np.mean(CV), np.std(CV)**0.5));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment