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
评论列表
文章目录