blast.py 文件源码

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

项目:xenoGI 作者: ecbush 项目源码 文件源码
def runBlast(fastaFilePath,blastFilePath,blastCLine,numThreads):
    '''Run blast comparing every database against every other in
fastaFilePath. Save to the directory indicated by blastFilePath, using
the blast parameters in blastCLine.'''

    # format the databases
    dbFileL=glob.glob(fastaFilePath)
    formatDb(dbFileL)

    # create blast directory


    # if directory for blast doesn't exist yet, make it
    blastDir = blastFilePath.split("*")[0]
    if glob.glob(blastDir)==[]:
        os.mkdir(blastDir)

    clineL =  makeBlastClineList(dbFileL,fastaFilePath,blastFilePath,blastCLine)

    p=Pool(numThreads)
    stderrL = p.map(subprocessWrapper, clineL)

    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号