opentargets / issues

Issue tracker for Open Targets Platform and Open Targets Genetics Portal
https://platform.opentargets.org https://genetics.opentargets.org
Apache License 2.0
12 stars 2 forks source link

Adding a new column to the Pharmacogenetics widget #3219

Closed buniello closed 3 months ago

buniello commented 4 months ago

Following up from this data task - https://github.com/opentargets/issues/issues/3164.

The pharmacogenetics data schema has been modified to accommodate info on star alleles from PharmGKB. Two fields have been added to the schema (and need to be visualised in widget)


{
    ...
    "haplotypeId": "CYP2C9*1",
    "haplotypeFromSourceId": "PA165816542"
    ...
}

This is an example of how CYP2C9*2 and warfarin is represented:


-RECORD 0----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 datasourceId                   | pharmgkb                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 datasourceVersion              | 2024-01-05                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 datatypeId                     | clinical_annotation                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
 directionality                 | Decreased function                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
 drugFromSource                 | warfarin                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 drugFromSourceId               | CHEBI_10033                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 evidenceLevel                  | 1A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
 genotype                       | *2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
 genotypeAnnotationText         | The CYP2C9*2 allele is assigned as a decreased function allele by CPIC. Patients with CYP2C9*2 in combination with another normal function allele, a decreased function allele, or a no function allele may have increased risk of bleeding when treated with warfarin as compared to patients with two normal function alleles. However, conflicting evidence has been reported. Other genetic and clinical factors may also influence the risk of warfarin-induced bleeding.         
 genotypeId                     | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
 haplotypeFromSourceId          | PA165816543                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 haplotypeId                    | CYP2C9*2                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 literature                     | [29432897, 10509530, 31186542, 29432897, 17653141, 17653141, 17653141, 17653141, 17653141, 18756910, 24503627, 24503627, 11926893, 10509530, 18574025, 24503627, 24503627, 24474498, 25001883, 25001883, 23932037, 23932037, 23774101, 23104259, 23104259, 25521356, 25521356, 24602049, 25769357, 25858232, 14676821, 17955230, 18690342, 22571356, 19297219, 23602689, 21148049, 25244877, 15714076, 23348161, 18570163, 26777610, 27488176, 27581200, 28033245, 28033245, 28689179] 
 pgxCategory                    | toxicity                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 phenotypeFromSourceId          | MP_0001914                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 phenotypeText                  | Hemorrhage                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 studyId                        | 1447672988                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 targetFromSourceId             | ENSG00000138109                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
 variantFunctionalConsequenceId | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
 variantRsId                    | NULL          

From a FE prospective, we will need to add one column to the Pharmacogenetics widget, named star allele. This column will be placed between the rsID and genotype ID columns in target page widget and drug page widget.

star allele column with be populated with the haplotypeId field. Field will be hyperlinked with this link: https://www.pharmgkb.org/haplotype/{haplotypeFromSourceId}

@chinmehta please let me know if you need more info

jdhayhurst commented 4 months ago

This will require a schema change in the API in order to expose the newly added fields to the frontend.

jdhayhurst commented 4 months ago

Ticket for API schema change: opentargets/issues#3224