From c48f5fc7440741a1debe2ab1773a066a4893fb9b Mon Sep 17 00:00:00 2001 From: Susanna Kiwala Date: Mon, 4 Dec 2017 09:39:12 -0600 Subject: [PATCH] Handle empty fasta files --- lib/pipeline.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/pipeline.py b/lib/pipeline.py index 4aac7a93f..c60751d3d 100644 --- a/lib/pipeline.py +++ b/lib/pipeline.py @@ -433,6 +433,9 @@ def call_iedb_and_parse_outputs(self, chunks): split_fasta_file_path = "%s_%s"%(self.split_fasta_basename(), fasta_chunk) split_iedb_output_files = [] status_message("Processing entries for Allele %s and Epitope Length %s - Entries %s" % (a, epl, fasta_chunk)) + if os.path.getsize(split_fasta_file_path) == 0: + status_message("Fasta file is empty. Skipping") + continue for method in self.prediction_algorithms: prediction_class = globals()[method] prediction = prediction_class() @@ -540,6 +543,9 @@ def call_iedb_and_parse_outputs(self, chunks): split_fasta_file_path = "%s_%s"%(self.split_fasta_basename(), fasta_chunk) split_iedb_output_files = [] status_message("Processing entries for Allele %s - Entries %s" % (a, fasta_chunk)) + if os.path.getsize(split_fasta_file_path) == 0: + status_message("Fasta file is empty. Skipping") + continue for method in self.prediction_algorithms: prediction_class = globals()[method] prediction = prediction_class()