genome_fetch.py 文件源码

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

项目:rfam-production 作者: Rfam 项目源码 文件源码
def extract_genome_acc(prot_rdf):
    """
    Extracts and returns the assembly accession from the proteome rdf
    which provided as input. Returns -1 if not available

    prot_rdf: A Uniprot's proteome rdf url or file path
    """
    g = Graph()

    response = requests.get(prot_rdf).status_code

    if response == httplib.OK:
        g.load(prot_rdf)

        for s, p, o in g:
            if string.find(o, "GCA") != -1:
                return os.path.split(o)[1]

    return -1


# -----------------------------------------------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号