Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drug Categorization Code Added #8

Merged
merged 27 commits into from
Sep 27, 2023
Merged

Drug Categorization Code Added #8

merged 27 commits into from
Sep 27, 2023

Conversation

Vedanth-Ramji
Copy link
Member

The approach I used was to integrate the drug categorization functions in the normalizer itself. While adding the ARO columns, I also add 'OVERALL CATEGORY OF DRUG CLASS' and 'CONFERS RESISTANCE TO IMMEDIATE DRUG CLASS' columns and use my drug categorization functions to get the data to be displayed in those columns.

I have included the drug categorization in the 'run' function of the base normalizer class, as the drug categorization functions only need ARO numbers as parameters, hence after normalization, differences between database syntaxes wouldn't matter for categorization code.

Copy link
Member

@luispedro luispedro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Vedanth-Ramji for this.

See all the single-line comments, but I also think that you committed several files that are not necessary. Also, I think this was not done from the main branch as it unwittingly reverts 6baac44 and 19793d0

argnorm/normalizers.py Show resolved Hide resolved
argnorm/normalizers.py Outdated Show resolved Hide resolved
tests/test_arg_category.py Outdated Show resolved Hide resolved
tests/test_arg_category.py Outdated Show resolved Hide resolved
tests/test_arg_category.py Outdated Show resolved Hide resolved
argnorm/drug_categorization.py Outdated Show resolved Hide resolved
argnorm/drug_categorization.py Outdated Show resolved Hide resolved
argnorm/drug_categorization.py Outdated Show resolved Hide resolved
argnorm/drug_categorization.py Outdated Show resolved Hide resolved
argnorm/drug_categorization.py Outdated Show resolved Hide resolved
1) Simplified the process of determining 'confers_resistance_to_drug_class' or 'confers_resistance_to_antibiotic'

2) Only global constants are full caps, other variables are small letters

3) 'i' is not used for iterating
@luispedro
Copy link
Member

The tests are now passing, but this commit has a lot of unnecessary material (remember that whatever you add in a commit will be in git's history forever). All the extra files should be removed before we can merge it

Also, the comment about from_obo_library is very relevant in this context: the aro.obo file is not used at all. I'd prefer to change that code to actually load from the copy of aro.obo that argNorm provides (although you need to take care of installing it and finding it in the right path!) but including a copy of aro.obo is a worst-of-both-worlds solution.

Copy link
Member

@luispedro luispedro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now LGTM

argnorm/drug_categorization.py Show resolved Hide resolved
argnorm/drug_categorization.py Show resolved Hide resolved
argnorm/normalizers.py Outdated Show resolved Hide resolved
@luispedro luispedro merged commit 554f29b into main Sep 27, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants