def normalize_and_transpose(matrix):
matrix.tocsc()
m = normalize_by_umi(matrix)
# Use log counts
m.data = np.log2(1 + m.data)
# Transpose
m = m.T
# compute centering (mean) and scaling (stdev)
(c,v) = summarize_columns(m)
s = np.sqrt(v)
return (m, c, s)
评论列表
文章目录