From aabaa49fdb1b2ab8dfe5c4df8656fa4d552ebd57 Mon Sep 17 00:00:00 2001 From: dert1129 Date: Fri, 8 Dec 2023 11:22:30 -0500 Subject: [PATCH] put in table data --- src/components/DataViz/RegionalProteomics.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/DataViz/RegionalProteomics.js b/src/components/DataViz/RegionalProteomics.js index a7572b14..28d0f279 100644 --- a/src/components/DataViz/RegionalProteomics.js +++ b/src/components/DataViz/RegionalProteomics.js @@ -7,7 +7,7 @@ import queryString from 'query-string'; import {fetchRegionalProteomics} from "../../helpers/ApolloClient"; import LMDDotPlot from "../Plots/LMDDotPlot"; import RegionalProteomicsTable from "../ExpressionTables/RegionalProteomicsTable"; -import {formatTissueType, formatNumberToPrecision, formatDataType} from "../../helpers/Utils"; +import {formatTissueType, formatNumberToPrecision} from "../../helpers/Utils"; import { CSVLink } from "react-csv"; import { handleGoogleAnalyticsEvent } from '../../helpers/googleAnalyticsHelper'; @@ -85,20 +85,20 @@ class RegionalProteomics extends Component { }; cleanResults = (results) => { - console.log(results); // This next line was needed to avoid a strange error complaining that I couldn't modify the array let tempResults = JSON.parse(JSON.stringify(results)); - console.log(tempResults); // 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(({ segment, segmentName, pVal, stdDev, foldChange, sampleCount }) => { + return sortedResults.map(({ region, fdrConfidence, coveragePct, numPeptides, numUniquePeptides, sampleCount, foldChange, pVal }) => { return { - abbr: segment, - region: segmentName, + region: region, + fdrConfidence: fdrConfidence, + coveragePct: coveragePct, + numPeptides: numPeptides, + numUniquePeptides: numUniquePeptides, numSamples: sampleCount, - stdDeviation: formatNumberToPrecision(stdDev, 3), - foldChange: formatNumberToPrecision(foldChange, 3), - pVal: formatNumberToPrecision(pVal, 3), + foldChange: foldChange, + pVal: pVal, } }); }; @@ -112,7 +112,6 @@ class RegionalProteomics extends Component { if (downloadData && downloadData.length > 0) { cleanDownloadData = this.cleanResults(downloadData); } - console.log(downloadData); return (