matrix.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:cellranger 作者: 10XGenomics 项目源码 文件源码
def select_nonzero_axes(self):
        new_mat = GeneBCMatrix(list(self.genes), list(self.bcs))
        new_mat.m = self.m

        nonzero_bcs = np.flatnonzero(new_mat.get_reads_per_bc())
        if new_mat.bcs_dim > len(nonzero_bcs):
            new_mat = new_mat.select_barcodes(nonzero_bcs)

        nonzero_genes = np.flatnonzero(new_mat.get_reads_per_gene())
        if new_mat.genes_dim > len(nonzero_genes):
            new_mat = new_mat.select_genes(nonzero_genes)

        return new_mat, nonzero_bcs, nonzero_genes
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号