report.py 文件源码

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

项目:cellranger 作者: 10XGenomics 项目源码 文件源码
def summarize_subsampled_matrices_cb(self, filtered_mats, subsample_type, subsample_depth):
        """
        Computes simple summary metrics such as median genes detected and UMI counts on subsampled filtered matrices

        Args:
            filtered_mats (GeneBCMatrices): subsampled and filtered GeneBCMatrices
            subsample_type (string): subsampling type
            subsample_depth (int): target depth per cell for subsampling

        """
        for genome in self.genomes:
            if filtered_mats is not None:
                matrix = filtered_mats.matrices[genome]
                genes_detected = np.median(matrix._sum(matrix.m >= cr_constants.MIN_READS_PER_GENE, axis=0))
                median_counts = np.median(matrix._sum(matrix.m, axis=0))

            subsampled_filtered_bc_median_unique_genes_detected = self._get_metric_attr('subsampled_filtered_bcs_median_unique_genes_detected', genome, subsample_type, subsample_depth)
            subsampled_filtered_bc_median_unique_genes_detected.set_value(genes_detected)

            subsampled_filtered_bcs_median_counts = self._get_metric_attr('subsampled_filtered_bcs_median_counts', genome, subsample_type, subsample_depth)
            subsampled_filtered_bcs_median_counts.set_value(median_counts)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号