diff --git a/Tests/test_orthofinder.py b/Tests/test_orthofinder.py index 21420acdcfd253d6858623306399cf87ece2f02a..d057dde89098fcb99b8954bda49b03609367c35e 100755 --- a/Tests/test_orthofinder.py +++ b/Tests/test_orthofinder.py @@ -33,7 +33,7 @@ exampleBlastDir = baseDir + "Input/SmallExampleDataset_ExampleBlastDir/" goldResultsDir_smallExample = baseDir + "ExpectedOutput/SmallExampleDataset/" goldPrepareBlastDir = baseDir + "ExpectedOutput/SmallExampleDataset_PreparedForBlast/" -version = "1.0.2" +version = "1.0.3" requiredBlastVersion = "2.2.28+" citation = """When publishing work that uses OrthoFinder please cite: diff --git a/orthofinder/orthofinder.py b/orthofinder/orthofinder.py index 6f1bc981e17324b23166d884a2a2ac8ed9fc9ff6..f296cafba634f1bbc5e30ca11443b1e97a86d8c7 100755 --- a/orthofinder/orthofinder.py +++ b/orthofinder/orthofinder.py @@ -485,13 +485,13 @@ class WaterfallMethod: return @staticmethod - def WriteGraphParallel(seqsInfo, fileInfo): + def WriteGraphParallel(seqsInfo, fileInfo, nProcess): with warnings.catch_warnings(): warnings.simplefilter("ignore") with open(fileInfo.graphFilename + "_header", 'wb') as graphFile: graphFile.write("(mclheader\nmcltype matrix\ndimensions %dx%d\n)\n" % (seqsInfo.nSeqs, seqsInfo.nSeqs)) graphFile.write("\n(mclmatrix\nbegin\n\n") - pool = mp.Pool() + pool = mp.Pool(nProcess) pool.map(WriteGraph_perSpecies, [(seqsInfo, fileInfo, iSpec) for iSpec in xrange(seqsInfo.nSpecies)]) subprocess.call("cat " + fileInfo.graphFilename + "_header " + " ".join([fileInfo.graphFilename + "_%d" % iSp for iSp in xrange(seqsInfo.nSpecies)]) + " > " + fileInfo.graphFilename, shell=True) # Cleanup @@ -1159,7 +1159,7 @@ if __name__ == "__main__": util.ManageQueue(runningProcesses, cmd_queue) util.PrintTime("Connected putatitive homologs") - WaterfallMethod.WriteGraphParallel(seqsInfo, fileInfo) + WaterfallMethod.WriteGraphParallel(seqsInfo, fileInfo, nProcessAlg) # 5b. MCL clustersFilename, iResultsVersion = util.GetUnusedFilename(workingDir + "clusters_%s_I%0.1f" % (fileIdentifierString, mclInflation), ".txt") diff --git a/orthofinder/scripts/util.py b/orthofinder/scripts/util.py index 798c5c017e4098e5519e6698d25ebe4dcb582d8d..7872418afd0b28fc727693ff89e15ea6fd6d2bbb 100644 --- a/orthofinder/scripts/util.py +++ b/orthofinder/scripts/util.py @@ -47,7 +47,7 @@ SequencesInfo = namedtuple("SequencesInfo", "nSeqs nSpecies speciesToUse seqStar FileInfo = namedtuple("FileInfo", "inputDir outputDir graphFilename") picProtocol = 1 -version = "1.0.2" +version = "1.0.3" def PrintNoNewLine(text): sys.stdout.write(text)