Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/sections/src/study/GWASCredibleSets/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ const columns = [
tooltip:
"Fine-mapping confidence based on the quality of the linkage-disequilibrium information available and fine-mapping method",
sortable: true,
comparator: nullishComparator(
(a, b) => a - b,
row => credsetConfidenceMap?.[row.confidence],
false
),
renderCell: ({ confidence }) => {
if (!confidence) return naLabel;
return (
Expand Down
36 changes: 33 additions & 3 deletions packages/sections/src/study/QTLCredibleSets/Body.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import { useQuery } from "@apollo/client";
import { Link, SectionItem, ScientificNotation, DisplayVariantId, OtTable, Navigate } from "ui";
import { naLabel } from "@ot/constants";
import {
Link,
SectionItem,
ScientificNotation,
DisplayVariantId,
OtTable,
Navigate,
Tooltip,
ClinvarStars,
} from "ui";
import { naLabel, credsetConfidenceMap } from "@ot/constants";
import { definition } from ".";
import Description from "./Description";
import QTL_CREDIBLE_SETS_QUERY from "./QTLCredibleSetsQuery.gql";
import { mantissaExponentComparator, variantComparator } from "@ot/utils";
import { mantissaExponentComparator, nullishComparator, variantComparator } from "@ot/utils";

const columns = [
{
Expand Down Expand Up @@ -74,6 +83,27 @@ const columns = [
id: "finemappingMethod",
label: "Fine-mapping method",
},
{
id: "confidence",
label: "Fine-mapping confidence",
tooltip:
"Fine-mapping confidence based on the quality of the linkage-disequilibrium information available and fine-mapping method",
sortable: true,
comparator: nullishComparator(
(a, b) => a - b,
row => credsetConfidenceMap?.[row.confidence],
false
),
renderCell: ({ confidence }) => {
if (!confidence) return naLabel;
return (
<Tooltip title={confidence} style="">
<ClinvarStars num={credsetConfidenceMap[confidence]} />
</Tooltip>
);
},
filterValue: ({ confidence }) => credsetConfidenceMap[confidence],
},
{
id: "credibleSetSize",
label: "Credible set size",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ query QTLCredibleSetsQuery($studyId: String!) {
count
}
finemappingMethod
confidence
}
}
}
Expand Down