bio_io.py 文件源码

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

项目:cellranger 作者: 10XGenomics 项目源码 文件源码
def get_locus_info(locus):
    """ Returns chrom, start and stop from locus string.
    Enforces standardization of how locus is represented.
    chrom:start_stop (start and stop should be ints or 'None')
    """
    chrom, start_stop = locus.split(':')
    if chrom == 'None':
        chrom = None

    start, stop = re.split("\.\.|-", start_stop)
    if start == 'None':
        start = None
    else:
        start = int(float(start))
    if stop == 'None':
        stop = None
    else:
        stop = int(float(stop))
    return (str(chrom), start, stop)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号