-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: account for genes being mapped directly to drug classes without …
…intermediate drugs in `confers_resistance_to()`. Whenever genes were mapped to drug classes (i.e. immediate child of antibiotic molecule), `confers_resistance_to()` would store these mappings in a temporary list (`backup_drugs`) and only use them if the ARG wasn't being mapped to any other drug. This strategy fails if an ARG is mapped to a drug class and a drug that falls under another drug class (not the same as the one being directly mapped to the ARG). In this case, the ARG is only mapped to the drug and the mapped drug class information is lost. Now, `confers_resistance_to()` does not utilize `backup_drugs`. Rather, it maps ARGs to every possible drug and drug class. It then iterates over these drugs and drug classes to check if any of the drugs are children nodes of mapped drug classes. Mapped drug classes that are the parents of mapped drugs are removed (they will be restored by `drugs_to_drug_classes()`).
- Loading branch information
1 parent
2b064e2
commit 8ebfb35
Showing
13 changed files
with
371 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.