From f3fd31007c43ddfafccfe0117b82a7a2a8ae35e5 Mon Sep 17 00:00:00 2001 From: Carlos Cruz Date: Mon, 9 Dec 2024 23:29:05 +0100 Subject: [PATCH] fix: study gwas coloc --- .../src/study/GWASCredibleSets/Body.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/sections/src/study/GWASCredibleSets/Body.tsx b/packages/sections/src/study/GWASCredibleSets/Body.tsx index b94fce994..a2432d57c 100644 --- a/packages/sections/src/study/GWASCredibleSets/Body.tsx +++ b/packages/sections/src/study/GWASCredibleSets/Body.tsx @@ -14,9 +14,13 @@ import { naLabel, credsetConfidenceMap, initialResponse, table5HChunkSize } from import { definition } from "."; import Description from "./Description"; import GWAS_CREDIBLE_SETS_QUERY from "./GWASCredibleSetsQuery.gql"; -import { mantissaExponentComparator, nullishComparator, variantComparator } from "../../utils/comparators"; +import { + mantissaExponentComparator, + nullishComparator, + variantComparator, +} from "../../utils/comparators"; import ManhattanPlot from "./ManhattanPlot"; -import { useEffect, useState } from "react"; +import { ReactElement, useEffect, useState } from "react"; import { responseType } from "ui/src/types/response"; const columns = [ @@ -120,7 +124,7 @@ const columns = [ comparator: nullishComparator( (a, b) => a - b, row => row?.l2GPredictions?.rows[0]?.score, - false, + false ), sortable: true, tooltip: @@ -144,9 +148,7 @@ const columns = [ numeric: true, filterValue: false, renderCell: ({ locus }) => { - return typeof locus?.count === "number" - ? locus.count.toLocaleString() - : naLabel; + return typeof locus?.count === "number" ? locus.count.toLocaleString() : naLabel; }, exportValue: ({ locus }) => locus?.count, }, @@ -157,20 +159,18 @@ type BodyProps = { entity: string; }; -function Body({ id, entity }: BodyProps) { +function Body({ id, entity }: BodyProps): ReactElement { const variables = { studyId: id, + size: table5HChunkSize, + index: 0, }; const [request, setRequest] = useState(initialResponse); const getData = useBatchQuery({ query: GWAS_CREDIBLE_SETS_QUERY, - variables: { - studyId: id, - size: table5HChunkSize, - index: 0, - }, + variables, dataPath: "data.study.credibleSets", size: table5HChunkSize, });