Skip to content

Commit

Permalink
Update all parsers to handle IEDB files with Warning line
Browse files Browse the repository at this point in the history
  • Loading branch information
susannasiebert committed Oct 8, 2019
1 parent 1ab985c commit 90a7581
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/output_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']))
Expand Down Expand Up @@ -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']))
Expand Down

0 comments on commit 90a7581

Please sign in to comment.