Skip to content

Commit

Permalink
use toPrecision
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmcn committed Dec 11, 2024
1 parent c917b21 commit 71017e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/sections/src/variant/GWASCredibleSets/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ function getColumns({ id, referenceAllele, alternateAllele }: getColumnsType) {
},
sortable: true,
renderCell: ({ locus }) =>
locus.rows.length > 0 ? locus?.rows[0]?.posteriorProbability.toFixed(3) : naLabel,
locus.rows.length > 0 ? locus?.rows[0]?.posteriorProbability.toPrecision(3) : naLabel,
exportValue: ({ locus }) =>
locus.rows.length > 0 ? locus?.rows[0]?.posteriorProbability.toFixed(3) : naLabel,
locus.rows.length > 0 ? locus?.rows[0]?.posteriorProbability : naLabel,
},
{
id: "finemappingMethod",
Expand Down
4 changes: 2 additions & 2 deletions packages/sections/src/variant/QTLCredibleSets/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ function getColumns({ id, referenceAllele, alternateAllele }: getColumnsType) {
</>
),
renderCell: ({ locus }) =>
locus.rows.length > 0 ? locus?.rows[0]?.posteriorProbability.toFixed(3) : naLabel,
locus.rows.length > 0 ? locus?.rows[0]?.posteriorProbability.toPrecision(3) : naLabel,
exportValue: ({ locus }) =>
locus.rows.length > 0 ? locus?.rows[0]?.posteriorProbability.toFixed(3) : naLabel,
locus.rows.length > 0 ? locus?.rows[0]?.posteriorProbability : naLabel,
},
{
id: "confidence",
Expand Down

0 comments on commit 71017e7

Please sign in to comment.