Skip to content

Commit

Permalink
Remove unnecessary warning in map_to_aro and document return of empty…
Browse files Browse the repository at this point in the history
… list if ARO invalid in map_to_aro
  • Loading branch information
Vedanth-Ramji committed May 8, 2024
1 parent a624f14 commit 11dea18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions argnorm/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def map_to_aro(gene, database):
Returns:
ARO[result] (pronto.term.Term): A pronto term with the ARO number of input gene. ARO number can be accessed using 'id' attribute and gene name can be accessed using 'name' attribute.
If ARO mapping is invalid or doesn't exist, an empty list [] is returned.
"""

if database not in ['ncbi', 'deeparg', 'resfinder', 'sarg', 'megares', 'argannot']:
Expand All @@ -67,5 +69,4 @@ def map_to_aro(gene, database):
if result in ARO:
return ARO[result]
else:
return []
raise Warning('The gene does not have an ARO mapping')
return []

0 comments on commit 11dea18

Please sign in to comment.