-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Task Description
Currently we have a utility script to dereference the entire database. This is helpful, but it would be nice to have a separate script to dereference a specific record within a specified table. This may be a separate function within dereference.py, instead of a whole new script.
For example, requesting to dereference proposition id 358 should yield the following abbreviated dereferenced record:
{
"id": 358,
"type": "VariantTherapeuticResponseProposition",
"predicate": "predictSensitivityTo",
"biomarkers": [
{
"id": 70,
"biomarker_type": "Somatic Variant",
"genes": [
{
"id": 17,
"conceptType": "Gene",
"primaryCode": "hgnc:3236",
"label": "EGFR",
"mappings": [
...
],
"extensions": [
...
]
}
],
}
],
"conditionQualifier": {
"id": 47,
"conceptType": "Disease",
"label": "Non-Small Cell Lung Cancer",
"extensions": [...]
},
"therapies": [
{
"id": 86,
"therapy_name": "Osimertinib",
"therapy_strategy": "EGFR inhibition",
"therapy_type": "Targeted therapy"
}
],
"objectTherapeutic": "",
"subjectVariant": ""
}
The referenced version looks like
{
"id": 358,
"type": "VariantTherapeuticResponseProposition",
"predicate": "predictSensitivityTo",
"name": "",
"description": "The U.S. Food and Drug Administration granted approval to osimertinib for the treatment of adult patients with metastatic epidermal growth factor receptor (EGFR) T790M mutation-positive non-small cell lung cancer (NSCLC), as detected by an FDA-approved test, whose disease has progressed on or after EGFR TKI therapy.",
"indication_id": 131,
"biomarkers": [
70
],
"conditionQualifier_id": 47,
"therapies": [
86
],
"objectTherapeutic": "",
"subjectVariant": ""
}
This utility script would be useful to sanity checking or quickly looking up dereferenced records.
Objective and requirements
Have an ability to dereference specific records for a given table.
Implementation Steps
Completing this Issue will require either refactoring dereference.py, or writing a separate script. It may be easier to refactor dereference.py, as the main function can reuse the components of this new function to dereference specific tables.
A procedure may be:
- Decide on how to implement this change.
- Refactor dereference.py or write a new script.
- Refactor dereference.py's main function to use the table specific functions.
- Write tests that ensure that the dereference is being performed as expected.
Dependencies
No specific dependencies.
Additional Context
The README for the in development version of the database that follows GKS specifications will be useful to linking out to appropriate documentation from GA4GH, and providing a visual representation of the database.
Estimated Time
(Optional) This could probably be completed with a full day of programming, if refactoring dereference.py.
Priority
(Optional) Medium. This would be very nice to have but is not critical.