From 86ac3960b1cbfd710b6ff2e17947904b50120b13 Mon Sep 17 00:00:00 2001 From: dert1129 Date: Fri, 8 Dec 2023 11:29:28 -0500 Subject: [PATCH] format numbers to 3 decimal places --- src/components/DataViz/RegionalProteomics.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/DataViz/RegionalProteomics.js b/src/components/DataViz/RegionalProteomics.js index 28d0f279..e52aa0bd 100644 --- a/src/components/DataViz/RegionalProteomics.js +++ b/src/components/DataViz/RegionalProteomics.js @@ -89,7 +89,7 @@ class RegionalProteomics extends Component { let tempResults = JSON.parse(JSON.stringify(results)); // The order b - a is important here because we want a reverse sort let sortedResults = tempResults.sort(function (a, b) { return b.foldChange - a.foldChange; }); - return sortedResults.map(({ region, fdrConfidence, coveragePct, numPeptides, numUniquePeptides, sampleCount, foldChange, pVal }) => { + return sortedResults.map(({ region, fdrConfidence, coveragePct, numPeptides, numUniquePeptides, sampleCount, foldChange, adjPVal }) => { return { region: region, fdrConfidence: fdrConfidence, @@ -97,8 +97,8 @@ class RegionalProteomics extends Component { numPeptides: numPeptides, numUniquePeptides: numUniquePeptides, numSamples: sampleCount, - foldChange: foldChange, - pVal: pVal, + foldChange: formatNumberToPrecision(foldChange, 3), + pVal: formatNumberToPrecision(adjPVal, 3) } }); };