From e221412b8c7c7342fd7df9d96742bcef83f0792d Mon Sep 17 00:00:00 2001 From: Chintan Mehta Date: Fri, 15 Nov 2024 11:30:57 +0000 Subject: [PATCH 1/2] fix: schema change --- packages/sections/src/evidence/EVA/Body.jsx | 3 ++- packages/sections/src/evidence/EVA/ClinvarQuery.gql | 4 +++- packages/sections/src/evidence/EVASomatic/Body.jsx | 4 ++-- packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql | 4 +++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/sections/src/evidence/EVA/Body.jsx b/packages/sections/src/evidence/EVA/Body.jsx index d6010a747..675c4a9e1 100644 --- a/packages/sections/src/evidence/EVA/Body.jsx +++ b/packages/sections/src/evidence/EVA/Body.jsx @@ -139,7 +139,8 @@ function getColumns(label) { { id: "variantHgvsId", label: "HGVS ID", - renderCell: ({ variantHgvsId }) => variantHgvsId || naLabel, + renderCell: ({ variant }) => variant.hgvsId || naLabel, + filterValue: ({ variant }) => `${variant.hgvsId}`, }, { id: "studyId", diff --git a/packages/sections/src/evidence/EVA/ClinvarQuery.gql b/packages/sections/src/evidence/EVA/ClinvarQuery.gql index bbb4ba75f..b4e0e4405 100644 --- a/packages/sections/src/evidence/EVA/ClinvarQuery.gql +++ b/packages/sections/src/evidence/EVA/ClinvarQuery.gql @@ -19,12 +19,14 @@ query ClinvarQuery($ensemblId: String!, $efoId: String!, $size: Int!, $cursor: S id name } + variant { + hgvsId + } variantEffect directionOnTrait diseaseFromSource variantId variantRsId - variantHgvsId studyId variantFunctionalConsequence { id diff --git a/packages/sections/src/evidence/EVASomatic/Body.jsx b/packages/sections/src/evidence/EVASomatic/Body.jsx index f1770c898..47219ea60 100644 --- a/packages/sections/src/evidence/EVASomatic/Body.jsx +++ b/packages/sections/src/evidence/EVASomatic/Body.jsx @@ -96,8 +96,8 @@ const getColumns = label => [ { id: "variantHgvsId", label: "HGVS ID", - renderCell: ({ variantHgvsId }) => variantHgvsId || naLabel, - filterValue: ({ variantHgvsId }) => `${variantHgvsId}`, + renderCell: ({ variant }) => variant.hgvsId || naLabel, + filterValue: ({ variant }) => `${variant.hgvsId}`, }, { id: "studyId", diff --git a/packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql b/packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql index 095f4178d..e95babc22 100644 --- a/packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql +++ b/packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql @@ -15,12 +15,14 @@ query EvaSomaticQuery($ensemblId: String!, $efoId: String!, $size: Int!, $cursor id name } + variant { + hgvsId + } variantEffect directionOnTrait diseaseFromSource variantId variantRsId - variantHgvsId studyId clinicalSignificances allelicRequirements From c2b7b2020f41c7b73e205d96ee4ac247552cab0d Mon Sep 17 00:00:00 2001 From: Carlos Cruz Date: Sat, 23 Nov 2024 10:54:46 +0000 Subject: [PATCH 2/2] fix: update queries --- packages/sections/src/evidence/EVA/Body.jsx | 4 ++-- packages/sections/src/evidence/EVA/ClinvarQuery.gql | 2 +- packages/sections/src/evidence/EVASomatic/Body.jsx | 4 ++-- packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/sections/src/evidence/EVA/Body.jsx b/packages/sections/src/evidence/EVA/Body.jsx index d12a31852..5b8a41d31 100644 --- a/packages/sections/src/evidence/EVA/Body.jsx +++ b/packages/sections/src/evidence/EVA/Body.jsx @@ -41,7 +41,7 @@ const exportColumns = [ }, { label: "variantId", - exportValue: row => row.variantId, + exportValue: row => row.variant.id, }, { label: "variantRsId", @@ -110,7 +110,7 @@ function getColumns(label) { { id: "variantId", label: "Variant", - renderCell: ({ variantId }) => + renderCell: ({ variant: { id: variantId } }) => // trim long IDs and append '...' variantId ? ( <> diff --git a/packages/sections/src/evidence/EVA/ClinvarQuery.gql b/packages/sections/src/evidence/EVA/ClinvarQuery.gql index b4e0e4405..42951c3a9 100644 --- a/packages/sections/src/evidence/EVA/ClinvarQuery.gql +++ b/packages/sections/src/evidence/EVA/ClinvarQuery.gql @@ -20,12 +20,12 @@ query ClinvarQuery($ensemblId: String!, $efoId: String!, $size: Int!, $cursor: S name } variant { + id hgvsId } variantEffect directionOnTrait diseaseFromSource - variantId variantRsId studyId variantFunctionalConsequence { diff --git a/packages/sections/src/evidence/EVASomatic/Body.jsx b/packages/sections/src/evidence/EVASomatic/Body.jsx index e72089763..a81725fa1 100644 --- a/packages/sections/src/evidence/EVASomatic/Body.jsx +++ b/packages/sections/src/evidence/EVASomatic/Body.jsx @@ -66,7 +66,7 @@ const getColumns = label => [ { id: "variantId", label: "Variant", - renderCell: ({ variantId }) => + renderCell: ({ variant: { id: variantId } }) => variantId ? ( <> {variantId.substring(0, 20)} @@ -75,7 +75,7 @@ const getColumns = label => [ ) : ( naLabel ), - filterValue: ({ variantId }) => `${variantId}`, + filterValue: ({ variant: { id: variantId } }) => `${variantId}`, }, { id: "variantRsId", diff --git a/packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql b/packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql index e95babc22..7fc1a8c56 100644 --- a/packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql +++ b/packages/sections/src/evidence/EVASomatic/EvaSomaticQuery.gql @@ -21,7 +21,9 @@ query EvaSomaticQuery($ensemblId: String!, $efoId: String!, $size: Int!, $cursor variantEffect directionOnTrait diseaseFromSource - variantId + variant { + id + } variantRsId studyId clinicalSignificances