diff --git a/packages/sections/src/study/GWASCredibleSets/Body.tsx b/packages/sections/src/study/GWASCredibleSets/Body.tsx
index 753423956..3ebfc2c40 100644
--- a/packages/sections/src/study/GWASCredibleSets/Body.tsx
+++ b/packages/sections/src/study/GWASCredibleSets/Body.tsx
@@ -23,9 +23,7 @@ const columns = [
{
id: "studyLocusId",
label: "Navigate",
- renderCell: ({ studyLocusId }) => (
-
- ),
+ renderCell: ({ studyLocusId }) => ,
},
{
id: "leadVariant",
@@ -104,23 +102,25 @@ const columns = [
{
id: "topL2G",
label: "Top L2G",
- filterValue: ({ l2Gpredictions }) => l2Gpredictions?.target.approvedSymbol,
+ filterValue: ({ l2GPredictions }) => l2GPredictions?.rows[0]?.target.approvedSymbol,
tooltip: "Top gene prioritised by our locus-to-gene model",
- renderCell: ({ l2Gpredictions }) => {
- const target = l2Gpredictions?.[0]?.target;
+ renderCell: ({ l2GPredictions }) => {
+ const target = l2GPredictions?.rows[0]?.target;
if (!target) return naLabel;
return {target.approvedSymbol};
},
- exportValue: ({ l2Gpredictions }) => l2Gpredictions?.target.approvedSymbol,
+ exportValue: ({ l2GPredictions }) => l2GPredictions?.rows[0]?.target.approvedSymbol,
},
{
id: "l2gScore",
label: "L2G score",
- comparator: (rowA, rowB) => rowA?.l2Gpredictions[0]?.score - rowB?.l2Gpredictions[0]?.score,
+ comparator: (rowA, rowB) =>
+ rowA?.l2GPredictions?.rows[0]?.score - rowB?.l2GPredictions?.rows[0]?.score,
sortable: true,
- tooltip: "Machine learning prediction linking a gene to a credible set using all features. Score range [0,1].",
- renderCell: ({ l2Gpredictions }) => {
- const score = l2Gpredictions?.[0]?.score;
+ tooltip:
+ "Machine learning prediction linking a gene to a credible set using all features. Score range [0,1].",
+ renderCell: ({ l2GPredictions }) => {
+ const score = l2GPredictions?.rows[0]?.score;
if (typeof score !== "number") return naLabel;
return (
diff --git a/packages/sections/src/study/GWASCredibleSets/GWASCredibleSetsQuery.gql b/packages/sections/src/study/GWASCredibleSets/GWASCredibleSetsQuery.gql
index f95ee8e5d..73ee78ba2 100644
--- a/packages/sections/src/study/GWASCredibleSets/GWASCredibleSetsQuery.gql
+++ b/packages/sections/src/study/GWASCredibleSets/GWASCredibleSetsQuery.gql
@@ -20,12 +20,14 @@ query GWASCredibleSetsQuery($studyId: String!, $size: Int!, $index: Int!) {
}
finemappingMethod
confidence
- l2Gpredictions(size: 1) {
- target {
- id
- approvedSymbol
+ l2GPredictions(page: { size: 1, index: 0 }) {
+ rows {
+ target {
+ id
+ approvedSymbol
+ }
+ score
}
- score
}
}
}