Skip to content

Commit

Permalink
ResFinder: fix variant phenotype collection
Browse files Browse the repository at this point in the history
  • Loading branch information
zwets committed Dec 29, 2024
1 parent 6df2fa6 commit 37dffac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hAMRonization/ResFinderIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ def set_variation_fields(r, vs):
_codon.append(v.get('codon_change'))

# Add the content of the list fields to the bags above
fold(lambda s, e: s.add(e), _phenos, v.get('phenotypes', []))
fold(lambda s, e: s.add(e), _notes, v.get('notes', []))
fold(lambda s, e: s.add(e), _pmids, v.get('pmids', []))
_phenos.update(v.get('phenotypes', []))
_notes.update(v.get('notes', []))
_pmids.update(v.get('pmids', []))

# We have collected all variations on region r, now collapse into fields on res
res.predicted_phenotype = _empty_to_none(", ".join(filter(None, _phenos)))
Expand Down

0 comments on commit 37dffac

Please sign in to comment.