Skip to content

Commit

Permalink
Variant search config. (#995)
Browse files Browse the repository at this point in the history
* Attribute isRepeated flag. ValidateDataTypes indexing job.

* CreateEntityMainn indexing job.

* WriteEntityLevelDisplayHints indexing job.

* WriteTextSearchField indexing job.

* Select repeated attr field. Result parsing test list query.

* Fetch string-only hints. Result parsing test hint query.

* Group by repeated attribute field. Sql building and results parsing tests count query.

* Filter on repeated attribute field. Sql building test list query.

* Only use FLATTENED alias for repeated attribute field.

* OpenAPI repeated type in ValueDisplay. Bug in returning hint query results.

* Remove variant config files.

* Regenerate docs.

* Check actual data rows in result parsing hint & count query tests.

* Fix overlapping conditional in eldh indexing job.

* Variant search config -- first pass.

* Use t_item_count in criteria selector.

* Put back rest of underlay.

* Add multi-select for variant entity.

* Revert whitespace changes.

* Always populate repeatedValue property of ValueDisplay in OpenAPI.

* Move variant config to testonly version of aouSC underlay.

* Move variant config files into separate directories.

---------

Co-authored-by: Dexter Amundsen <dexamundsen@verily.com>
  • Loading branch information
marikomedlock and dexamundsen committed Sep 13, 2024
1 parent 6401fc0 commit 3b9ed7a
Show file tree
Hide file tree
Showing 10 changed files with 475 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "tanagra-variant",
"displayName": "SNP/Indel Variant",
"isEnabledForCohorts": true,
"isEnabledForDataFeatureSets": false,
"display": {
"category": "Genomics",
"tags": null
},
"filterBuilder": "core.EntityGroupFilterBuilder",
"plugin": "entityGroup",
"pluginConfig": null,
"pluginConfigFile": "variant.json",
"modifiers": null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"columns": [
{
"key": "variant_id",
"widthString": "20%",
"title": "Variant id"
},
{
"key": "gene",
"widthDouble": 100,
"title": "Gene"
},
{
"key": "rs_number",
"widthDouble": 100,
"title": "RS Number"
},
{
"key": "genomic_location",
"widthDouble": 100,
"title": "Genomic Location"
},
{
"key": "protein_change",
"widthDouble": 100,
"title": "Protein Change"
},
{
"key": "allele_count",
"widthDouble": 100,
"title": "Allele Count"
},
{
"key": "allele_number",
"widthDouble": 100,
"title": "Allele Number"
},
{
"key": "allele_frequency",
"widthDouble": 100,
"title": "Allele Frequency"
},
{
"key": "t_item_count",
"widthDouble": 150,
"title": "Participant count"
}
],
"classificationEntityGroups": [
{
"id": "variantPerson"
}
],
"multiSelect": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
SELECT ROW_NUMBER() OVER (ORDER BY vid) AS row_num,
vid,
gene_symbol,
dbsnp_rsid,
genomic_location,
consequence,
aa_change,
clinvar_classification,
gvs_all_ac,
gvs_all_an,
gvs_all_af
FROM `${omopDataset}.prep_vat`
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "variant",
"allInstancesSqlFile": "all.sql",
"attributes": [
{ "name": "id", "dataType": "INT64", "valueFieldName": "row_num" },
{ "name": "variant_id", "dataType": "STRING", "valueFieldName": "vid" },
{ "name": "gene", "dataType": "STRING", "valueFieldName": "gene_symbol", "isComputeDisplayHint": true },
{ "name": "rs_number", "dataType": "STRING", "isDataTypeRepeated": true, "valueFieldName": "dbsnp_rsid" },
{ "name": "genomic_location", "dataType": "STRING" },
{ "name": "consequence", "dataType": "STRING", "isDataTypeRepeated": true, "isComputeDisplayHint": true },
{ "name": "protein_change", "dataType": "STRING", "valueFieldName": "aa_change" },
{ "name": "clinvar_significance", "dataType": "STRING", "isDataTypeRepeated": true, "valueFieldName": "clinvar_classification", "isComputeDisplayHint": true },
{ "name": "allele_count", "dataType": "INT64", "valueFieldName": "gvs_all_ac", "isComputeDisplayHint": true },
{ "name": "allele_number", "dataType": "INT64", "valueFieldName": "gvs_all_an", "isComputeDisplayHint": true },
{ "name": "allele_frequency", "dataType": "DOUBLE", "valueFieldName": "gvs_all_af", "isComputeDisplayHint": true }
],
"idAttribute": "id",
"textSearch": {
"attributes": [ "variant_id", "gene", "rs_number", "genomic_location" ]
},
"optimizeGroupByAttributes": [ "variant_id" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "variantPerson",
"groupEntity": "variant",
"itemsEntity": "person",
"idPairsSqlFile": "idPairs.sql",
"groupEntityIdFieldName": "variant_row_num",
"itemsEntityIdFieldName": "flattened_person_id"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SELECT v.variant_row_num, flattened_person_id
FROM `${omopDataset}.variant_to_person` AS vtop
JOIN
(SELECT ROW_NUMBER() OVER (ORDER BY vid) AS variant_row_num, vid FROM `${omopDataset}.prep_vat`)
AS v ON v.vid = vtop.vid
CROSS JOIN UNNEST(vtop.person_ids) AS flattened_person_id
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"underlay": "aouSC2023Q3R2",
"underlay": "aouSC2023Q3R2_testonly",
"bigQuery": {
"sourceData": {
"projectId": "verily-tanagra-dev",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"underlay": "aouSC2023Q3R2",
"underlay": "aouSC2023Q3R2_testonly",
"bigQuery": {
"sourceData": {
"projectId": "verily-tanagra-dev",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
{
"featureConfig": {
"overrideExportButton": true
},
"demographicChartConfigs": {
"groupByAttributes": ["gender", "race", "age"],
"chartConfigs": [
{
"title": "Gender identity",
"primaryProperties": [{ "key": "gender" }]
},
{
"title": "Gender identity, Current age, Race",
"primaryProperties": [
{ "key": "gender" },
{
"key": "age",
"buckets": [
{
"min": 18,
"max": 45,
"displayName": "18-44"
},
{
"min": 45,
"max": 65,
"displayName": "45-64"
},
{
"min": 65,
"displayName": "65+"
}
]
}
],
"stackedProperty": { "key": "race" }
}
]
},
"criteriaSearchConfig": {
"criteriaTypeWidth": 120,
"columns": [
{ "key": "name", "width": "100%", "title": "Name" },
{ "key": "vocabulary_t_value", "width": 120, "title": "Vocab" },
{ "key": "concept_code", "width": 120, "title": "Code" },
{ "key": "t_rollup_count", "width": 150, "title": "Roll-up Count" }
]
},
"cohortReviewConfig": {
"participantsListColumns": [
{ "key": "id", "width": 35, "title": "Id" },
{ "key": "age", "width": 25, "title": "Age" },
{ "key": "gender", "width": 30, "title": "Gender" },
{ "key": "sex_at_birth", "width": 40, "title": "Sex at Birth" },
{ "key": "race", "width": 60, "title": "Race" },
{ "key": "ethnicity", "width": 60, "title": "Ethnicity" }
],
"attributes": [
{
"title": "Gender",
"key": "gender"
},
{
"title": "Sex at Birth",
"key": "sex_at_birth"
},
{
"title": "Age",
"key": "age"
},
{
"title": "Race",
"key": "race"
},
{
"title": "Ethnicity",
"key": "ethnicity"
}
],
"pages": [
{
"type": "entityTable",
"id": "condition",
"title": "Conditions",
"plugin": {
"entity": "conditionOccurrence",
"columns": [
{ "key": "condition_start_datetime", "width": "10%", "title": "Start date", "sortable": true },
{ "key": "standard_concept_code", "width": "15%", "title": "Standard Code", "sortable": true, "filterable": true },
{ "key": "standard_vocabulary", "width": "15%", "title": "Standard Vocabulary", "sortable": true, "filterable": true },
{ "key": "standard_concept_name", "width": "30%", "title": "Condition name", "sortable": true, "filterable": true },
{ "key": "age_at_occurrence", "width": "15%", "title": "Age at Occurrence", "sortable": true },
{ "key": "visit_type", "width": "15%", "title": "Visit Type", "sortable": true }
]
}
},
{
"type": "entityTable",
"id": "procedure",
"title": "Procedures",
"plugin": {
"entity": "procedureOccurrence",
"columns": [
{ "key": "procedure_datetime", "width": "10%", "title": "Date", "sortable": true, "filterable": true },
{ "key": "standard_concept_code", "width": "15%", "title": "Standard Code", "sortable": true, "filterable": true },
{ "key": "standard_vocabulary", "width": "15%", "title": "Standard Vocabulary", "sortable": true, "filterable": true },
{ "key": "standard_concept_name", "width": "30%", "title": "Procedure Name", "sortable": true, "filterable": true },
{ "key": "age_at_occurrence", "width": "15%", "title": "Age at Occurrence", "sortable": true, "filterable": true },
{ "key": "visit_type", "width": "15%", "title": "Visit Type", "sortable": true, "filterable": true }
]
}
},
{
"type": "entityTable",
"id": "observation",
"title": "Observations",
"plugin": {
"entity": "observationOccurrence",
"columns": [
{ "key": "observation_datetime", "width": "10%", "title": "Date", "sortable": true, "filterable": true },
{ "key": "standard_concept_code", "width": "15%", "title": "Standard Code", "sortable": true, "filterable": true },
{ "key": "standard_vocabulary", "width": "15%", "title": "Standard Vocabulary", "sortable": true, "filterable": true },
{ "key": "standard_concept_name", "width": "30%", "title": "Observation Name", "sortable": true, "filterable": true },
{ "key": "age_at_occurrence", "width": "15%", "title": "Age at Occurrence", "sortable": true, "filterable": true },
{ "key": "visit_type", "width": "15%", "title": "Visit Type", "sortable": true, "filterable": true }
]
}
},
{
"type": "entityTable",
"id": "ingredient",
"title": "Drugs",
"plugin": {
"entity": "ingredientOccurrence",
"columns": [
{ "key": "drug_exposure_start_datetime", "width": "10%", "title": "Date", "sortable": true, "filterable": true },
{ "key": "standard_concept_code", "width": "15%", "title": "Standard Code", "sortable": true, "filterable": true },
{ "key": "standard_vocabulary", "width": "15%", "title": "Standard Vocabulary", "sortable": true, "filterable": true },
{ "key": "standard_concept_name", "width": "30%", "title": "Drug Name", "sortable": true, "filterable": true },
{ "key": "age_at_occurrence", "width": "15%", "title": "Age at Occurrence", "sortable": true, "filterable": true },
{ "key": "visit_type", "width": "15%", "title": "Visit Type", "sortable": true, "filterable": true }
]
}
},
{
"type": "entityTable",
"id": "measurements",
"title": "Labs and measurements",
"plugin": {
"entity": "measurementOccurrence",
"columns": [
{ "key": "measurement_datetime", "width": "10%", "title": "Date", "sortable": true, "filterable": true },
{ "key": "standard_concept_name", "width": "25%", "title": "Lab/measurement Name", "sortable": true, "filterable": true },
{ "key": "value_enum", "width": "15%", "title": "Categorical value", "sortable": true, "filterable": true },
{ "key": "value_numeric", "width": "15%", "title": "Numeric value", "sortable": true, "filterable": true },
{ "key": "unit_concept_name", "width": "10%", "title": "Unit", "sortable": true, "filterable": true },
{ "key": "age_at_occurrence", "width": "10%", "title": "Age at Occurrence", "sortable": true, "filterable": true },
{ "key": "visit_type", "width": "15%", "title": "Visit Type", "sortable": true, "filterable": true }
]
}
}
]
}
}
Loading

0 comments on commit 3b9ed7a

Please sign in to comment.