-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
33 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,7 @@ | |
"Neoprofen", | ||
"noto", | ||
"NSAID", | ||
"NUDT", | ||
"omeprazole", | ||
"oxcarbazepine", | ||
"Oxtellar", | ||
|
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
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
20 changes: 20 additions & 0 deletions
20
scripts/analyze_functions/checks/normal_side_effect_risk.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from analyze_functions.constants import IGNORED_PHENOTYPES, NORMAL_RISK_TEXTS | ||
|
||
def check_normal_side_effect_risk(args): | ||
guideline = args['item'] | ||
annotations = args['annotations'] | ||
can_have_normal_risk = any(map( | ||
lambda normal_risk_text: normal_risk_text in \ | ||
'–'.join(guideline['externalData'][0]['implications'].values()).lower(), | ||
NORMAL_RISK_TEXTS, | ||
)) or all(map( | ||
lambda gene: | ||
(gene == 'HLA-B' and 'negative' in guideline['phenotypes'][gene][0]) \ | ||
or guideline['phenotypes'][gene][0].lower() in IGNORED_PHENOTYPES, | ||
guideline['phenotypes'].keys(), | ||
)) | ||
has_normal_risk_text = any(map( | ||
lambda normal_risk_text: normal_risk_text in annotations['implication'], | ||
NORMAL_RISK_TEXTS, | ||
)) | ||
return can_have_normal_risk or not has_normal_risk_text |
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