Skip to content

Commit

Permalink
added basic check for float aro numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Vedanth-Ramji authored Sep 10, 2023
1 parent b301535 commit e5a5163
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions argnorm/drug_categorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def get_immediate_drug_classes(aro_num: str) -> List[Tuple]:
Each inner list contains the ARO number and name of the drug class in that order. [ARO:number, name].
'''

if type(aro_num) == float or type(aro_num) == int:
aro_num = 'ARO:' + str(aro_num)

gene = ARO[aro_num]

confers_resistance_to_drug_class = any(r.name == 'confers_resistance_to_drug_class' for r in gene.relationships)
Expand Down

0 comments on commit e5a5163

Please sign in to comment.