common.py 文件源码

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

项目:cellranger 作者: 10XGenomics 项目源码 文件源码
def plot_barcode_rank(chart, sample_properties, sample_data):
    """ Generate the RNA counter barcode rank plot """
    if sample_properties.get('genomes') is None or sample_data.barcode_summary is None:
        return None

    if len(sample_properties['genomes']) == 0:
        return None

    counts_per_bc = []
    for genome in sample_properties['genomes']:
        key = cr_utils.format_barcode_summary_h5_key(genome, cr_constants.TRANSCRIPTOME_REGION, cr_constants.CONF_MAPPED_DEDUPED_READ_TYPE)
        if key in sample_data.barcode_summary:
            counts_per_bc.append(sample_data.barcode_summary[key][:])
        else:
            # Not guaranteed to exist, depending on pipeline
            return
    counts_per_bc = np.concatenate(counts_per_bc)

    return _plot_barcode_rank(chart, counts_per_bc, sample_data.num_cells)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号