run_filter.py 文件源码

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

项目:SVclone 作者: mcmero 项目源码 文件源码
def remove_zero_copynumbers(gtype):
    '''
    remove any clonal or subclonal copy-numbers
    where the total copy-number is zero
    '''
    if gtype=='': return ''
    gtype_tmp = map(methodcaller('split',','),gtype.split('|'))
    if len(gtype_tmp)==1:
        gt = map(float, gtype_tmp[0])
        if (gt[0]==0 and gt[1]==0) or gt[0] < 0 or gt[1] < 0:
            gtype = ''
#    else:
#        new_gtype = []
#        for gt in gtype_tmp:
#            gt = map(float,gt)
#            if (gt[0]!=0 or gt[1]!=0):
#                new_gtype.append(gt)
#        if len(new_gtype) > 0:
#            new_gtype = [map(str,g) for g in new_gtype]
#            gtype = '|'.join([','.join(g) for g in new_gtype])
#        else:
#            gtype = ''
    return gtype
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号