From 90a758109f2afce7d9bb9c6a7d972339864b2d93 Mon Sep 17 00:00:00 2001 From: Susanna Kiwala Date: Tue, 8 Oct 2019 09:17:51 -0500 Subject: [PATCH] Update all parsers to handle IEDB files with Warning line --- lib/output_parser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/output_parser.py b/lib/output_parser.py index 346b69fb1..7c839ad44 100644 --- a/lib/output_parser.py +++ b/lib/output_parser.py @@ -551,6 +551,8 @@ def parse_iedb_file(self, tsv_entries): iedb_tsv_reader = csv.DictReader(reader, delimiter='\t') (sample, method, remainder) = os.path.basename(input_iedb_file).split(".", 2) for line in iedb_tsv_reader: + if "Warning: Potential DNA sequence(s)" in line['allele']: + continue protein_label = int(line['seq_num']) if 'core_peptide' in line: position = str(int(line['start']) - line['peptide'].find(line['core_peptide'])) @@ -596,6 +598,8 @@ def parse_iedb_file(self): iedb_tsv_reader = csv.DictReader(reader, delimiter='\t') (sample, method, remainder) = os.path.basename(input_iedb_file).split(".", 2) for line in iedb_tsv_reader: + if "Warning: Potential DNA sequence(s)" in line['allele']: + continue protein_label = int(line['seq_num']) if 'core_peptide' in line: position = str(int(line['start']) - line['peptide'].find(line['core_peptide']))