Skip to content

Commit

Permalink
update drugs attribute in evidence
Browse files Browse the repository at this point in the history
  • Loading branch information
apriltuesday committed May 7, 2024
1 parent fea5823 commit e40a5a8
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 132 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ genotypeAnnotationText | Full annotation string for genotype or allele | `"Patie
directionality | Allele function annotation (see Table 2 [here](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5253119/)) | `"Decreased function"`
haplotypeId | Name of haplotype; can be an allele or a genotype | `"CYP2B6*6"` or `"GSTT1 non-null/non-null"`
haplotypeFromSourceId | Internal PGKB identifier for the haplotype | `"PA165818762"`
drugsFromSource | List of drug names (if known to be annotated in combination) | `["succinylcholine"]` or `["ivacaftor", "lumacaftor"]`
drugs | List of drugs (see [below](#drug-representation)) | `[{"drugFromSource": "ivacaftor"}, {"drugFromSource": "lumacaftor"}]`
pgxCategory | Pharmacogenomics phenotype category | `"toxicity"`
phenotypeText | Phenotype name | `"Malignant Hyperthermia"`
phenotypeFromSourceId | EFO ID of phenotype, mapped through ZOOMA / OXO | `"Orphanet_423"`
Expand All @@ -64,8 +64,8 @@ Below is an example of a complete clinical annotation evidence string:
"targetFromSourceId": "ENSG00000196218",
"genotype": "del/GAG",
"genotypeAnnotationText": "Patients with the rs121918596 del/GAG genotype may develop malignant hyperthermia when treated with volatile anesthetics (desflurane, enflurane, halothane, isoflurane, methoxyflurane, sevoflurane) and/or succinylcholine as compared to patients with the GAG/GAG genotype. Other genetic or clinical factors may also influence the risk for malignant hyperthermia.",
"drugsFromSource": [
"succinylcholine"
"drugs": [
{"drugFromSource": "succinylcholine"}
],
"pgxCategory": "toxicity",
"phenotypeText": "Malignant Hyperthermia",
Expand All @@ -91,3 +91,12 @@ graph TD
H --> |Reference + context| D
E --> |Alternate alleles| D
```

### Drug representation

The `drugs` property is a list of structs with 2 keys:
* `drugFromSource`: name of the drug from PGKB
* `drugId`: CHEMBL ID, left empty in this pipeline but populated by Open Targets

Lists of drugs are kept together (rather than exploded into separate evidence strings) when they're known to be annotated as a drug combination.
Currently this is only when they're `/`-separated and associated with a single PGKB chemical ID, as in [ivacaftor / lumacaftor](https://www.pharmgkb.org/chemical/PA166152935).
2 changes: 1 addition & 1 deletion opentargets_pharmgkb/OT_SCHEMA_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.1
2.7.2
2 changes: 1 addition & 1 deletion opentargets_pharmgkb/evidence_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def generate_clinical_annotation_evidence(so_accession_dict, created_date, row):
'directionality': row['Allele Function'],

# PHENOTYPE ATTRIBUTES
'drugsFromSource': row['split_drug'],
'drugs': [{'drugFromSource': d} for d in row['split_drug']],
'pgxCategory': row['split_pgx_category'].lower(),
'phenotypeText': row['split_phenotype'],
'phenotypeFromSourceId': iri_to_code(row['efo'])
Expand Down
Loading

0 comments on commit e40a5a8

Please sign in to comment.