Skip to content

Commit

Permalink
format numbers to 3 decimal places
Browse files Browse the repository at this point in the history
  • Loading branch information
Dert1129 committed Dec 8, 2023
1 parent aabaa49 commit 86ac396
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/DataViz/RegionalProteomics.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ 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,
coveragePct: coveragePct,
numPeptides: numPeptides,
numUniquePeptides: numUniquePeptides,
numSamples: sampleCount,
foldChange: foldChange,
pVal: pVal,
foldChange: formatNumberToPrecision(foldChange, 3),
pVal: formatNumberToPrecision(adjPVal, 3)
}
});
};
Expand Down

0 comments on commit 86ac396

Please sign in to comment.