Skip to content

Commit

Permalink
[Platform]: fix locus validation on Variant widgets (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
carcruz authored Nov 27, 2024
1 parent d58451f commit f037c7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions packages/sections/src/variant/GWASCredibleSets/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ function getColumns({ id, referenceAllele, alternateAllele }: getColumnsType) {
comparator: (rowA, rowB) =>
rowA.locus.rows[0].posteriorProbability - rowB.locus.rows[0].posteriorProbability,
sortable: true,
renderCell: ({ locus }) => locus.rows[0]?.posteriorProbability.toFixed(3) ?? naLabel,
exportValue: ({ locus }) => locus.rows[0]?.posteriorProbability.toFixed(3),
renderCell: ({ locus }) =>
locus.count > 0 ? locus?.rows[0]?.posteriorProbability.toFixed(3) : naLabel,
exportValue: ({ locus }) =>
locus.count > 0 ? locus?.rows[0]?.posteriorProbability.toFixed(3) : naLabel,
},
{
id: "finemappingMethod",
Expand Down
6 changes: 4 additions & 2 deletions packages/sections/src/variant/QTLCredibleSets/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ function getColumns({ id, referenceAllele, alternateAllele }: getColumnsType) {
comparator: (rowA, rowB) =>
rowA.locus.rows[0].posteriorProbability - rowB.locus.rows[0].posteriorProbability,
sortable: true,
renderCell: ({ locus }) => locus.rows[0]?.posteriorProbability.toFixed(3) ?? naLabel,
exportValue: ({ locus }) => locus.rows[0]?.posteriorProbability.toFixed(3),
renderCell: ({ locus }) =>
locus.count > 0 ? locus?.rows[0]?.posteriorProbability.toFixed(3) : naLabel,
exportValue: ({ locus }) =>
locus.count > 0 ? locus?.rows[0]?.posteriorProbability.toFixed(3) : naLabel,
},
{
id: "confidence",
Expand Down

0 comments on commit f037c7d

Please sign in to comment.