Skip to content

Commit

Permalink
Merge pull request #347 from griffithlab/stalled
Browse files Browse the repository at this point in the history
Don't parallelize MHCflurry or MHCnuggets
  • Loading branch information
susannasiebert authored Apr 4, 2019
2 parents efdc83b + cdedc2d commit a592e39
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions lib/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ def call_iedb(self, chunks):
alleles = self.alleles
epitope_lengths = self.epitope_lengths
prediction_algorithms = self.prediction_algorithms
argument_sets = []
argument_sets_iedb = []
argument_sets_other = []
warning_messages = []
for (split_start, split_end) in chunks:
tsv_chunk = "%d-%d" % (split_start, split_end)
Expand Down Expand Up @@ -337,14 +338,17 @@ def call_iedb(self, chunks):
]
if not isinstance(prediction, IEDBMHCII):
arguments.extend(['-l', str(epl),])
argument_sets.append(arguments)
if isinstance(prediction, IEDB):
argument_sets_iedb.append(arguments)
else:
argument_sets_other.append(arguments)

for msg in warning_messages:
status_message(msg)

with pymp.Parallel(self.n_threads) as p:
for index in p.range(len(argument_sets)):
arguments = argument_sets[index]
for index in p.range(len(argument_sets_iedb)):
arguments = argument_sets_iedb[index]
a = arguments[3]
method = arguments[2]
filename = arguments[1]
Expand All @@ -356,6 +360,18 @@ def call_iedb(self, chunks):
lib.call_iedb.main(arguments)
p.print("Making binding predictions on Allele %s and Epitope Length %s with Method %s - File %s - Completed" % (a, epl, method, filename))

for arguments in argument_sets_other:
a = arguments[3]
method = arguments[2]
filename = arguments[1]
if len(arguments) == 10:
epl = arguments[9]
else:
epl = 15
status_message("Making binding predictions on Allele %s and Epitope Length %s with Method %s - File %s" % (a, epl, method, filename))
lib.call_iedb.main(arguments)
status_message("Making binding predictions on Allele %s and Epitope Length %s with Method %s - File %s - Completed" % (a, epl, method, filename))

def parse_outputs(self, chunks):
split_parsed_output_files = []
for (split_start, split_end) in chunks:
Expand Down

0 comments on commit a592e39

Please sign in to comment.