sort_allele_orientation.py 文件源码

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

项目:chewBBACA_deprecated 作者: mickaelsilva 项目源码 文件源码
def check_if_list_or_folder(folder_or_list):
    list_files = []
    # check if given a list of genomes paths or a folder to create schema
    try:
        f = open(folder_or_list, 'r')
        f.close()
        list_files = folder_or_list
    except IOError:

        for gene in os.listdir(folder_or_list):
            try:
                genepath = os.path.join(folder_or_list, gene)
                for allele in SeqIO.parse(genepath, "fasta", generic_dna):
                    break
                list_files.append(os.path.abspath(genepath))
            except Exception as e:
                print e
                pass

    return list_files
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号