Skip to content

Commit

Permalink
Closes #87
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaguire committed Dec 27, 2024
1 parent 39d34e2 commit 9fcac3d
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 91 deletions.
5 changes: 3 additions & 2 deletions hAMRonization/AmrFinderPlusIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ def __init__(self, source, metadata):
}

with open(source) as fh:
_ = next(fh)
header = next(fh).strip().split("\t")
try:
first_result = next(fh)
if first_result.strip().split("\t")[0] == "NA":
prot_id = header.index("Protein identifier")
if first_result.strip().split("\t")[prot_id] == "NA":
self.field_mapping = nucleotide_field_mapping
else:
self.field_mapping = protein_field_mapping
Expand Down
Loading

0 comments on commit 9fcac3d

Please sign in to comment.