Skip to content

Commit

Permalink
fix: study gwas coloc
Browse files Browse the repository at this point in the history
  • Loading branch information
carcruz committed Dec 9, 2024
1 parent 6aea1e3 commit f3fd310
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/sections/src/study/GWASCredibleSets/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -120,7 +124,7 @@ const columns = [
comparator: nullishComparator(
(a, b) => a - b,
row => row?.l2GPredictions?.rows[0]?.score,
false,
false
),
sortable: true,
tooltip:
Expand All @@ -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,
},
Expand All @@ -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<responseType>(initialResponse);

const getData = useBatchQuery({
query: GWAS_CREDIBLE_SETS_QUERY,
variables: {
studyId: id,
size: table5HChunkSize,
index: 0,
},
variables,
dataPath: "data.study.credibleSets",
size: table5HChunkSize,
});
Expand Down

0 comments on commit f3fd310

Please sign in to comment.