diff --git a/packages/sections/src/variant/GWASCredibleSets/Body.tsx b/packages/sections/src/variant/GWASCredibleSets/Body.tsx index 922f0239d..54eeb0edc 100644 --- a/packages/sections/src/variant/GWASCredibleSets/Body.tsx +++ b/packages/sections/src/variant/GWASCredibleSets/Body.tsx @@ -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", diff --git a/packages/sections/src/variant/QTLCredibleSets/Body.tsx b/packages/sections/src/variant/QTLCredibleSets/Body.tsx index 85984167a..187721bf5 100644 --- a/packages/sections/src/variant/QTLCredibleSets/Body.tsx +++ b/packages/sections/src/variant/QTLCredibleSets/Body.tsx @@ -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",