Skip to content

Commit

Permalink
format insilico predictors scores
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmcn committed Dec 9, 2024
1 parent 9b3fe85 commit e165308
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/sections/src/variant/InSilicoPredictors/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ const columns = [
{
id: "score",
label: "Score",
renderCell: ({ score }) => score ?? naLabel,
numeric: true,
renderCell: ({ score }) => score?.toPrecision(3) ?? naLabel,
},
{
id: "normalisedScore",
label: "Normalised score",
renderCell: ({ normalisedScore }) => normalisedScore ?? naLabel,
numeric: true,
renderCell: ({ normalisedScore }) => normalisedScore?.toFixed(3) ?? naLabel,
},
];

Expand All @@ -55,8 +57,8 @@ type BodyProps = {
function getSortedRows(request) {
return request.data?.variant?.inSilicoPredictors
? [...request.data.variant.inSilicoPredictors]
.filter(e => e.method !== null)
.sort((row1, row2) => row1.method.localeCompare(row2.method))
.filter(e => e.method !== null)
.sort((row1, row2) => row1.method.localeCompare(row2.method))
: [];
}

Expand Down

0 comments on commit e165308

Please sign in to comment.