From 6067577dd6f68a233d82c3ee501d831493b0bf07 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sat, 20 Apr 2024 23:36:22 -0700 Subject: [PATCH 01/62] Remove endurance training and acute exercise intervention filters due to the use of tab UIs to separate different study datasets Also render tissue/assay/omics filters using phase/study specific tissue/assay/omics lists --- src/BrowseDataPage/browseDataFilter.jsx | 65 +++++++++++++++---------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/src/BrowseDataPage/browseDataFilter.jsx b/src/BrowseDataPage/browseDataFilter.jsx index 53cb0780..4186e12d 100644 --- a/src/BrowseDataPage/browseDataFilter.jsx +++ b/src/BrowseDataPage/browseDataFilter.jsx @@ -1,27 +1,48 @@ import React from 'react'; import PropTypes from 'prop-types'; -import browseDataFilters, { tissueList } from '../lib/browseDataFilters'; +import { useSelector } from 'react-redux'; +import browseDataFilters, { tissues, omes } from '../lib/browseDataFilters'; +import assayList from '../lib/assayList'; -// build list of PASS1B-06 tissues -const pass1bTissues = tissueList.filter((item) => item !== 'Aorta'); +function BrowseDataFilter({ activeFilters, onChangeFilter, onResetFilters }) { + const dataDownload = useSelector((state) => state.browseData); -function BrowseDataFilter({ - activeFilters, - onChangeFilter, - onResetFilters, - userType, -}) { const fileFilters = [...browseDataFilters]; - if (!userType || (userType && userType !== 'internal')) { - fileFilters.forEach((item) => { - if (item.keyName === 'study') { - item.filters = ['Endurance Training']; + fileFilters.forEach((item) => { + if (item.keyName === 'tissue_name') { + if (dataDownload.pass1b06DataSelected) { + item.filters = tissues.pass1b_06; } - if (item.keyName === 'tissue_name') { - item.filters = pass1bTissues; + if (dataDownload.pass1a06DataSelected) { + item.filters = tissues.pass1a_06; } - }); - } + if (dataDownload.humanPrecovidSedAduDataSelected) { + item.filters = tissues.human_sed_adu; + } + } + if (item.keyName === 'omics') { + if (dataDownload.pass1b06DataSelected) { + item.filters = omes.pass1b_06; + } + if (dataDownload.pass1a06DataSelected) { + item.filters = omes.pass1a_06; + } + if (dataDownload.humanPrecovidSedAduDataSelected) { + item.filters = omes.human_sed_adu; + } + } + if (item.keyName === 'assay') { + if (dataDownload.pass1b06DataSelected) { + item.filters = assayList.pass1b_06; + } + if (dataDownload.pass1a06DataSelected) { + item.filters = assayList.pass1a_06; + } + if (dataDownload.humanPrecovidSedAduDataSelected) { + item.filters = assayList.human_sed_adu; + } + } + }); const filters = fileFilters.map((item) => (
@@ -52,15 +73,9 @@ function BrowseDataFilter({ key={filter} type="button" className={`btn filterBtn ${ - isActiveFilter || - (filter === 'Endurance Training' && userType !== 'internal') - ? 'activeFilter' - : '' + isActiveFilter ? 'activeFilter' : '' }`} onClick={() => onChangeFilter(item.keyName, filter)} - disabled={ - filter === 'Endurance Training' && userType !== 'internal' - } > {filter} @@ -95,7 +110,6 @@ BrowseDataFilter.propTypes = { }), onChangeFilter: PropTypes.func.isRequired, onResetFilters: PropTypes.func.isRequired, - userType: PropTypes.string, }; BrowseDataFilter.defaultProps = { activeFilters: { @@ -104,7 +118,6 @@ BrowseDataFilter.defaultProps = { tissue_name: [], category: [], }, - userType: null, }; export default BrowseDataFilter; From 45b95f07f2b251d4b1016ef73ef462965bf0f868 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sat, 20 Apr 2024 23:46:46 -0700 Subject: [PATCH 02/62] New component to render list of bundle datasets --- .../components/bundleDatasets.jsx | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/BrowseDataPage/components/bundleDatasets.jsx diff --git a/src/BrowseDataPage/components/bundleDatasets.jsx b/src/BrowseDataPage/components/bundleDatasets.jsx new file mode 100644 index 00000000..4ef079c6 --- /dev/null +++ b/src/BrowseDataPage/components/bundleDatasets.jsx @@ -0,0 +1,76 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import BundleDownloadButton from './bundleDownloadButton'; + +function BundleDatasets({ + profile, + bundleDatasets, + tagColor, + handleUserSurveyOpenOnBundledDownload, +}) { + return ( +
+ {bundleDatasets.map((item) => { + return ( +
+
+
+
{item.title}
+
+ + {item.species} + + + {item.participant_type} + + + {item.intervention} + + {item.species === 'Human' && ( + + {item.study_group} + + )} +
+

{item.description}

+
+
+ +
+
+
+ ); + })} +
+ ); +} + +BundleDatasets.propTypes = { + profile: PropTypes.shape({ + user_metadata: PropTypes.shape({ + userType: PropTypes.string, + email: PropTypes.string, + name: PropTypes.string, + }), + }), + bundleDatasets: PropTypes.arrayOf(PropTypes.shape({})).isRequired, + tagColor: PropTypes.string.isRequired, + handleUserSurveyOpenOnBundledDownload: PropTypes.func, +}; + +BundleDatasets.defaultProps = { + profile: {}, + handleUserSurveyOpenOnBundledDownload: null, +}; + +export default BundleDatasets; From 89c99fa2103ff559157456f24491951ae104fd52 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sat, 20 Apr 2024 23:48:16 -0700 Subject: [PATCH 03/62] New component to render list of selective download cards for different study data (e.g. pass1b-06, pass1a-06) --- .../components/selectiveDataDownloadsCard.jsx | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/BrowseDataPage/components/selectiveDataDownloadsCard.jsx diff --git a/src/BrowseDataPage/components/selectiveDataDownloadsCard.jsx b/src/BrowseDataPage/components/selectiveDataDownloadsCard.jsx new file mode 100644 index 00000000..8214e9a0 --- /dev/null +++ b/src/BrowseDataPage/components/selectiveDataDownloadsCard.jsx @@ -0,0 +1,60 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { useHistory } from 'react-router-dom'; + +function SelectiveDataDownloadsCard({ + cardIcon, + cardTitle, + dataSelectHandler, + selectedData, + cssSelector, + children, +}) { + const history = useHistory(); + + function handleDataSelect(e) { + e.preventDefault(); + dataSelectHandler(); + history.push('/data-download/file-browser', { + state: { selectedData }, + }); + } + + return ( +
+
+

+ {cardIcon} + {cardTitle} +

+
+
+ {children} + +
+
+ ); +} + +SelectiveDataDownloadsCard.propTypes = { + cardIcon: PropTypes.string.isRequired, + cardTitle: PropTypes.string.isRequired, + dataSelectHandler: PropTypes.func.isRequired, + selectedData: PropTypes.string, + cssSelector: PropTypes.string, +}; + +SelectiveDataDownloadsCard.defaultProps = { + selectedData: '', + cssSelector: '', +}; + +export default SelectiveDataDownloadsCard; From f267475556e258687e84889271523a9a4e4a8cd9 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sat, 20 Apr 2024 23:49:28 -0700 Subject: [PATCH 04/62] New component to render individual tab in selective data download file browser --- .../selectiveDataDownloadFileBrowserTab.jsx | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/BrowseDataPage/components/selectiveDataDownloadFileBrowserTab.jsx diff --git a/src/BrowseDataPage/components/selectiveDataDownloadFileBrowserTab.jsx b/src/BrowseDataPage/components/selectiveDataDownloadFileBrowserTab.jsx new file mode 100644 index 00000000..1a584721 --- /dev/null +++ b/src/BrowseDataPage/components/selectiveDataDownloadFileBrowserTab.jsx @@ -0,0 +1,47 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +function SelectiveDataDownloadFileBrowserTab({ + className, + id, + href, + ariaControls, + tabTitle, + tabSelectHandler, + onResetFilters, +}) { + function handleTabSelect(e) { + e.preventDefault(); + tabSelectHandler(); + onResetFilters(); + } + + return ( +
  • + handleTabSelect(e)} + > + {tabTitle} + +
  • + ); +} + +SelectiveDataDownloadFileBrowserTab.propTypes = { + className: PropTypes.string.isRequired, + id: PropTypes.string.isRequired, + href: PropTypes.string.isRequired, + ariaControls: PropTypes.string.isRequired, + tabTitle: PropTypes.string.isRequired, + tabSelectHandler: PropTypes.func.isRequired, + onResetFilters: PropTypes.func.isRequired, +}; + +export default SelectiveDataDownloadFileBrowserTab; From 69aaa63cbad9ae33b8803f8d8e81a6c66ed0920d Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 18:55:02 -0700 Subject: [PATCH 05/62] Nw wrapper component for selective file download filters and data table --- .../selectiveDataDownloadFileBrowser.jsx | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/BrowseDataPage/components/selectiveDataDownloadFileBrowser.jsx diff --git a/src/BrowseDataPage/components/selectiveDataDownloadFileBrowser.jsx b/src/BrowseDataPage/components/selectiveDataDownloadFileBrowser.jsx new file mode 100644 index 00000000..0d56375f --- /dev/null +++ b/src/BrowseDataPage/components/selectiveDataDownloadFileBrowser.jsx @@ -0,0 +1,82 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Link } from 'react-router-dom'; +import BrowseDataTable from '../browseDataTable'; +import BrowseDataFilter from '../browseDataFilter'; +import BootstrapSpinner from '../../lib/ui/spinner'; + +function SelectiveDataDownloadFileBrowser({ + profile, + filteredFiles, + fetching, + activeFilters, + onChangeFilter, + onResetFilters, + handleDownloadRequest, + downloadRequestResponse, + waitingForResponse, + studySummary, +}) { + return ( + <> +

    {studySummary}

    +
    + + {fetching && ( +
    + +
    + )} + {!fetching && !filteredFiles.length && ( +
    +

    + + No matches found for the selected filters. Please refer to the{' '} + Summary Table for data that are + available. + +

    +
    + )} + {!fetching && filteredFiles.length && ( + + )} +
    + + ); +} + +SelectiveDataDownloadFileBrowser.propTypes = { + profile: PropTypes.shape({ + user_metadata: PropTypes.shape({ + userType: PropTypes.string, + email: PropTypes.string, + name: PropTypes.string, + }), + }), + filteredFiles: PropTypes.arrayOf(PropTypes.shape({})).isRequired, + fetching: PropTypes.bool.isRequired, + activeFilters: BrowseDataFilter.propTypes.activeFilters.isRequired, + onChangeFilter: PropTypes.func.isRequired, + onResetFilters: PropTypes.func.isRequired, + handleDownloadRequest: PropTypes.func.isRequired, + downloadRequestResponse: PropTypes.string.isRequired, + waitingForResponse: PropTypes.bool.isRequired, + studySummary: PropTypes.string.isRequired, +}; + +SelectiveDataDownloadFileBrowser.defaultProps = { + profile: {}, +}; + +export default SelectiveDataDownloadFileBrowser; From c42696719a68cecb55db924b70146a4191ea3876 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 18:56:36 -0700 Subject: [PATCH 06/62] New wrapper component for selective file downloads with tab Uis --- .../components/selectiveDataDownloads.jsx | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 src/BrowseDataPage/components/selectiveDataDownloads.jsx diff --git a/src/BrowseDataPage/components/selectiveDataDownloads.jsx b/src/BrowseDataPage/components/selectiveDataDownloads.jsx new file mode 100644 index 00000000..42a2081f --- /dev/null +++ b/src/BrowseDataPage/components/selectiveDataDownloads.jsx @@ -0,0 +1,176 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { useSelector, useDispatch } from 'react-redux'; +import PageTitle from '../../lib/ui/pageTitle'; +import actions from '../browseDataActions'; +import BrowseDataFilter from '../browseDataFilter'; +import SelectiveDataDownloadFileBrowserTab from './selectiveDataDownloadFileBrowserTab'; +import SelectiveDataDownloadFileBrowser from './selectiveDataDownloadFileBrowser'; + +function SelectiveDataDownloads({ + profile, + filteredFiles, + fetching, + activeFilters, + onChangeFilter, + onResetFilters, + handleDownloadRequest, + downloadRequestResponse, + waitingForResponse, +}) { + const dataDownload = useSelector((state) => state.browseData); + const dispatch = useDispatch(); + + // anonymous user or authenticated user + const userType = profile.user_metadata && profile.user_metadata.userType; + + return ( +
    + +
    + {/* nav tabs */} +
      + dispatch(actions.selectPass1B06Data())} + onResetFilters={onResetFilters} + /> + {userType && userType === 'internal' && ( + dispatch(actions.selectPass1A06Data())} + onResetFilters={onResetFilters} + /> + )} + {userType && userType === 'internal' && ( + + dispatch(actions.selectHumanPreCovidSedAduData()) + } + onResetFilters={onResetFilters} + /> + )} +
    + {/* tab panes */} +
    +
    + {dataDownload.pass1b06DataSelected && ( + item.phase === 'PASS1B-06', + )} + fetching={fetching} + activeFilters={activeFilters} + onChangeFilter={onChangeFilter} + onResetFilters={onResetFilters} + handleDownloadRequest={handleDownloadRequest} + downloadRequestResponse={downloadRequestResponse} + waitingForResponse={waitingForResponse} + studySummary="Experimental data from endurance trained (1 week, 2 weeks, 4 weeks or 8 weeks) compared to untrained young adult rats (6 months old)." + /> + )} +
    + {userType && userType === 'internal' && ( +
    + {dataDownload.pass1a06DataSelected && ( + item.phase === 'PASS1A-06', + )} + fetching={fetching} + activeFilters={activeFilters} + onChangeFilter={onChangeFilter} + onResetFilters={onResetFilters} + handleDownloadRequest={handleDownloadRequest} + downloadRequestResponse={downloadRequestResponse} + waitingForResponse={waitingForResponse} + studySummary="Experimental data from acute exercise study on young adult rats for a comprehensive analysis of the physiological responses following a single exercise session in 6-month-old F344 rats." + /> + )} +
    + )} + {userType && userType === 'internal' && ( +
    + {dataDownload.humanPrecovidSedAduDataSelected && ( + item.phase === 'HUMAN-PRECOVID-SED-ADU', + )} + fetching={fetching} + activeFilters={activeFilters} + onChangeFilter={onChangeFilter} + onResetFilters={onResetFilters} + handleDownloadRequest={handleDownloadRequest} + downloadRequestResponse={downloadRequestResponse} + waitingForResponse={waitingForResponse} + studySummary="Differential analysis results data for differences in changes during the acute bout, comparing the change from pre-exercise baseline at any given timepoint during the acute bout as compared to resting control." + /> + )} +
    + )} +
    +
    +
    + ); +} + +SelectiveDataDownloads.propTypes = { + filteredFiles: PropTypes.arrayOf(PropTypes.shape({})), + fetching: PropTypes.bool.isRequired, + profile: PropTypes.shape({ + user_metadata: PropTypes.shape({ + userType: PropTypes.string, + email: PropTypes.string, + name: PropTypes.string, + userid: PropTypes.string, + }), + }), + activeFilters: BrowseDataFilter.propTypes.activeFilters.isRequired, + onChangeFilter: PropTypes.func.isRequired, + onResetFilters: PropTypes.func.isRequired, + handleDownloadRequest: PropTypes.func.isRequired, + downloadRequestResponse: PropTypes.string.isRequired, + waitingForResponse: PropTypes.bool.isRequired, +}; + +SelectiveDataDownloads.defaultProps = { + profile: {}, + filteredFiles: [], +}; + +export default SelectiveDataDownloads; From 28a2c33c475c77bbc9a3e64f7acf3e9cc2cbb4cb Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 18:58:26 -0700 Subject: [PATCH 07/62] New parent component for refactored data downloads page --- .../components/dataDownloadsMain.jsx | 300 ++++++++++++++++++ 1 file changed, 300 insertions(+) create mode 100644 src/BrowseDataPage/components/dataDownloadsMain.jsx diff --git a/src/BrowseDataPage/components/dataDownloadsMain.jsx b/src/BrowseDataPage/components/dataDownloadsMain.jsx new file mode 100644 index 00000000..58e6b62f --- /dev/null +++ b/src/BrowseDataPage/components/dataDownloadsMain.jsx @@ -0,0 +1,300 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Link, useLocation } from 'react-router-dom'; +import { useDispatch } from 'react-redux'; +import PageTitle from '../../lib/ui/pageTitle'; +import ExternalLink from '../../lib/ui/externalLink'; +import BrowseDataFilter from '../browseDataFilter'; +import DataTypeInfo from './dataTypeInfo'; +import BundleDatasets from './bundleDatasets'; +import BundleDataTypes from './bundleDataTypes'; +import actions from '../browseDataActions'; +import SelectiveDataDownloads from './selectiveDataDownloads'; +import SelectiveDataDownloadsCard from './selectiveDataDownloadsCard'; + +function DataDownloadsMain({ + profile, + filteredFiles, + fetching, + activeFilters, + onChangeFilter, + onResetFilters, + handleDownloadRequest, + downloadRequestResponse, + waitingForResponse, +}) { + const dispatch = useDispatch(); + const location = useLocation(); + + // anonymous user or authenticated user + const userType = profile.user_metadata && profile.user_metadata.userType; + + if (location.pathname === '/data-download/file-browser') { + return ( + + ); + } + + return ( +
    + +
    +
    +

    + Browse and download the rat{' '} + {userType && userType === 'internal' && 'or human '}study data + consisting of both quantitative results and analyses that defining + the molecular changes that occur with training and exercise across + tissues. +

    +
    + Learn more about MoTrPAC studies: +
      +
    • + +
    • +
    • + +
    • +
    • + Project overview covering the study + design and study protocols +
    • +
    +
    +
    +
    +

    Study Data

    +

    + Browse and find the data of your interest by tissue, ome, or assay + types. +

    +
    + dispatch(actions.selectPass1B06Data())} + selectedData="pass1b-06" + cssSelector={ + !userType || (userType && userType === 'external') + ? 'external-access' + : '' + } + > +

    + Endurance Training +

    +
      +
    • Total of 60 male and female animals
    • +
    • 20 tissues
    • +
    • 29 assays across different omes
    • +
    • 4 time points
    • +
    +
    + {/* pass1a/1c-06 data set */} + {userType && userType === 'internal' && ( + dispatch(actions.selectPass1A06Data())} + selectedData="pass1a-06" + > +

    Acute Exercise

    +
      +
    • Total of 70 male and female animals
    • +
    • 21 tissues
    • +
    • 30 assays across different omes
    • +
    • 7 time points
    • +
    +
    + )} + {/* human-precovid-sed-adu data set */} + {userType && userType === 'internal' && ( + + dispatch(actions.selectHumanPreCovidSedAduData()) + } + selectedData="human-precovid-sed-adu" + > +

    + Pre-COVID Sedentary +

    +
      +
    • 175 adult participants
    • +
    • 4 tissues
    • +
    • 22 assays across different omes
    • +
    • Acute exercise
    • +
    +
    + )} +
    +
    + {/* Pre-bundled data sets */} +
    +

    Pre-bundled Data Sets

    + {/* nav tabs */} + + {/* tab panes */} +
    +
    + +
    + {userType && userType === 'internal' && ( +
    + +
    + )} + {userType && userType === 'internal' && ( +
    + +
    + )} +
    +
    + {/* Additional data information */} + +
    +
    +

    Additional Information

    +

    + The currently available young adult rats experimental data for + acute exercise and endurance training include all tissues and + assays from the very last consortium data release, as well as + additional tissues and assays made available afterwards. The + phenotypic data sets have also been updated since then. +

    +

    + Please refer to this{' '} + + README + description + {' '} + document for the data included in the very last consortium data + release. +

    +
    +
    +
    +
    + ); +} + +DataDownloadsMain.propTypes = { + filteredFiles: PropTypes.arrayOf(PropTypes.shape({})).isRequired, + fetching: PropTypes.bool.isRequired, + profile: PropTypes.shape({ + user_metadata: PropTypes.shape({ + userType: PropTypes.string, + email: PropTypes.string, + name: PropTypes.string, + userid: PropTypes.string, + }), + }), + activeFilters: BrowseDataFilter.propTypes.activeFilters.isRequired, + onChangeFilter: PropTypes.func.isRequired, + onResetFilters: PropTypes.func.isRequired, + handleDownloadRequest: PropTypes.func.isRequired, + downloadRequestResponse: PropTypes.string.isRequired, + waitingForResponse: PropTypes.bool.isRequired, +}; + +DataDownloadsMain.defaultProps = { + profile: {}, +}; + +export default DataDownloadsMain; From 235e044dd56879c5729c01a66163a15f79d12c15 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 19:01:14 -0700 Subject: [PATCH 08/62] Expanded a single assay list to multiple lists unique to the 3 study datasets --- src/lib/assayList.js | 119 ++++++++++++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 35 deletions(-) diff --git a/src/lib/assayList.js b/src/lib/assayList.js index 1dea4711..d6a77c1e 100644 --- a/src/lib/assayList.js +++ b/src/lib/assayList.js @@ -1,37 +1,86 @@ -const assays = [ - 'RNA-seq', - 'RRBS', - 'ATAC-seq', - 'Immunoassay', - 'Targeted 3-Hydroxyisobutyric Acid (3-HIB)', - 'Targeted Acyl-CoA', - 'Targeted Acylcarnitines', - 'Targeted Amines', - 'Targeted Amino Acids', - 'Targeted Beta-Aminoisobutyric Acid', - 'Targeted Ceramide', - 'Targeted Conventional', - 'Targeted Ethanolamides', - 'Targeted Keto Acids', - 'Targeted Nucleotides', - 'Targeted Organic Acids', - 'Targeted Oxylipins', - 'Targeted Sphingomyelin', - 'Targeted Tricarboxylic Acid Cycle', - 'Untargeted HILIC-Positive', - 'Untargeted Ion-Pair Negative', - 'Untargeted Lipidomics Reversed-Phase Negative', - 'Untargeted Lipidomics Reversed-Phase Positive', - 'Untargeted Reversed-Phase Negative', - 'Untargeted Reversed-Phase Positive', - 'Global Proteomics', - 'Phosphoproteomics', - 'Acetyl Proteomics', - 'Protein Ubiquitination', -]; - -const assayList = assays.sort((a, b) => - a.toLowerCase().localeCompare(b.toLowerCase()) -); +const assayList = { + pass1b_06: [ + 'Acetyl Proteomics', + 'ATAC-seq', + 'Global Proteomics', + 'Immunoassay', + 'Phosphoproteomics', + 'Protein Ubiquitination', + 'RNA-seq', + 'RRBS', + 'Targeted 3-Hydroxyisobutyric Acid (3-HIB)', + 'Targeted Acyl-CoA', + 'Targeted Acylcarnitines', + 'Targeted Amines', + 'Targeted Amino Acids', + 'Targeted Beta-Aminoisobutyric Acid', + 'Targeted Ceramide', + 'Targeted Conventional', + 'Targeted Ethanolamides', + 'Targeted Keto Acids', + 'Targeted Nucleotides', + 'Targeted Organic Acids', + 'Targeted Oxylipins', + 'Targeted Sphingomyelin', + 'Targeted Tricarboxylic Acid Cycle', + 'Untargeted HILIC-Positive', + 'Untargeted Ion-Pair Negative', + 'Untargeted Lipidomics Reversed-Phase Negative', + 'Untargeted Lipidomics Reversed-Phase Positive', + 'Untargeted Reversed-Phase Negative', + 'Untargeted Reversed-Phase Positive', + ], + pass1a_06: [ + 'Acetyl Proteomics', + 'ATAC-seq', + 'Global Proteomics', + 'Phosphoproteomics', + 'Protein Ubiquitination', + 'RNA-seq', + 'RRBS', + 'Targeted 3-Hydroxyisobutyric Acid (3-HIB)', + 'Targeted Acyl-CoA', + 'Targeted Acylcarnitines', + 'Targeted Amino Acids', + 'Targeted Beta-Aminoisobutyric Acid', + 'Targeted Ceramide', + 'Targeted Conventional', + 'Targeted Keto Acids', + 'Targeted Nucleotides', + 'Targeted Organic Acids', + 'Targeted Oxylipins', + 'Targeted Sphingomyelin', + 'Untargeted HILIC-Positive', + 'Untargeted Ion-Pair Negative', + 'Untargeted Lipidomics Reversed-Phase Negative', + 'Untargeted Lipidomics Reversed-Phase Positive', + 'Untargeted Reversed-Phase Negative', + 'Untargeted Reversed-Phase Positive', + ], + human_sed_adu: [ + 'ATAC-seq', + 'Global Proteomics', + 'Immunoassay for corticosteroids', + 'Immunoassay for glucagon and related metabolic hormones', + 'Immunoassay for insulin and related metabolic hormones', + 'MethylCap-seq', + 'Phosphoproteomics', + 'Proteomics Olink', + 'RNA-seq', + 'Targeted Acyl-CoA', + 'Targeted Amines', + 'Targeted Conventional', + 'Targeted Keto Acids', + 'Targeted Nucleotides', + 'Targeted Oxylipins', + 'Targeted Tricarboxylic Acid Cycle', + 'Untargeted HILIC-Positive', + 'Untargeted Ion-Pair Negative', + 'Untargeted Lipidomics Reversed-Phase Negative', + 'Untargeted Lipidomics Reversed-Phase Positive', + 'Untargeted Reversed-Phase Negative', + 'Untargeted Reversed-Phase Positive', + ], +}; export default assayList; From d6cd3f029b933489b8280ed2d0f64f7f241d0056 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 19:02:54 -0700 Subject: [PATCH 09/62] Expanded single tissue and omic lists to multiple lists unique to the 3 study datasets --- src/lib/browseDataFilters.jsx | 105 +++++++++++++++++++++++----------- 1 file changed, 73 insertions(+), 32 deletions(-) diff --git a/src/lib/browseDataFilters.jsx b/src/lib/browseDataFilters.jsx index b49947be..b982ee15 100644 --- a/src/lib/browseDataFilters.jsx +++ b/src/lib/browseDataFilters.jsx @@ -1,43 +1,84 @@ import assayList from './assayList'; -const tissues = [ - 'Adrenal', - 'Aorta', - 'Blood RNA', - 'Brown Adipose', - 'Colon', - 'Cortex', - 'Gastrocnemius', - 'Heart', - 'Hippocampus', - 'Hypothalamus', - 'Kidney', - 'Liver', - 'Lung', - 'Ovaries', - 'Plasma', - 'Small Intestine', - 'Spleen', - 'Testes', - 'Vastus Lateralis', - 'Vena Cava', - 'White Adipose', -]; +export const tissues = { + pass1b_06: [ + 'Adrenal', + 'Blood RNA', + 'Brown Adipose', + 'Colon', + 'Cortex', + 'Gastrocnemius', + 'Heart', + 'Hippocampus', + 'Hypothalamus', + 'Kidney', + 'Liver', + 'Lung', + 'Ovaries', + 'Plasma', + 'Small Intestine', + 'Spleen', + 'Testes', + 'Vastus Lateralis', + 'Vena Cava', + 'White Adipose', + ], + pass1a_06: [ + 'Adrenal', + 'Aorta', + 'Blood RNA', + 'Brown Adipose', + 'Colon', + 'Cortex', + 'Gastrocnemius', + 'Heart', + 'Hippocampus', + 'Hypothalamus', + 'Kidney', + 'Liver', + 'Lung', + 'Ovaries', + 'Plasma', + 'Small Intestine', + 'Spleen', + 'Testes', + 'Tibia', + 'Vastus Lateralis', + 'White Adipose', + ], + human_sed_adu: ['Adipose', 'Blood', 'Muscle', 'PBMC'], +}; -export const tissueList = tissues.sort((a, b) => - a.toLowerCase().localeCompare(b.toLowerCase()) -); +export const omes = { + pass1b_06: [ + 'Epigenomics', + 'Metabolomics Targeted', + 'Metabolomics Untargeted', + 'Proteomics Targeted', + 'Proteomics Untargeted', + 'Transcriptomics', + ], + pass1a_06: [ + 'Epigenomics', + 'Metabolomics Targeted', + 'Metabolomics Untargeted', + 'Proteomics Untargeted', + 'Transcriptomics', + ], + human_sed_adu: [ + 'Epigenomics', + 'Metabolomics Targeted', + 'Metabolomics Untargeted', + 'Proteomics', + 'Transcriptomics', + ], +}; const browseDataFilters = [ - { - keyName: 'study', - name: 'Intervention', - filters: ['Acute Exercise', 'Endurance Training'], - }, { keyName: 'tissue_name', name: 'Tissue', - filters: tissueList, + filters: tissues, }, { keyName: 'omics', From c8fde5a3fea0b3f71b862953448ec688eb1f9e77 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 19:06:29 -0700 Subject: [PATCH 10/62] Added actions, states and reducer cases to support updated data download page UIs --- src/BrowseDataPage/browseDataActions.js | 27 +++++++++++++++++++++++++ src/BrowseDataPage/browseDataReducer.js | 24 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/src/BrowseDataPage/browseDataActions.js b/src/BrowseDataPage/browseDataActions.js index f7a08c7f..ab4feab8 100644 --- a/src/BrowseDataPage/browseDataActions.js +++ b/src/BrowseDataPage/browseDataActions.js @@ -18,6 +18,9 @@ const DATA_FETCH_REQUESTED = 'DATA_FETCH_REQUESTED'; const DATA_FETCH_SUCCESS = 'DATA_FETCH_SUCCESS'; const DATA_FETCH_FAILURE = 'DATA_FETCH_FAILURE'; const RESET_BROWSE_STATE = 'RESET_BROWSE_STATE'; +const SELECT_PASS1B_06_DATA = 'SELECT_PASS1B_06_DATA'; +const SELECT_PASS1A_06_DATA = 'SELECT_PASS1A_06_DATA'; +const SELECT_HUMAN_PRECOVID_SED_ADU_DATA = 'SELECT_HUMAN_PRECOVID_SED_ADU_DATA'; export const types = { CHANGE_FILTER, @@ -37,6 +40,9 @@ export const types = { DATA_FETCH_SUCCESS, DATA_FETCH_FAILURE, RESET_BROWSE_STATE, + SELECT_PASS1B_06_DATA, + SELECT_PASS1A_06_DATA, + SELECT_HUMAN_PRECOVID_SED_ADU_DATA, }; function changeFilter(category, filter) { @@ -154,6 +160,24 @@ function resetBrowseState() { }; } +function selectPass1B06Data() { + return { + type: SELECT_PASS1B_06_DATA, + }; +} + +function selectPass1A06Data() { + return { + type: SELECT_PASS1A_06_DATA, + }; +} + +function selectHumanPreCovidSedAduData() { + return { + type: SELECT_HUMAN_PRECOVID_SED_ADU_DATA, + }; +} + // Mock Async Getting List const files = []; @@ -330,6 +354,9 @@ const actions = { handleDownloadRequest, handleDataFetch, resetBrowseState, + selectPass1B06Data, + selectPass1A06Data, + selectHumanPreCovidSedAduData, }; export default actions; diff --git a/src/BrowseDataPage/browseDataReducer.js b/src/BrowseDataPage/browseDataReducer.js index 6bdb975c..9857956d 100644 --- a/src/BrowseDataPage/browseDataReducer.js +++ b/src/BrowseDataPage/browseDataReducer.js @@ -20,6 +20,9 @@ export const defaultBrowseDataState = { waitingForResponse: false, fetching: false, error: '', + pass1b06DataSelected: false, + pass1a06DataSelected: false, + humanPrecovidSedAduDataSelected: false, }; function createSorter(sortBy) { @@ -266,6 +269,27 @@ function browseDataReducer(state = defaultBrowseDataState, action) { error: '', }; } + case types.SELECT_PASS1B_06_DATA: + return { + ...state, + pass1b06DataSelected: true, + pass1a06DataSelected: false, + humanPrecovidSedAduDataSelected: false, + }; + case types.SELECT_PASS1A_06_DATA: + return { + ...state, + pass1b06DataSelected: false, + pass1a06DataSelected: true, + humanPrecovidSedAduDataSelected: false, + }; + case types.SELECT_HUMAN_PRECOVID_SED_ADU_DATA: + return { + ...state, + pass1b06DataSelected: false, + pass1a06DataSelected: false, + humanPrecovidSedAduDataSelected: true, + }; case types.RESET_BROWSE_STATE: return defaultBrowseDataState; default: From 413ebd5ab9ad67bad90ea2f64eab88818577363f Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 19:09:14 -0700 Subject: [PATCH 11/62] Expanded bundled datasets support pass1a-06 and human-precovid-sed-adu --- .../components/bundleDataTypes.js | 406 +++++++++++------- 1 file changed, 255 insertions(+), 151 deletions(-) diff --git a/src/BrowseDataPage/components/bundleDataTypes.js b/src/BrowseDataPage/components/bundleDataTypes.js index f820d5de..a8f8abac 100644 --- a/src/BrowseDataPage/components/bundleDataTypes.js +++ b/src/BrowseDataPage/components/bundleDataTypes.js @@ -1,153 +1,257 @@ -const BundleDataTypes = [ - { - type: 'phenotype', - phase: 'pass1b-06', - title: 'Phenotype', - description: - 'Phenotypic data from young adult rats (6-month old) that performed the endurance exercise training.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_phenotype.zip', - object_zipfile_size: '617.78 KB', - }, - { - type: 'transcriptomics', - phase: 'pass1b-06', - title: 'Transcriptomics', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across tissues for RNA-seq.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_transcriptomics.zip', - object_zipfile_size: '540.44 MB', - }, - { - type: 'metabolomics-targeted', - phase: 'pass1b-06', - title: 'Metabolomics-targeted', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across tissues for metabolomics-targeted assays.', - object_zipfile: - 'pass1b-06/bundles/motrpac_pass1b-06_metabolomics-targeted.zip', - object_zipfile_size: '27.58 MB', - }, - { - type: 'metabolomics-untargeted', - phase: 'pass1b-06', - title: 'Metabolomics-untargeted', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across tissues for metabolomics-untargeted assays.', - object_zipfile: - 'pass1b-06/bundles/motrpac_pass1b-06_metabolomics-untargeted.zip', - object_zipfile_size: '272.42 MB', - }, - { - type: 'proteomics-untargeted', - phase: 'pass1b-06', - title: 'Proteomics-untargeted', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across tissues for the Acetyl Proteomics, Global Proteomics, Phosphoproteomics, and Protein Ubiquitination.', - object_zipfile: - 'pass1b-06/bundles/motrpac_pass1b-06_proteomics-untargeted.zip', - object_zipfile_size: '975.70 MB', - }, - { - type: 'proteomics-targeted', - phase: 'pass1b-06', - title: 'Proteomics-targeted', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across tissues for immunoassay.', - object_zipfile: - 'pass1b-06/bundles/motrpac_pass1b-06_proteomics-targeted.zip', - object_zipfile_size: '12.06 MB', - }, - { - type: 'tissue-gastrocnemius', - phase: 'pass1b-06', - title: 'Gastrocnemius', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for gastrocnemius.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_gastrocnemius.zip', - object_zipfile_size: '151.41 MB', - }, - { - type: 'tissue-heart', - phase: 'pass1b-06', - title: 'Heart', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for heart.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_heart.zip', - object_zipfile_size: '187.387 MB', - }, - { - type: 'tissue-liver', - phase: 'pass1b-06', - title: 'Liver', - description: - 'Analyses, sample-level metadata, QC and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for liver.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_liver.zip', - object_zipfile_size: '214.00 MB', - }, - { - type: 'tissue-lung', - phase: 'pass1b-06', - title: 'Lung', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for lung.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_lung.zip', - object_zipfile_size: '242.33 MB', - }, - { - type: 'tissue-kidney', - phase: 'pass1b-06', - title: 'Kidney', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for kidney.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_kidney.zip', - object_zipfile_size: '179.62 MB', - }, - { - type: 'tissue-brown-adipose', - phase: 'pass1b-06', - title: 'Brown adipose', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for brown adipose.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_brown-adipose.zip', - object_zipfile_size: '57.99 MB', - }, - { - type: 'tissue-white-adipose', - phase: 'pass1b-06', - title: 'White adipose', - description: - 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for white adipose.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_white-adipose.zip', - object_zipfile_size: '189.69 MB', - }, - { - type: 'tissue-blood-rna', - phase: 'pass1b-06', - title: 'Blood RNA', - description: - 'Analyses, sample-level metadata, QC, and quantitative results in RNA-seq for blood RNA.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_blood.zip', - object_zipfile_size: '17.93 MB', - }, - { - type: 'tissue-plasma', - phase: 'pass1b-06', - title: 'Plasma', - description: - 'Analyses, sample-level metadata, QC, and quantitative results in targeted/untargeted metabolomics and immunoassay for plasma.', - object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_plasma.zip', - object_zipfile_size: '53.58 MB', - }, - { - type: 'misc-analysis-resources', - phase: 'pass1b-06', - title: 'Miscellaneous analysis resources', - description: - 'Miscellaneous resource files for R objects used in the data analysis of young adult rats performing endurance exercise training.', - object_zipfile: - 'pass1b-06/bundles/motrpac_pass1b-06_misc-analysis-resources.zip', - object_zipfile_size: '166.93 MB', - }, -]; +const BundleDataTypes = { + pass1b_06: [ + { + type: 'phenotype', + phase: 'pass1b-06', + title: 'Phenotype', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Phenotypic data from young adult rats (6-month old) that performed the endurance exercise training.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_phenotype.zip', + object_zipfile_size: '617.78 KB', + }, + { + type: 'transcriptomics', + phase: 'pass1b-06', + title: 'Transcriptomics', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across tissues for RNA-seq.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_transcriptomics.zip', + object_zipfile_size: '540.44 MB', + }, + { + type: 'metabolomics-targeted', + phase: 'pass1b-06', + title: 'Metabolomics-targeted', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across tissues for metabolomics-targeted assays.', + object_zipfile: + 'pass1b-06/bundles/motrpac_pass1b-06_metabolomics-targeted.zip', + object_zipfile_size: '27.58 MB', + }, + { + type: 'metabolomics-untargeted', + phase: 'pass1b-06', + title: 'Metabolomics-untargeted', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across tissues for metabolomics-untargeted assays.', + object_zipfile: + 'pass1b-06/bundles/motrpac_pass1b-06_metabolomics-untargeted.zip', + object_zipfile_size: '272.42 MB', + }, + { + type: 'proteomics-untargeted', + phase: 'pass1b-06', + title: 'Proteomics-untargeted', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across tissues for the Acetyl Proteomics, Global Proteomics, Phosphoproteomics, and Protein Ubiquitination.', + object_zipfile: + 'pass1b-06/bundles/motrpac_pass1b-06_proteomics-untargeted.zip', + object_zipfile_size: '975.70 MB', + }, + { + type: 'proteomics-targeted', + phase: 'pass1b-06', + title: 'Proteomics-targeted', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across tissues for immunoassay.', + object_zipfile: + 'pass1b-06/bundles/motrpac_pass1b-06_proteomics-targeted.zip', + object_zipfile_size: '12.06 MB', + }, + { + type: 'tissue-gastrocnemius', + phase: 'pass1b-06', + title: 'Gastrocnemius', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for gastrocnemius.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_gastrocnemius.zip', + object_zipfile_size: '151.41 MB', + }, + { + type: 'tissue-heart', + phase: 'pass1b-06', + title: 'Heart', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for heart.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_heart.zip', + object_zipfile_size: '187.387 MB', + }, + { + type: 'tissue-liver', + phase: 'pass1b-06', + title: 'Liver', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for liver.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_liver.zip', + object_zipfile_size: '214.00 MB', + }, + { + type: 'tissue-lung', + phase: 'pass1b-06', + title: 'Lung', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for lung.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_lung.zip', + object_zipfile_size: '242.33 MB', + }, + { + type: 'tissue-kidney', + phase: 'pass1b-06', + title: 'Kidney', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for kidney.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_kidney.zip', + object_zipfile_size: '179.62 MB', + }, + { + type: 'tissue-brown-adipose', + phase: 'pass1b-06', + title: 'Brown adipose', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for brown adipose.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_brown-adipose.zip', + object_zipfile_size: '57.99 MB', + }, + { + type: 'tissue-white-adipose', + phase: 'pass1b-06', + title: 'White adipose', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across omes/assays, except epigenomics (e.g. ATAC-seq, RRBS), for white adipose.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_white-adipose.zip', + object_zipfile_size: '189.69 MB', + }, + { + type: 'tissue-blood-rna', + phase: 'pass1b-06', + title: 'Blood RNA', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results in RNA-seq for blood RNA.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_blood.zip', + object_zipfile_size: '17.93 MB', + }, + { + type: 'tissue-plasma', + phase: 'pass1b-06', + title: 'Plasma', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Analyses, sample-level metadata, QC, and quantitative results in targeted/untargeted metabolomics and immunoassay for plasma.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_plasma.zip', + object_zipfile_size: '53.58 MB', + }, + { + type: 'misc-analysis-resources', + phase: 'pass1b-06', + title: 'Miscellaneous analysis resources', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Endurance Training', + description: + 'Miscellaneous resource files for R objects used in the data analysis of young adult rats performing endurance exercise training.', + object_zipfile: + 'pass1b-06/bundles/motrpac_pass1b-06_misc-analysis-resources.zip', + object_zipfile_size: '166.93 MB', + }, + ], + pass1a_06: [ + { + type: 'phenotype', + phase: 'pass1a-06', + title: 'Phenotype', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Acute Exercise', + description: + 'Phenotypic data from young adult rats (6-month old) that performed the endurance exercise training.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_phenotype.zip', + object_zipfile_size: '617.78 KB', + }, + { + type: 'transcriptomics', + phase: 'pass1a-06', + title: 'Transcriptomics', + species: 'Rat', + participant_type: 'Young Adult', + intervention: 'Acute Exercise', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across tissues for RNA-seq.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_transcriptomics.zip', + object_zipfile_size: '540.44 MB', + }, + ], + human_sed_adu: [ + { + type: 'phenotype', + phase: 'human-precovid-sed-adu', + title: 'Phenotype', + species: 'Human', + participant_type: 'Adult', + intervention: 'Sedentary', + study_group: 'Pre-COVID', + description: + 'Phenotypic data from young adult rats (6-month old) that performed the endurance exercise training.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_phenotype.zip', + object_zipfile_size: '617.78 KB', + }, + { + type: 'transcriptomics', + phase: 'human-precovid-sed-adu', + title: 'Transcriptomics', + species: 'Human', + participant_type: 'Adult', + intervention: 'Sedentary', + study_group: 'Pre-COVID', + description: + 'Analyses, sample-level metadata, QC, and quantitative results across tissues for RNA-seq.', + object_zipfile: 'pass1b-06/bundles/motrpac_pass1b-06_transcriptomics.zip', + object_zipfile_size: '540.44 MB', + }, + ], +}; export default BundleDataTypes; From 08ef8a9b33521ed685feb575338f88e0c7a1c6d6 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 19:12:09 -0700 Subject: [PATCH 12/62] Updated bundled data download button appearance due to Ui changes --- .../components/bundleDownloadButton.jsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/BrowseDataPage/components/bundleDownloadButton.jsx b/src/BrowseDataPage/components/bundleDownloadButton.jsx index d170b5c1..55d462e9 100644 --- a/src/BrowseDataPage/components/bundleDownloadButton.jsx +++ b/src/BrowseDataPage/components/bundleDownloadButton.jsx @@ -7,6 +7,7 @@ import { trackEvent } from '../../GoogleAnalytics/googleAnalytics'; function BundleDownloadButton({ bundlefile, + bundlefileSize, profile, handleUserSurveyOpenOnBundledDownload, }) { @@ -129,15 +130,17 @@ function BundleDownloadButton({ return ( ); } @@ -164,6 +167,7 @@ function BundleDownloadButton({ BundleDownloadButton.propTypes = { bundlefile: PropTypes.string.isRequired, + bundlefileSize: PropTypes.string.isRequired, profile: PropTypes.shape({ userid: PropTypes.string, user_metadata: PropTypes.shape({ From c38c6cf43f567616552d29f60239d66f85405c81 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 19:22:28 -0700 Subject: [PATCH 13/62] Transformed human tissue names to super class names --- src/BrowseDataPage/helper.jsx | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/BrowseDataPage/helper.jsx b/src/BrowseDataPage/helper.jsx index cfb731a7..62a3d0f2 100644 --- a/src/BrowseDataPage/helper.jsx +++ b/src/BrowseDataPage/helper.jsx @@ -251,6 +251,43 @@ export const transformData = (arr) => { item.assay = newMetabAssayVal; } } + if (item.tissue_name !== null && item.tissue_name !== undefined) { + let newTissueVal = item.tissue_name; + if ( + newTissueVal.indexOf('Human EDTA Plasma') !== -1 || + newTissueVal.indexOf('Human EDTA Packed Cells') !== -1 || + newTissueVal.indexOf('Human PAXgene RNA') !== -1 + ) { + newTissueVal = 'Blood'; + item.tissue_name = newTissueVal; + } + if ( + newTissueVal.indexOf('Human Adipose') !== -1 || + newTissueVal.indexOf('Human Adipose Powder') !== -1 + ) { + newTissueVal = 'Adipose'; + item.tissue_name = newTissueVal; + } + if ( + newTissueVal.indexOf('Human Muscle') !== -1 || + newTissueVal.indexOf('Human Muscle Powder') !== -1 + ) { + newTissueVal = 'Muscle'; + item.tissue_name = newTissueVal; + } + if (newTissueVal.indexOf('Human PBMC') !== -1) { + newTissueVal = 'PBMC'; + item.tissue_name = newTissueVal; + } + if ( + newTissueVal.indexOf('EDTA Plasma') !== -1 && + item.omics.indexOf('Metabolomics') !== -1 && + item.study.indexOf('Acute Exercise') !== -1 + ) { + newTissueVal = 'Plasma'; + item.tissue_name = newTissueVal; + } + } }); return tranformArray; }; From 38b641e5253da21e0b376d365feb8ce095065e3a Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 19:23:41 -0700 Subject: [PATCH 14/62] Added styles for new data download page Uis --- src/sass/browseData/_browseData.scss | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/sass/browseData/_browseData.scss b/src/sass/browseData/_browseData.scss index 539561ee..6d73b184 100644 --- a/src/sass/browseData/_browseData.scss +++ b/src/sass/browseData/_browseData.scss @@ -30,6 +30,34 @@ font-size: 5.0rem; } } + + .bundle-datasets-item { + .card { + .card-footer { + background-color: #fff; + border-top: none; + } + } + } + } + + .selective-data-downloads-card { + .card-header { + .material-icons { + font-size: 1.85rem; + } + } + + &.external-access { + max-width: 22rem; + } + } + + .data-download-selective-files { + .nav.nav-tabs { + margin-left: 15px; + margin-right: 15px; + } } label { From 9f2d6a69c0531f35030d7d1bbc7309c3817a3288 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 19:33:02 -0700 Subject: [PATCH 15/62] Restructured components due to data download page UI changes --- src/BrowseDataPage/browseDataPage.jsx | 81 ++++++++------------------- 1 file changed, 22 insertions(+), 59 deletions(-) diff --git a/src/BrowseDataPage/browseDataPage.jsx b/src/BrowseDataPage/browseDataPage.jsx index 04de8ed3..34488d40 100644 --- a/src/BrowseDataPage/browseDataPage.jsx +++ b/src/BrowseDataPage/browseDataPage.jsx @@ -1,17 +1,12 @@ import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import { Link } from 'react-router-dom'; import { Helmet } from 'react-helmet'; -import PageTitle from '../lib/ui/pageTitle'; -import BrowseDataTable from './browseDataTable'; import actions from './browseDataActions'; import BrowseDataFilter from './browseDataFilter'; -import BootstrapSpinner from '../lib/ui/spinner'; -import OpenAccessBrowseDataSummary from './components/openAccessSummary'; -import AuthAccessBrowseDataSummary from './components/authAccessSummary'; import dataDownloadStructuredData from '../lib/searchStructuredData/dataDownload'; import UserSurveyModal from '../UserSurvey/userSurveyModal'; +import DataDownloadsMain from './components/dataDownloadsMain'; export function BrowseDataPage({ profile, @@ -26,9 +21,6 @@ export function BrowseDataPage({ showUserSurveyModal, surveyId, }) { - // anonymous user or authenticated user - const userType = profile.user_metadata && profile.user_metadata.userType; - useEffect(() => { if (showUserSurveyModal) { const userSurveyModalRef = document.querySelector('body'); @@ -45,58 +37,29 @@ export function BrowseDataPage({ {JSON.stringify(dataDownloadStructuredData)} - + - {!userType || (userType && userType === 'external') ? ( - - ) : null} - {userType && userType === 'internal' ? ( - - ) : null} -
    - - {fetching && ( -
    - -
    - )} - {!fetching && !filteredFiles.length && ( -
    -

    - - No matches found for the selected filters. Please refer to the{' '} - Summary Table for data that are - available. - -

    -
    - )} - {!fetching && filteredFiles.length && ( - - )} - -
    ); } From fc3b597d91355b605251b5ff921b208408bd3555 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Sun, 21 Apr 2024 19:34:11 -0700 Subject: [PATCH 16/62] Added new route for data download file browser --- src/App/App.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/App/App.jsx b/src/App/App.jsx index e5bd5c69..f2059f48 100644 --- a/src/App/App.jsx +++ b/src/App/App.jsx @@ -95,6 +95,12 @@ function App({ history = History }) { /> + Date: Sun, 21 Apr 2024 23:24:14 -0700 Subject: [PATCH 17/62] Update appearances of bundled data download button's various states --- .../components/bundleDownloadButton.jsx | 11 ++++++----- src/sass/browseData/_browseData.scss | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/BrowseDataPage/components/bundleDownloadButton.jsx b/src/BrowseDataPage/components/bundleDownloadButton.jsx index 55d462e9..a0667e01 100644 --- a/src/BrowseDataPage/components/bundleDownloadButton.jsx +++ b/src/BrowseDataPage/components/bundleDownloadButton.jsx @@ -76,16 +76,17 @@ function BundleDownloadButton({ return ( ); } @@ -96,7 +97,7 @@ function BundleDownloadButton({ handleFileDownload(file, e)} > @@ -110,7 +111,7 @@ function BundleDownloadButton({ return (
    {/* Additional data information */} - -
    -
    -

    Additional Information

    -

    - The currently available young adult rats experimental data for - acute exercise and endurance training include all tissues and - assays from the very last consortium data release, as well as - additional tissues and assays made available afterwards. The - phenotypic data sets have also been updated since then. -

    -

    - Please refer to this{' '} - - README - description - {' '} - document for the data included in the very last consortium data - release. -

    -
    -
    + {userType && userType === 'internal' ? ( + <> + +
    +
    +

    Additional Information

    +

    + The currently available young adult rats experimental data for + acute exercise and endurance training include all tissues and + assays from the very last consortium data release, as well as + additional tissues and assays made available afterwards. The + phenotypic data sets have also been updated since then. +

    +

    + Please refer to this{' '} + + README + + description + + {' '} + document for the data included in the very last consortium + data release. +

    +
    +
    + + ) : ( + + )} ); From 77affee9625015c602c1fd3d0a589abb0dea68d7 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 23 Apr 2024 01:06:57 -0700 Subject: [PATCH 23/62] Direct users to the online contact form instead of sending emails for data requests --- src/BrowseDataPage/components/dataTypeInfo.jsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/BrowseDataPage/components/dataTypeInfo.jsx b/src/BrowseDataPage/components/dataTypeInfo.jsx index 4cafaf3b..fe288f74 100644 --- a/src/BrowseDataPage/components/dataTypeInfo.jsx +++ b/src/BrowseDataPage/components/dataTypeInfo.jsx @@ -34,13 +34,10 @@ function DataTypeInfo({ grid }) {

    Note: Raw files are not currently available for direct download through the Data Hub portal. - Please submit your requests to{' '} - {' '} - and specify the relevant tissues/assays if you would like to get - access to the raw files. + Please{' '} + submit your requests to our helpdesk and + specify the relevant tissues/assays if you would like to get access + to the raw files.

    From ace16e061f67e0157922737a7ad06e896b7854f7 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Wed, 24 Apr 2024 15:32:14 -0700 Subject: [PATCH 24/62] Remove unneeded func prop being passed to child component --- src/BrowseDataPage/components/bundleDatasets.jsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/BrowseDataPage/components/bundleDatasets.jsx b/src/BrowseDataPage/components/bundleDatasets.jsx index 4ef079c6..888f70ac 100644 --- a/src/BrowseDataPage/components/bundleDatasets.jsx +++ b/src/BrowseDataPage/components/bundleDatasets.jsx @@ -2,12 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import BundleDownloadButton from './bundleDownloadButton'; -function BundleDatasets({ - profile, - bundleDatasets, - tagColor, - handleUserSurveyOpenOnBundledDownload, -}) { +function BundleDatasets({ profile, bundleDatasets, tagColor }) { return (
    {bundleDatasets.map((item) => { @@ -42,9 +37,6 @@ function BundleDatasets({ bundlefile={item.object_zipfile} bundlefileSize={item.object_zipfile_size} profile={profile} - handleUserSurveyOpenOnBundledDownload={ - handleUserSurveyOpenOnBundledDownload - } />
    @@ -65,12 +57,10 @@ BundleDatasets.propTypes = { }), bundleDatasets: PropTypes.arrayOf(PropTypes.shape({})).isRequired, tagColor: PropTypes.string.isRequired, - handleUserSurveyOpenOnBundledDownload: PropTypes.func, }; BundleDatasets.defaultProps = { profile: {}, - handleUserSurveyOpenOnBundledDownload: null, }; export default BundleDatasets; From 90c162eb0287bfa3d9b39bfc6792e61e8065875f Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Wed, 24 Apr 2024 20:21:54 -0700 Subject: [PATCH 25/62] Update page overview description and data select card body content --- .../components/dataDownloadsMain.jsx | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/BrowseDataPage/components/dataDownloadsMain.jsx b/src/BrowseDataPage/components/dataDownloadsMain.jsx index 694e6799..0443b9af 100644 --- a/src/BrowseDataPage/components/dataDownloadsMain.jsx +++ b/src/BrowseDataPage/components/dataDownloadsMain.jsx @@ -52,11 +52,16 @@ function DataDownloadsMain({

    - Browse and download the rat{' '} - {userType && userType === 'internal' && 'or human '}study data - consisting of both quantitative results and analyses that defining - the molecular changes that occur with training and exercise across - tissues. + Explore and download the MoTrPAC multi-omics datasets, which + includes quantitative results and analyses of molecular changes from + exercise across tissues. Currently, the complete young rat endurance + training dataset is publicly available.{' '} + {userType && userType === 'internal' + ? 'The young rat acute exercise and human precovid sedentary adult datasets are currently available to consortium members only in the early preview phase. ' + : null} + For a summary of all the ongoing studies in MoTrPAC (data available + soon), please visit our{' '} + Project Overview.

    Learn more about MoTrPAC studies: @@ -102,10 +107,10 @@ function DataDownloadsMain({ Endurance Training
      -
    • Total of 60 male and female animals
    • +
    • Male and female animals
    • 20 tissues
    • 29 assays across different omes
    • -
    • 4 time points
    • +
    • 5 time points
    {/* pass1a/1c-06 data set */} @@ -118,7 +123,7 @@ function DataDownloadsMain({ >

    Acute Exercise

      -
    • Total of 70 male and female animals
    • +
    • Male and female animals
    • 21 tissues
    • 30 assays across different omes
    • 7 time points
    • @@ -139,7 +144,7 @@ function DataDownloadsMain({ Pre-COVID Sedentary
        -
      • 175 adult participants
      • +
      • Adult participants
      • 4 tissues
      • 22 assays across different omes
      • Acute exercise
      • From 13b9f723d55e9bf405f19e3f7ded321364e30438 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Wed, 24 Apr 2024 20:23:45 -0700 Subject: [PATCH 26/62] Add left/right padding to modal buttons --- src/BrowseDataPage/components/openAccessModal.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BrowseDataPage/components/openAccessModal.jsx b/src/BrowseDataPage/components/openAccessModal.jsx index 8c9c2a34..45a276f0 100644 --- a/src/BrowseDataPage/components/openAccessModal.jsx +++ b/src/BrowseDataPage/components/openAccessModal.jsx @@ -80,7 +80,7 @@ function OpenAccessFileDownloadModal({
      + {/* tab panes */} +
      +
      + +
      +
      + +
    diff --git a/src/MultiOmicsWorkingGroups/preCAWG.jsx b/src/MultiOmicsWorkingGroups/preCAWG.jsx new file mode 100644 index 00000000..25953f7c --- /dev/null +++ b/src/MultiOmicsWorkingGroups/preCAWG.jsx @@ -0,0 +1,54 @@ +import React from 'react'; + +function PreCAWG() { + return ( +
    +

    + PRE-CAWG: PRE-COVID Analysis Working Group +

    +

    + Processed PreCAWG data are set for internal dissemination of the first + freeze. +

    +
      +
    • + Internal freeze notes for full details on the internal freeze and + steps for onboarding to work with the PreCAWG are available{' '} + + this Google Doc + +
    • +
    • + Source code is available in{' '} + + this GitHub repository + +
    • +
    • + Data processing methods are available in{' '} + + this Google Drive folder + +
    • +
    • + Raw clinical data is available in the motrpac-data-hub bucket:{' '} + gs://motrpac-data-hub/human-precovid/phenotype/raw/ +
    • +
    +
    + ); +} + +export default PreCAWG; From 30079cd19093e609d9e5d48f2ae8c4944ac98873 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Wed, 24 Apr 2024 23:36:15 -0700 Subject: [PATCH 31/62] Initial commit of new SVG icons --- src/assets/icons/github.svg | 12 ++++++++++ src/assets/icons/google-cloud.svg | 30 +++++++++++++++++++++++ src/assets/icons/google-drive.svg | 40 +++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 src/assets/icons/github.svg create mode 100644 src/assets/icons/google-cloud.svg create mode 100644 src/assets/icons/google-drive.svg diff --git a/src/assets/icons/github.svg b/src/assets/icons/github.svg new file mode 100644 index 00000000..ccdc8f44 --- /dev/null +++ b/src/assets/icons/github.svg @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/google-cloud.svg b/src/assets/icons/google-cloud.svg new file mode 100644 index 00000000..3921c81e --- /dev/null +++ b/src/assets/icons/google-cloud.svg @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/google-drive.svg b/src/assets/icons/google-drive.svg new file mode 100644 index 00000000..c361c154 --- /dev/null +++ b/src/assets/icons/google-drive.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + \ No newline at end of file From d18ed0aa9d0419ececc49664934e8d374e9fa082 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Wed, 24 Apr 2024 23:36:59 -0700 Subject: [PATCH 32/62] Add sass module for multi-omics working group page styling --- src/sass/_multiOmicsWorkingGroups.scss | 33 ++++++++++++++++++++++++++ src/sass/main.scss | 1 + 2 files changed, 34 insertions(+) create mode 100644 src/sass/_multiOmicsWorkingGroups.scss diff --git a/src/sass/_multiOmicsWorkingGroups.scss b/src/sass/_multiOmicsWorkingGroups.scss new file mode 100644 index 00000000..acd1d406 --- /dev/null +++ b/src/sass/_multiOmicsWorkingGroups.scss @@ -0,0 +1,33 @@ +.multiOmicsWorkingGroupsPage { + .multi-omics-wg-tab-content { + .pre-cawg { + .resources-table { + th { + text-align: center; + width: 33.33%; + } + + td { + text-align: center; + vertical-align: top; + + img { + width: 6.0em; + } + } + } + + .release-notes-table { + td { + dl { + dt { + float: left; + clear: left; + margin-right: 0.5rem; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/sass/main.scss b/src/sass/main.scss index 4c1cac94..56a3c12d 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -37,3 +37,4 @@ @import 'codeRepo/all'; @import 'mainStudy/all'; @import 'publications'; +@import 'multiOmicsWorkingGroups'; From 0f7bdb14c001169c077809ad08f44e87bb0c4c88 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Wed, 24 Apr 2024 23:37:20 -0700 Subject: [PATCH 33/62] Add new svg icons --- src/lib/iconSet.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/iconSet.js b/src/lib/iconSet.js index 3a3e64c0..70321835 100644 --- a/src/lib/iconSet.js +++ b/src/lib/iconSet.js @@ -15,6 +15,9 @@ import Archive from '../assets/icons/archive.png'; import InternalDataRelease from '../assets/icons/data-release-internal.png'; import ArrowRightAnimated from '../assets/icons/arrow-right-animated.svg'; import ArrowDownAnimated from '../assets/icons/arrow-down-animated.svg'; +import GitHub from '../assets/icons/github.svg'; +import GoogleCloud from '../assets/icons/google-cloud.svg'; +import GoogleDrive from '../assets/icons/google-drive.svg'; const IconSet = { Clinic, @@ -34,6 +37,9 @@ const IconSet = { InternalDataRelease, ArrowRightAnimated, ArrowDownAnimated, + GitHub, + GoogleCloud, + GoogleDrive, }; export default IconSet; From 2471ac6b45dd15b26566a14eea423a135131ce7c Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Wed, 24 Apr 2024 23:37:53 -0700 Subject: [PATCH 34/62] Populate pre-cawg section content --- src/MultiOmicsWorkingGroups/preCAWG.jsx | 224 +++++++++++++++++++----- 1 file changed, 182 insertions(+), 42 deletions(-) diff --git a/src/MultiOmicsWorkingGroups/preCAWG.jsx b/src/MultiOmicsWorkingGroups/preCAWG.jsx index 25953f7c..16cca0f9 100644 --- a/src/MultiOmicsWorkingGroups/preCAWG.jsx +++ b/src/MultiOmicsWorkingGroups/preCAWG.jsx @@ -1,52 +1,192 @@ import React from 'react'; +import { Link } from 'react-router-dom'; +import IconSet from '../lib/iconSet'; function PreCAWG() { return (
    -

    - PRE-CAWG: PRE-COVID Analysis Working Group -

    +

    PRE-CAWG: PRE-COVID Analysis Working Group

    +
    MoTrPAC Data Package: human-precovid-sed-adu
    + +
    2024APR01 Freeze 1.1 Release Notes
    + + + + + + + +
    +
    +
    Data package nickname:
    +
    human-precovid-sed-adu
    +
    Type:
    +
    Freeze
    +
    Distribution date:
    +
    04/01/2024 (Release)
    +
    Organism:
    +
    Human
    +
    Internal Batch:
    +
    Precovid
    +
    Baseline activity level:
    +
    Sedentary
    +
    +
    +
    +
    Age:
    +
    Adults
    +
    Modality:
    +
    resistance and endurance
    +
    Exercise duration:
    +
    acute and chronic
    +
    Freeze version:
    +
    1.1
    +
    DMAQC CRF Version:
    +
    1.06
    +
    +
    +
    Data Access
    +
    Programmatic Access via Google Cloud

    - Processed PreCAWG data are set for internal dissemination of the first - freeze. + With this release, internal data access is preferred via the beta + version of a custom R package created by Christopher Jin called{' '} + + MotrpacHumanPreSuspension + + . Using this approach ensures seamless updates for any backend changes + to the data. Please review the README associated with GitHub repo to get + started and ask for help from Christopher Jin or Dan Katz (best contact + via the help desk at{' '} + + motrpac-helpdesk@lists.stanford.edu + + ) if needed. +

    +

    + As before, data can also be accessed in the following ways + programmatically: +

      +
    • + From the command line using the{' '} + + Google Cloud Command Line + {' '} + Interface +
    • +
    • + From a BIC approved download function for R such as{' '} + load_adu_norm_data (currently available only in the + functions library of the precovid-analyses GitHub repo) or{' '} + MotrpacBicQC::dl_read_gcp (package{' '} + + here + + ). +
    • +
    +

    +

    All options still require Google Cloud Command Line Interface.

    +
    Download access
    +

    + Data will be available in early April 2024 for direct download from + MoTrPAC Data Hub.

    -
      -
    • - Internal freeze notes for full details on the internal freeze and - steps for onboarding to work with the PreCAWG are available{' '} - - this Google Doc - -
    • -
    • - Source code is available in{' '} - - this GitHub repository - -
    • -
    • - Data processing methods are available in{' '} - - this Google Drive folder - -
    • -
    • - Raw clinical data is available in the motrpac-data-hub bucket:{' '} - gs://motrpac-data-hub/human-precovid/phenotype/raw/ -
    • -
    ); } From be314d04e8a49b1a79a93cff81d7e27bdd56945a Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Fri, 26 Apr 2024 21:40:11 -0700 Subject: [PATCH 35/62] Populate pre-cawg section content with rest of release notes --- src/MultiOmicsWorkingGroups/preCAWG.jsx | 598 +++++++++++++++++++++++- src/sass/_multiOmicsWorkingGroups.scss | 4 + 2 files changed, 599 insertions(+), 3 deletions(-) diff --git a/src/MultiOmicsWorkingGroups/preCAWG.jsx b/src/MultiOmicsWorkingGroups/preCAWG.jsx index 16cca0f9..7a050090 100644 --- a/src/MultiOmicsWorkingGroups/preCAWG.jsx +++ b/src/MultiOmicsWorkingGroups/preCAWG.jsx @@ -88,6 +88,12 @@ function PreCAWG() {
    +
    + START HERE FOR ONBOARDING →{' '} + + Analysis Collaboration: Getting started step-by-step + +
    2024APR01 Freeze 1.1 Release Notes
    @@ -125,7 +131,7 @@ function PreCAWG() {
    -
    Data Access
    +
    Data Access
    Programmatic Access via Google Cloud

    With this release, internal data access is preferred via the beta @@ -150,7 +156,7 @@ function PreCAWG() { ) if needed.

    -

    +

    As before, data can also be accessed in the following ways programmatically:
      @@ -180,13 +186,599 @@ function PreCAWG() { ).
    -

    +

    All options still require Google Cloud Command Line Interface.

    Download access

    Data will be available in early April 2024 for direct download from MoTrPAC Data Hub.

    +
    Data Changes
    +
    Versioning
    +

    + Prior file names may have ended in “v1.txt” instead of the BIC standard + "v1.0.txt". This has been fixed. All files remain v1.0 as the underlying + standard methodology has not changed. +

    +
    QC-normalized data
    +

    + Metabolomics: during the soft release, data was scaled to{' '} + mean = 0, and sd = 1. To allow more + flexibility for analysts, this has been undone. The new version of the + data follows the following format example: +
    + + human-precovid-sed-adu_t11-adipose_metab-t-ka_qc-norm_log2_v1.0.txt + + which replaces: + + human-precovid-sed-adu_t11-adipose_metab-t-ka_qc-norm_log2-scaled_v1.txt + +

    +
    Differential analysis results
    +

    + With the release of Freeze 1, there are now differential analysis + results available. Data are for differences in changes during the acute + bout, comparing the change from pre-exercise baseline at any given + timepoint during the acute bout as compared to resting control. Results + are adjusted for age, sex, BMI, clinical site, and technical covariates. + Models are processed by variancePartition::dream to allow + for random effects models accounting for random effects of individuals. + Analytical details and methods are forthcoming. Note that files + containing these results have names annotated with “dream” to indicate + this model selection. +

    +

    + DA data location:{' '} + + gs://motrpac-data-hub/analysis/human-precovid-sed-adu/[ome]/da[ome] + {' '} + represents one of epigenomics, proteomics, metabolomics-targeted, + metabolomics-untargeted, or transcriptomics. +

    +
    Guidance
    +

    + Note that methyl-capture DA and QC-normalized data continues to be in + "beta" status. Consortium members may incorporate the data into analysis + pipelines, but please be aware that some results may change. +

    +
    2024FEB05 Soft Release
    + + + + + + + +
    +
    +
    Type:
    +
    Initial freeze
    +
    Distribution date:
    +
    02/05/2024 (Soft Release)
    +
    Organism:
    +
    Human
    +
    Internal Batch:
    +
    Precovid
    +
    Baseline activity level:
    +
    Sedentary
    +
    Age:
    +
    Adults
    +
    +
    +
    +
    Modality:
    +
    resistance and endurance
    +
    Exercise duration:
    +
    acute and chronic
    +
    Data package nickname:
    +
    human-precovid-sed-adu
    +
    Freeze version:
    +
    1.0
    +
    DMAQC CRF Version:
    +
    1.06
    +
    +
    +
    Data Notes
    +
      +
    • + The methyl capture pipeline has been developed collaboratively + BIC and the GET, and while data and metadata have been shared, the BIC + is in the final stages of validating the pipeline. Users can begin + working with the qc-normalized data, and we anticipate finalizing the + results, which might come with minor updates, in the coming weeks. +
    • +
    • + Individual level genomic data, per the genomic data sharing + plan, is considered high-risk data. As such, this data requires + additional permission to access. If you would like to work with whole + genome sequence data, please contact the BIC. +
    • +
    • + The curated biospecimens file is intended for analysts to be a + replacement for the EQC file. It has a many-to-one and one-to-many + relationship as needed between labelID, BID, pid, and vialLabel, + though any labelID-vialLabel pair should be unique. Users should be + aware that biospecimen data in this file is pertinent to the collected + sample, which is identified by the labelID. Some vialLabels, which go + off to chemical analysis, are sometimes made up of multiple combined + labelIDs. Thus, if using the biospecimens file to flag vialLabel + samples that might not meet the user's criteria, be aware only one of + the multiple labelIDs that are mixed into a vialLabel may violate a + specific biospecimen criterion. No samples have been removed from the + data package based on data from this table. Rather we have relied on + outlier analysis as described in the methods. +
    • +
    • All data sets are tab-separated .txt files.
    • +
    • + It is highly recommended that data is downloaded from Google Cloud in + one of two ways: +
        +
      • + From the command line using the{' '} + + Google Cloud Command Line + {' '} + Interface +
      • +
      • + From a BIC approved download function for R such as{' '} + load_adu_norm_data (currently available only in the + functions library of the precovid-analyses GitHub repo) or{' '} + MotrpacBicQC::dl_read_gcp (package{' '} + + here + + ). Both options still require Google Cloud Command Line Interface. +
      • +
      +
    • +
    +
    Data
    +
    Omics
    +

    + Omics data are available in both raw and QC-normalized format. The + QC-normalized data is preferred for analysis, as these data are the + result of consortium consensus imputation, normalization, batch + correction, and outlier removal decisions.{' '} + + Please note + {' '} + that in regard to raw and analyzed data “human precovid” means slightly + different things, as the precovid phase of clinical participation and + multi-omic measurement did include PED and HA participants, but these + are excluded from this analytical freeze.{' '} + Any reanalysis of the raw data must exclude these participants. +

    +

    + Raw results data location:{' '} + gs://motrpac-data-hub/human-precovid/results/ +

    +

    + QC-normalized data location:{' '} + + gs://motrpac-data-hub/analysis/human-precovid-sed-adu/[ome]/qc-norm*[ome] + {' '} + represents one of epigenomics, proteomics, metabolomics-targeted, + metabolomics-untargeted, or transcriptomics +

    +
    Clinical
    +

    + Clinical data for sedentary adults are available in the complete case + report form (CRF) data, as transferred by the DMAQC. It includes the + Actigraph minute-level analytical data processed by DMAQC. The only BIC + processing to the above files is redaction of PHI and de-identification.{' '} + A critical data table is the "Key" data set, which includes + critical demographics and the randomized group for each participant. In + these files, ds indicates the data set, while dd indicates the data + dictionary. Missing data files contain lists of missing forms and + visits, with a reason provided where applicable, and identified by + participant. +

    +

    + CRF data location:{' '} + + gs://motrpac-data-hub/human-precovid/phenotype/human-precovid-sed-adu/raw + +

    +

    + Key data set:{' '} + + gs://motrpac-data-hub/human-precovid/phenotype/human-precovid-sed-adu/raw/data_sets/human-precovid-sed-adu_clinical_key_ds_crf-redacted_v1.txt + +

    +
    + The freeze also includes a set of “curated” tables, created by the BIC + and designed to facilitate analysis. These include: +
      +
    1. + A table of vital signs and height/weight/BMI as recorded at each + visit +
    2. +
    3. + Baseline and follow up exercise parameters (CPET, 1RM, grip + strength) +
    4. +
    5. + Acute bout exercise parameters and "dose" metrics (EE and RE + separately) +
    6. +
    7. + A table of biospecimen-level data (primary key: labelID-vialLabel + pairs). This table contains data about biospecimens that might + affect multi-omic data quality. It is recommended that analysts use + this file rather than the EQC file to map samples to participants + and other metadata. +
    8. +
    9. + A table of derived variables at baseline from the Actigraph + minute-level analytical data +
    10. +
    +
    +

    + Curated clinical data location:{' '} + + gs://motrpac-data-hub/human-precovid/phenotype/human-precovid-sed-adu/curated + +

    +
    Metadata
    +
    QC reports
    +

    + These html reports show numerous quality checks of the raw data, and any + steps or graphic visualizations that were utilized in decision making + for processing raw data to the QC normalized data. +

    +

    + QC report location:{' '} + + gs://motrpac-data-hub/analysis/human-precovid-sed-adu/[ome]/metadata/*qc-report* + +

    +
    Removed samples
    +

    + These tables show lists of samples that have been removed from + qc-normalized tables for either quality reasons, or because they are + outliers. +

    +

    + Removed samples location:{' '} + + gs://motrpac-data-hub/analysis/human-precovid-sed-adu/[ome]/metadata/*removed-samples* + +

    +
    Sample metadata
    +

    + These include sample-level metadata that are ome/assay specific. This + does not include any biospecimen data or demographic data that is found + elsewhere. An example would be percent missing features for a given + sample.{' '} + + NOTE: + {' '} + it is not recommended to use these files as a source of biospecimen or + participant metadata, though the files may include such data. Rely on + centralized biospecimen and Key files. +

    +

    + Sample metadata location:{' '} + + gs://motrpac-data-hub/analysis/human-precovid-sed-adu/[ome]/metadata/*metadata_samples* + +

    +
    Feature metadata
    +

    + These tables include feature-level metadata that are ome/assay specific. + This does not include gene mapping, which is provided from a single + source. +

    +

    + Feature metadata location:{' '} + + gs://motrpac-data-hub/analysis/human-precovid-sed-adu/[ome]/metadata/*metadata_features* + +

    +
    Code
    +

    + All code for generating the data and metadata above is available at:{' '} + + https://github.com/MoTrPAC/precovid-analyses + + . The README.md describes how to interact with the data + functionally. Access can be granted by{' '} + + jzhen@stanford.edu + {' '} + or{' '} + + dankatz@stanford.edu + + . If you'd like to run or manipulate the code, please do not work from + the main repo, instead create a branch from the main using your name. + Use of other branches on the repo is not recommended. +

    +
    Methods
    +

    + The methodological description of data processing for each ome is + available on Google Drive:{' '} + + MoTrPAC MAWG Teamdrive > Pre-COVID > Writing Methods + +

    +
    + Analysis Collaboration: Getting started step-by-step +
    +
    + If you are interested in working with the PreCAWG on integrative + analysis on these data, complete the steps below: +
      +
    1. + Ensure you are listed on the required IRB for your institution. +
    2. +
    3. + Become listed as a MoTrPAC member on the main site with your + institutional email: Reach out to{' '} + + janelu@ufl.edu + +
    4. +
    5. + Obtain a Google Account using your institutional email address; + Gmail accounts are not permitted. See how{' '} + + here + + . All institutional emails are eligible to be linked to a Google + Account. +
    6. +
    7. + Obtain a Slack account through your institution/institutional email + (if your institution does not use Slack, wait for the invite - see + below). +
    8. +
    9. + Download and install the{' '} + + Google Command Line Tools + {' '} + on your preferred work computer. +
    10. +
    11. + Set up a{' '} + + GitHub account + + , and familiarize yourself with Git, GitHub, and GitHub Desktop. We + recommend GitHub desktop.{' '} + + Here is a video tutorial + + . +
    12. +
    13. + Install R and RStudio and the following MoTrPAC specific packages: +
        +
      1. + + MotrpacBicQC + {' '} + (everyone) +
      2. +
      3. + + MotrpacRatTraining6mo + {' '} + and{' '} + + MotrpacRatTraining6moData + {' '} + (for chronic exercise in 6mo rats) +
      4. +
      5. + We also recommend{' '} + + tidyverse packages + {' '} + and{' '} + + Bioconductor + +
      6. +
      +
    14. +
    15. + Email{' '} + + motrpac-helpdesk@lists.stanford.edu + + ,{' '} + + davidjm@stanford.edu + + ,{' '} + + dankatz@stanford.edu + + ,{' '} + + jzhen@stanford.edu + {' '} + and your local site PI with a written request for the + following access permissions: +
        +
      1. MoTrPAC Data Hub
      2. +
      3. Slack #precovid channel
      4. +
      5. + + MoTrPAC MAWG Teamdrive + +
      6. +
      7. + The following Google Cloud Platform Buckets:{' '} + gs://pre-cawg (read and write) and{' '} + gs://motrpac-data-hub (read only) +
      8. +
      9. + + The MoTrPAC GitHub + {' '} + with the ability to commit to{' '} + + MoTrPAC/precovid-analyses + + (assuming you want to collaborate) and access to + + MoTrPAC/MotrpacHumanPreSuspension + +
      10. +
      +
    16. +
    17. + Clone the following two GitHub repositories once you are granted + access: +
        +
      1. + + https://github.com/MoTrPAC/precovid-analyses + +
      2. +
      3. + + https://github.com/MoTrPAC/motrpac-bic-norm-qc + +
      4. +
      +
    18. +
    19. + Install the{' '} + + MoTrPAC/MotrpacHumanPreSuspension + {' '} + package - this package gives you programmatic access to the PreCAWG + data. Also review the README.md +
    20. +
    21. + Read the{' '} + + MoTrPAC/precovid-analyses + {' '} + README.md - this repo is where novel analysis code must + be stored +
    22. +
    23. + Set up your motrpac_config.json configuration file +
    24. +
    25. + Open Rstudio and attempt to run{' '} + + human-precovid-sed-adu_t07-adipose_prot-ph_metadata_qc-report_v1.Rmd + {' '} + (after pointing to your motrpac_config.json file. +
    26. +
    27. + Then ensure that{' '} + MotrpacHumanPreSuspension::load_differential_analysis{' '} + runs for you. +
    28. +
    29. If #13 and #15 are running, you are ready to go!
    30. +
    +
    ); } diff --git a/src/sass/_multiOmicsWorkingGroups.scss b/src/sass/_multiOmicsWorkingGroups.scss index acd1d406..89c4f0ac 100644 --- a/src/sass/_multiOmicsWorkingGroups.scss +++ b/src/sass/_multiOmicsWorkingGroups.scss @@ -28,6 +28,10 @@ } } } + + .nested-order-list { + list-style-type: lower-alpha; + } } } } \ No newline at end of file From 260922e0b6728b0c8b183bd58d18a9442aa71140 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Fri, 26 Apr 2024 22:55:02 -0700 Subject: [PATCH 36/62] Customize tag colors by species, age, intervention, etc --- .../components/bundleDatasets.jsx | 30 +++++++++++++++---- .../components/dataDownloadsMain.jsx | 3 -- src/sass/browseData/_browseData.scss | 7 +++++ 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/BrowseDataPage/components/bundleDatasets.jsx b/src/BrowseDataPage/components/bundleDatasets.jsx index 888f70ac..2e2a208c 100644 --- a/src/BrowseDataPage/components/bundleDatasets.jsx +++ b/src/BrowseDataPage/components/bundleDatasets.jsx @@ -2,7 +2,18 @@ import React from 'react'; import PropTypes from 'prop-types'; import BundleDownloadButton from './bundleDownloadButton'; -function BundleDatasets({ profile, bundleDatasets, tagColor }) { +const tagColors = { + human: 'badge-primary', + rat: 'badge-warning', + endurance: 'badge-success', + acute: 'badge-info', + youngAdult: 'badge-secondary', + adult: 'badge-dark', + preCovid: 'badge-danger', + sedentary: 'badge-purple', +}; + +function BundleDatasets({ profile, bundleDatasets }) { return (
    {bundleDatasets.map((item) => { @@ -15,17 +26,25 @@ function BundleDatasets({ profile, bundleDatasets, tagColor }) {
    {item.title}
    - + {item.species} - + {item.participant_type} - + {item.intervention} {item.species === 'Human' && ( - + {item.study_group} )} @@ -56,7 +75,6 @@ BundleDatasets.propTypes = { }), }), bundleDatasets: PropTypes.arrayOf(PropTypes.shape({})).isRequired, - tagColor: PropTypes.string.isRequired, }; BundleDatasets.defaultProps = { diff --git a/src/BrowseDataPage/components/dataDownloadsMain.jsx b/src/BrowseDataPage/components/dataDownloadsMain.jsx index 0443b9af..637c07db 100644 --- a/src/BrowseDataPage/components/dataDownloadsMain.jsx +++ b/src/BrowseDataPage/components/dataDownloadsMain.jsx @@ -213,7 +213,6 @@ function DataDownloadsMain({
    {userType && userType === 'internal' && ( @@ -226,7 +225,6 @@ function DataDownloadsMain({
    )} @@ -240,7 +238,6 @@ function DataDownloadsMain({
    )} diff --git a/src/sass/browseData/_browseData.scss b/src/sass/browseData/_browseData.scss index 8ec0b87d..11d0697b 100644 --- a/src/sass/browseData/_browseData.scss +++ b/src/sass/browseData/_browseData.scss @@ -33,6 +33,13 @@ .bundle-datasets-item { .card { + .bundle-dataset-tags { + .badge.badge-pill.badge-purple { + background-color: #6f42c1; + color: #fff; + } + } + .card-footer { background-color: #fff; border-top: none; From 8172adfc0507fd503b945db2a589700ab2bbac9b Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Fri, 26 Apr 2024 23:03:23 -0700 Subject: [PATCH 37/62] Customize link text for internal and external users --- src/Navbar/navbar.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Navbar/navbar.jsx b/src/Navbar/navbar.jsx index 671c1a88..7af770e0 100644 --- a/src/Navbar/navbar.jsx +++ b/src/Navbar/navbar.jsx @@ -256,7 +256,9 @@ export function Navbar({ className="dropdown-item" onClick={handleDataObjectFetch} > - Endurance Training Data + {isAuthenticated && hasAccess && userType === 'internal' + ? 'Rat and Human Data' + : 'Endurance Training Data'} Date: Tue, 30 Apr 2024 01:18:30 -0700 Subject: [PATCH 38/62] Correct human tissue groupings --- src/BrowseDataPage/helper.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BrowseDataPage/helper.jsx b/src/BrowseDataPage/helper.jsx index 62a3d0f2..70341c42 100644 --- a/src/BrowseDataPage/helper.jsx +++ b/src/BrowseDataPage/helper.jsx @@ -254,7 +254,7 @@ export const transformData = (arr) => { if (item.tissue_name !== null && item.tissue_name !== undefined) { let newTissueVal = item.tissue_name; if ( - newTissueVal.indexOf('Human EDTA Plasma') !== -1 || + newTissueVal.indexOf('Human PBMC') !== -1 || newTissueVal.indexOf('Human EDTA Packed Cells') !== -1 || newTissueVal.indexOf('Human PAXgene RNA') !== -1 ) { @@ -275,8 +275,8 @@ export const transformData = (arr) => { newTissueVal = 'Muscle'; item.tissue_name = newTissueVal; } - if (newTissueVal.indexOf('Human PBMC') !== -1) { - newTissueVal = 'PBMC'; + if (newTissueVal.indexOf('Human EDTA Plasma') !== -1) { + newTissueVal = 'Plasma'; item.tissue_name = newTissueVal; } if ( From d8b4fa086114332423763b92f18df0b11d985fc6 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 30 Apr 2024 01:32:14 -0700 Subject: [PATCH 39/62] Transform assay value consisting of multiple metabolomics targeted assays --- src/BrowseDataPage/helper.jsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/BrowseDataPage/helper.jsx b/src/BrowseDataPage/helper.jsx index 70341c42..30204653 100644 --- a/src/BrowseDataPage/helper.jsx +++ b/src/BrowseDataPage/helper.jsx @@ -251,6 +251,20 @@ export const transformData = (arr) => { item.assay = newMetabAssayVal; } } + if ( + item.assay !== null && + item.assay !== undefined && + item.omics === 'Metabolomics Targeted' + ) { + let newMetabAssayVal = item.assay; + if ( + newMetabAssayVal.indexOf('Acylcarnitines') !== -1 && + newMetabAssayVal.indexOf('Oxylipins') !== -1 + ) { + newMetabAssayVal = 'Merged'; + item.assay = newMetabAssayVal; + } + } if (item.tissue_name !== null && item.tissue_name !== undefined) { let newTissueVal = item.tissue_name; if ( From 77d3b35d2b538e0ba01626c6d0313e1a3b21eee8 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 30 Apr 2024 01:33:00 -0700 Subject: [PATCH 40/62] Correct human tissue grouping filter --- src/lib/browseDataFilters.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/browseDataFilters.jsx b/src/lib/browseDataFilters.jsx index b982ee15..20d4dfd2 100644 --- a/src/lib/browseDataFilters.jsx +++ b/src/lib/browseDataFilters.jsx @@ -46,7 +46,7 @@ export const tissues = { 'Vastus Lateralis', 'White Adipose', ], - human_sed_adu: ['Adipose', 'Blood', 'Muscle', 'PBMC'], + human_sed_adu: ['Adipose', 'Blood', 'Muscle', 'Plasma'], }; export const omes = { From c5e5ca74768c7b749a8a01059a9082403f1dc0af Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 30 Apr 2024 01:33:54 -0700 Subject: [PATCH 41/62] Include analysis and results filters for precawg data --- src/BrowseDataPage/browseDataFilter.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/BrowseDataPage/browseDataFilter.jsx b/src/BrowseDataPage/browseDataFilter.jsx index 20ffa00d..bb202729 100644 --- a/src/BrowseDataPage/browseDataFilter.jsx +++ b/src/BrowseDataPage/browseDataFilter.jsx @@ -8,10 +8,9 @@ function BrowseDataFilter({ activeFilters, onChangeFilter, onResetFilters }) { const dataDownload = useSelector((state) => state.browseData); const fileFilters = [...browseDataFilters]; - // Remove phenotype, results, and analysis filters - // if human-precovif-sed-adu data tab is selected + // Remove phenotype filter if human-precovid-sed-adu data tab is selected if (dataDownload.humanPrecovidSedAduDataSelected) { - fileFilters.splice(3, 2); + fileFilters.splice(4, 1); } fileFilters.forEach((item) => { From cbf2e0b90e433a29a9f3acccaede13cc7174f205 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 30 Apr 2024 02:10:46 -0700 Subject: [PATCH 42/62] Track DEA search result filtering events in GA4 --- src/Search/deaSearchResultFilters.jsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Search/deaSearchResultFilters.jsx b/src/Search/deaSearchResultFilters.jsx index c539a092..4a6c423a 100644 --- a/src/Search/deaSearchResultFilters.jsx +++ b/src/Search/deaSearchResultFilters.jsx @@ -7,6 +7,7 @@ import { assayList, } from '../lib/searchFilters'; import { searchParamsPropType } from './sharedlib'; +import { trackEvent } from '../GoogleAnalytics/googleAnalytics'; function SearchResultFilters({ searchParams, @@ -14,6 +15,7 @@ function SearchResultFilters({ handleSearch, resetSearch, hasResultFilters, + profile, }) { const [inputError, setInputError] = useState(false); // FIXME - this is a hack to get the search filters such as tissue and assay @@ -164,6 +166,15 @@ function SearchResultFilters({ onClick={(e) => { e.preventDefault(); handleSearch(searchParams, searchParams.keys, 'filters'); + // track event in Google Analytics 4 + trackEvent( + 'Differential Abundance Search', + 'search_filters', + profile && profile.userid + ? profile.userid.substring(profile.userid.indexOf('|') + 1) + : 'anonymous', + searchParams.keys, + ); }} disabled={inputError} > @@ -200,10 +211,15 @@ SearchResultFilters.propTypes = { sex: PropTypes.object, tissue: PropTypes.object, }), + profile: PropTypes.shape({ + userid: PropTypes.string, + user_metadata: PropTypes.object, + }), }; SearchResultFilters.defaultProps = { hasResultFilters: {}, + profile: {}, }; export default SearchResultFilters; From 90d52021bf758ec3e5d885ce4f6f8ec71ba2d8b7 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 30 Apr 2024 02:12:06 -0700 Subject: [PATCH 43/62] Track DEA keyword search events in GA4 --- src/Search/searchPage.jsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Search/searchPage.jsx b/src/Search/searchPage.jsx index 8317bf84..959612e4 100644 --- a/src/Search/searchPage.jsx +++ b/src/Search/searchPage.jsx @@ -248,7 +248,21 @@ export function SearchPage({ (inputEl && inputEl.value && inputEl.value.length) ? formatSearchInput() : searchParams.keys, - 'all' + 'all', + ); + // track event in Google Analytics 4 + trackEvent( + 'Differential Abundance Search', + 'keyword_search', + profile && profile.userid + ? profile.userid.substring( + profile.userid.indexOf('|') + 1, + ) + : 'anonymous', + (multiSelections && multiSelections.length) || + (inputEl && inputEl.value && inputEl.value.length) + ? formatSearchInput() + : searchParams.keys, ); }} > @@ -296,6 +310,7 @@ export function SearchPage({ handleSearch={handleSearch} resetSearch={resetSearch} hasResultFilters={hasResultFilters} + profile={profile} />
    From 55fb6d040732bb967d8f9d2328f37da9658458e9 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 30 Apr 2024 02:19:18 -0700 Subject: [PATCH 44/62] Track gene-centric view keyword search events in GA4 --- .../geneCentricViewPage.jsx | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/AnalysisPage/GeneCentricViewRat/geneCentricViewPage.jsx b/src/AnalysisPage/GeneCentricViewRat/geneCentricViewPage.jsx index 4d85a468..80d249d2 100644 --- a/src/AnalysisPage/GeneCentricViewRat/geneCentricViewPage.jsx +++ b/src/AnalysisPage/GeneCentricViewRat/geneCentricViewPage.jsx @@ -11,6 +11,7 @@ import GeneCentricTrainingResultsTable from './geneCentricTrainingResultsTable'; import GeneCentricSearchResultFilters from './geneCentricSearchResultFilters'; import AnimatedLoadingIcon from '../../lib/ui/loading'; import { genes } from '../../data/genes'; +import { trackEvent } from '../../GoogleAnalytics/googleAnalytics'; function GeneCentricView({ geneSearchResults, @@ -22,6 +23,7 @@ function GeneCentricView({ geneSearchChangeFilter, scope, hasResultFilters, + profile, }) { const [multiSelections, setMultiSelections] = useState([]); const inputRef = useRef(null); @@ -140,7 +142,18 @@ function GeneCentricView({ handleGeneCentricSearch( geneSearchParams, formatSearchInput(), - 'all' + 'all', + ); + // track event in Google Analytics 4 + trackEvent( + 'Differential Abundance Search', + 'keyword_search', + profile && profile.userid + ? profile.userid.substring( + profile.userid.indexOf('|') + 1, + ) + : 'anonymous', + formatSearchInput(), ); }} > @@ -254,6 +267,10 @@ GeneCentricView.propTypes = { assay: PropTypes.object, tissue: PropTypes.object, }), + profile: PropTypes.shape({ + userid: PropTypes.string, + user_metadata: PropTypes.object, + }), }; GeneCentricView.defaultProps = { @@ -263,16 +280,18 @@ GeneCentricView.defaultProps = { geneSearchParams: { ...defaultGeneSearchParams }, scope: 'all', hasResultFilters: {}, + profile: {}, }; const mapStateToProps = (state) => ({ ...state.analysis, + ...state.auth, }); const mapDispatchToProps = (dispatch) => ({ handleGeneCentricSearch: (params, geneInputValue, scope) => dispatch( - AnalysisActions.handleGeneCentricSearch(params, geneInputValue, scope) + AnalysisActions.handleGeneCentricSearch(params, geneInputValue, scope), ), geneSearchReset: (scope) => dispatch(AnalysisActions.geneSearchReset(scope)), geneSearchChangeFilter: (field, value) => From e3ee5c83c30067ea01d6046f6a249300cc755e03 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 30 Apr 2024 02:36:05 -0700 Subject: [PATCH 45/62] Correct GA4 event tracking category --- src/AnalysisPage/GeneCentricViewRat/geneCentricViewPage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AnalysisPage/GeneCentricViewRat/geneCentricViewPage.jsx b/src/AnalysisPage/GeneCentricViewRat/geneCentricViewPage.jsx index 80d249d2..de596b9a 100644 --- a/src/AnalysisPage/GeneCentricViewRat/geneCentricViewPage.jsx +++ b/src/AnalysisPage/GeneCentricViewRat/geneCentricViewPage.jsx @@ -146,7 +146,7 @@ function GeneCentricView({ ); // track event in Google Analytics 4 trackEvent( - 'Differential Abundance Search', + 'Gene-centric View Search', 'keyword_search', profile && profile.userid ? profile.userid.substring( From 643421f71ec5482266386badda61e5a687d812a0 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 30 Apr 2024 02:38:00 -0700 Subject: [PATCH 46/62] Track multi-omics working groups html report download events in GA4 --- src/MultiOmicsWorkingGroups/dawgPAC.jsx | 15 ++++++++++++- .../htmlReportModal.jsx | 21 ++++++++++++++++++- .../multiOmicsWorkingGroups.jsx | 2 +- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/MultiOmicsWorkingGroups/dawgPAC.jsx b/src/MultiOmicsWorkingGroups/dawgPAC.jsx index 82ed20e6..ecef3adf 100644 --- a/src/MultiOmicsWorkingGroups/dawgPAC.jsx +++ b/src/MultiOmicsWorkingGroups/dawgPAC.jsx @@ -1,4 +1,5 @@ import React, { useState } from 'react'; +import PropTypes from 'prop-types'; import HtmlReportModal from './htmlReportModal'; const proteomicsReportsDA = [ @@ -52,7 +53,7 @@ const proteomics1A1CIndependentAnalyses = [ 't70-white-adipose_prot-pr_1A1C-independent-analyses_report.html', ]; -function DawgPAC() { +function DawgPAC({ profile }) { const [selectedReport, setSelectedReport] = useState(null); const [selectedReportLabel, setSelectedReportLabel] = useState(null); @@ -246,10 +247,22 @@ function DawgPAC() {
    ); } +DawgPAC.propTypes = { + profile: PropTypes.shape({ + userid: PropTypes.string, + user_metadata: PropTypes.object, + }), +}; + +DawgPAC.defaultProps = { + profile: {}, +}; + export default DawgPAC; diff --git a/src/MultiOmicsWorkingGroups/htmlReportModal.jsx b/src/MultiOmicsWorkingGroups/htmlReportModal.jsx index 475951cc..6e6caa1c 100644 --- a/src/MultiOmicsWorkingGroups/htmlReportModal.jsx +++ b/src/MultiOmicsWorkingGroups/htmlReportModal.jsx @@ -1,7 +1,8 @@ import React, { useState, useRef } from 'react'; import PropTypes from 'prop-types'; +import { trackEvent } from '../GoogleAnalytics/googleAnalytics'; -function HtmlReportModal({ selectedReport, selectedReportLabel }) { +function HtmlReportModal({ selectedReport, selectedReportLabel, profile }) { const iframeRef = useRef(null); const [iframeLoaded, setIframeLoaded] = useState(false); @@ -29,6 +30,19 @@ function HtmlReportModal({ selectedReport, selectedReportLabel }) { className="btn btn-primary btn-report-download ml-3" href={`/static-assets/dawg-pac/${selectedReport}`} download + onClick={(e) => { + // track event in Google Analytics 4 + trackEvent( + 'Multi-omics Working Groups', + 'html_report_download', + profile && profile.userid + ? profile.userid.substring( + profile.userid.indexOf('|') + 1, + ) + : 'anonymous', + selectedReport, + ); + }} > Download Report @@ -71,11 +85,16 @@ function HtmlReportModal({ selectedReport, selectedReportLabel }) { HtmlReportModal.propTypes = { selectedReport: PropTypes.string, selectedReportLabel: PropTypes.string, + profile: PropTypes.shape({ + userid: PropTypes.string, + user_metadata: PropTypes.object, + }), }; HtmlReportModal.defaultProps = { selectedReport: null, selectedReportLabel: null, + profile: {}, }; export default HtmlReportModal; diff --git a/src/MultiOmicsWorkingGroups/multiOmicsWorkingGroups.jsx b/src/MultiOmicsWorkingGroups/multiOmicsWorkingGroups.jsx index bbe588c0..7d0e0f4e 100644 --- a/src/MultiOmicsWorkingGroups/multiOmicsWorkingGroups.jsx +++ b/src/MultiOmicsWorkingGroups/multiOmicsWorkingGroups.jsx @@ -72,7 +72,7 @@ function MultiOmicsWorkingGroups() { role="tabpanel" aria-labelledby="dawg-pac_tab" > - + From 1fb2e6da0f44e649617267cd832b39e532360214 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 10:22:54 -0700 Subject: [PATCH 47/62] Refactor and move user survey modal invocation to parent component --- .../components/bundleDatasets.jsx | 30 +++++++++++++++-- .../components/bundleDownloadButton.jsx | 33 +++++-------------- 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/src/BrowseDataPage/components/bundleDatasets.jsx b/src/BrowseDataPage/components/bundleDatasets.jsx index 2e2a208c..0f44e703 100644 --- a/src/BrowseDataPage/components/bundleDatasets.jsx +++ b/src/BrowseDataPage/components/bundleDatasets.jsx @@ -1,6 +1,8 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; +import { useDispatch } from 'react-redux'; import BundleDownloadButton from './bundleDownloadButton'; +import surveyModdalActions from '../../UserSurvey/userSurveyActions'; const tagColors = { human: 'badge-primary', @@ -13,7 +15,29 @@ const tagColors = { sedentary: 'badge-purple', }; -function BundleDatasets({ profile, bundleDatasets }) { +function BundleDatasets({ + profile, + bundleDatasets, + surveySubmitted, + downloadedData, +}) { + const dispatch = useDispatch(); + + useEffect(() => { + showUserSurveyModal(); + }, [downloadedData]); + + // show user survey modal if user has not submitted survey after downloading data + function showUserSurveyModal() { + if (downloadedData) { + if (!surveySubmitted) { + setTimeout(() => { + dispatch(surveyModdalActions.toggleUserSurveyModal(true)); + }, 2000); + } + } + } + return (
    {bundleDatasets.map((item) => { @@ -75,6 +99,8 @@ BundleDatasets.propTypes = { }), }), bundleDatasets: PropTypes.arrayOf(PropTypes.shape({})).isRequired, + surveySubmitted: PropTypes.bool.isRequired, + downloadedData: PropTypes.bool.isRequired, }; BundleDatasets.defaultProps = { diff --git a/src/BrowseDataPage/components/bundleDownloadButton.jsx b/src/BrowseDataPage/components/bundleDownloadButton.jsx index 4673cacf..eb07a480 100644 --- a/src/BrowseDataPage/components/bundleDownloadButton.jsx +++ b/src/BrowseDataPage/components/bundleDownloadButton.jsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import axios from 'axios'; -import { useSelector, useDispatch } from 'react-redux'; +import { useDispatch } from 'react-redux'; import surveyModdalActions from '../../UserSurvey/userSurveyActions'; import { trackEvent } from '../../GoogleAnalytics/googleAnalytics'; @@ -13,15 +13,6 @@ function BundleDownloadButton({ bundlefile, bundlefileSize, profile }) { }); const dispatch = useDispatch(); - // get states from redux store - const surveySubmitted = useSelector( - (state) => state.userSurvey.surveySubmitted, - ); - - const downloadedData = useSelector( - (state) => state.userSurvey.downloadedData, - ); - // fetch signed url upon user's initial button click function handleFileFetch(e, bucket, filename) { e.preventDefault(); @@ -56,26 +47,18 @@ function BundleDownloadButton({ bundlefile, bundlefileSize, profile }) { } // reset state upon user clicking download link - function handleFileDownload(file) { - dispatch(surveyModdalActions.userDownloadedData()); + async function handleFileDownload(file) { + await dispatch(surveyModdalActions.userDownloadedData()); const userID = profile && profile.userid ? profile.userid.substring(profile.userid.indexOf('|') + 1) : 'anonymous'; trackEvent('Data Download', 'bundled_files', userID, file); - setTimeout(() => { - setFetchStatus({ - status: null, - fileUrl: null, - fetching: false, - }); - }, 1500); - // show user survey modal - if (downloadedData && !surveySubmitted) { - setTimeout(() => { - dispatch(surveyModdalActions.toggleUserSurveyModal(true)); - }, 2400); - } + setFetchStatus({ + status: null, + fileUrl: null, + fetching: false, + }); } // render button with fetch state From 0a69b2f1f62ba5b56cf4d0d770e25077325ffba9 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 10:25:48 -0700 Subject: [PATCH 48/62] Pass user survey modal props to child bundle datasets component --- src/BrowseDataPage/components/dataDownloadsMain.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/BrowseDataPage/components/dataDownloadsMain.jsx b/src/BrowseDataPage/components/dataDownloadsMain.jsx index 637c07db..56f7b35a 100644 --- a/src/BrowseDataPage/components/dataDownloadsMain.jsx +++ b/src/BrowseDataPage/components/dataDownloadsMain.jsx @@ -22,6 +22,8 @@ function DataDownloadsMain({ handleDownloadRequest, downloadRequestResponse, waitingForResponse, + surveySubmitted, + downloadedData, }) { const dispatch = useDispatch(); const location = useLocation(); @@ -213,6 +215,8 @@ function DataDownloadsMain({
    {userType && userType === 'internal' && ( @@ -225,6 +229,8 @@ function DataDownloadsMain({ )} @@ -238,6 +244,8 @@ function DataDownloadsMain({ )} @@ -301,6 +309,8 @@ DataDownloadsMain.propTypes = { handleDownloadRequest: PropTypes.func.isRequired, downloadRequestResponse: PropTypes.string.isRequired, waitingForResponse: PropTypes.bool.isRequired, + surveySubmitted: PropTypes.bool.isRequired, + downloadedData: PropTypes.bool.isRequired, }; DataDownloadsMain.defaultProps = { From f211eb9456ef953447defce45a35bb8040a435b2 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 10:30:40 -0700 Subject: [PATCH 49/62] Pass user survey modal state as props to main data download component --- src/BrowseDataPage/browseDataPage.jsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/BrowseDataPage/browseDataPage.jsx b/src/BrowseDataPage/browseDataPage.jsx index 34488d40..9ea399ef 100644 --- a/src/BrowseDataPage/browseDataPage.jsx +++ b/src/BrowseDataPage/browseDataPage.jsx @@ -20,6 +20,8 @@ export function BrowseDataPage({ waitingForResponse, showUserSurveyModal, surveyId, + surveySubmitted, + downloadedData, }) { useEffect(() => { if (showUserSurveyModal) { @@ -47,15 +49,11 @@ export function BrowseDataPage({ handleDownloadRequest={handleDownloadRequest} downloadRequestResponse={downloadRequestResponse} waitingForResponse={waitingForResponse} + surveySubmitted={surveySubmitted} + downloadedData={downloadedData} /> ({ @@ -96,6 +98,8 @@ const mapStateToProps = (state) => ({ profile: state.auth.profile, showUserSurveyModal: state.userSurvey.showUserSurveyModal, surveyId: state.userSurvey.surveyId, + surveySubmitted: state.userSurvey.surveySubmitted, + downloadedData: state.userSurvey.downloadedData, }); const mapDispatchToProps = (dispatch) => ({ From f11a1b19427924a8b65963265b0f366dcca06ff6 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 10:39:38 -0700 Subject: [PATCH 50/62] Simplify useEffect hook setup --- src/BrowseDataPage/components/bundleDatasets.jsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/BrowseDataPage/components/bundleDatasets.jsx b/src/BrowseDataPage/components/bundleDatasets.jsx index 0f44e703..9bb7fcdc 100644 --- a/src/BrowseDataPage/components/bundleDatasets.jsx +++ b/src/BrowseDataPage/components/bundleDatasets.jsx @@ -24,11 +24,7 @@ function BundleDatasets({ const dispatch = useDispatch(); useEffect(() => { - showUserSurveyModal(); - }, [downloadedData]); - - // show user survey modal if user has not submitted survey after downloading data - function showUserSurveyModal() { + // show user survey modal if user has not submitted survey after downloading data if (downloadedData) { if (!surveySubmitted) { setTimeout(() => { @@ -36,7 +32,7 @@ function BundleDatasets({ }, 2000); } } - } + }, [dispatch, downloadedData, surveySubmitted]); return (
    From 0bdbe82e7bc33f8188e24239733bf2155e9bee72 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 22:56:04 -0700 Subject: [PATCH 51/62] Simplify to use single modal component to handle download request --- src/BrowseDataPage/browseDataTable.jsx | 41 +++++--------------------- 1 file changed, 8 insertions(+), 33 deletions(-) diff --git a/src/BrowseDataPage/browseDataTable.jsx b/src/BrowseDataPage/browseDataTable.jsx index 87a20a8f..02738f49 100644 --- a/src/BrowseDataPage/browseDataTable.jsx +++ b/src/BrowseDataPage/browseDataTable.jsx @@ -156,21 +156,6 @@ function DataTable({ .fill(start) .map((x, y) => x + y * step); - // anonymous user or authenticated user - const userType = profile.user_metadata && profile.user_metadata.userType; - const hasAccess = profile.user_metadata && profile.user_metadata.hasAccess; - - function handleDownloadClickEvent(selectedFiles) { - if (userType && hasAccess) { - handleDownloadRequest( - profile.user_metadata.email, - profile.user_metadata.name, - profile.userid, - selectedFiles, - ); - } - } - // Render the UI for your table // react-table doesn't have UI, it's headless. We just need to put the react-table // props from the Hooks, and it will do its magic automatically @@ -188,28 +173,18 @@ function DataTable({ className="btn btn-primary d-flex align-items-center" disabled={Object.keys(selectedRowIds).length === 0} data-toggle="modal" - data-target=".data-download-modal" - onClick={() => { - handleDownloadClickEvent(selectedFlatRows); - }} + data-target="#dataDownloadModal" > file_download Download selected files - {Object.keys(selectedRowIds).length > 0 && userType && hasAccess ? ( - - ) : null} - {Object.keys(selectedRowIds).length > 0 && !userType ? ( - - ) : null} +
    From 1e62ce200e7512f5401da4aafd47413857d0b8ca Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 22:58:50 -0700 Subject: [PATCH 52/62] Simplify to use single 'SelectiveDataDownloadFileBrowser' component to render file download table; remove tab UI --- .../components/selectiveDataDownloads.jsx | 188 +++++++----------- 1 file changed, 68 insertions(+), 120 deletions(-) diff --git a/src/BrowseDataPage/components/selectiveDataDownloads.jsx b/src/BrowseDataPage/components/selectiveDataDownloads.jsx index 42a2081f..3aa93e40 100644 --- a/src/BrowseDataPage/components/selectiveDataDownloads.jsx +++ b/src/BrowseDataPage/components/selectiveDataDownloads.jsx @@ -1,10 +1,9 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { useSelector, useDispatch } from 'react-redux'; +import { useSelector } from 'react-redux'; +import { Link } from 'react-router-dom'; import PageTitle from '../../lib/ui/pageTitle'; -import actions from '../browseDataActions'; import BrowseDataFilter from '../browseDataFilter'; -import SelectiveDataDownloadFileBrowserTab from './selectiveDataDownloadFileBrowserTab'; import SelectiveDataDownloadFileBrowser from './selectiveDataDownloadFileBrowser'; function SelectiveDataDownloads({ @@ -19,130 +18,79 @@ function SelectiveDataDownloads({ waitingForResponse, }) { const dataDownload = useSelector((state) => state.browseData); - const dispatch = useDispatch(); - // anonymous user or authenticated user - const userType = profile.user_metadata && profile.user_metadata.userType; + // set page title based on selected data + function renderPageTitle() { + let titleStr = 'Data Download'; + if (dataDownload.pass1b06DataSelected) { + titleStr = 'Data Download - Endurance Training Rats'; + } + if (dataDownload.pass1a06DataSelected) { + titleStr = 'Data Download - Acute Exercise Rats'; + } + if (dataDownload.humanPrecovidSedAduDataSelected) { + titleStr = 'Data Download - Human Sedentary Adults'; + } + + return titleStr; + } + + // set page summary based on selected data + function renderStudySummary() { + let summary = ''; + if (dataDownload.pass1b06DataSelected) { + summary = + 'Experimental data from endurance trained (1 week, 2 weeks, 4 weeks or 8 weeks) compared to untrained young adult rats (6 months old).'; + } + if (dataDownload.pass1a06DataSelected) { + summary = + 'Experimental data from acute exercise study on young adult rats for a comprehensive analysis of the physiological responses following a single exercise session in 6-month-old F344 rats.'; + } + if (dataDownload.humanPrecovidSedAduDataSelected) { + summary = + 'Differential analysis results data for differences in changes during the acute bout, comparing the change from pre-exercise baseline at any given timepoint during the acute bout as compared to resting control.'; + } + + return summary; + } + + // set data file list based on selected data + let dataFiles = []; + if (dataDownload.pass1b06DataSelected) { + dataFiles = filteredFiles.filter((item) => item.phase === 'PASS1B-06'); + } + if (dataDownload.pass1a06DataSelected) { + dataFiles = filteredFiles.filter((item) => item.phase === 'PASS1A-06'); + } + if (dataDownload.humanPrecovidSedAduDataSelected) { + dataFiles = filteredFiles.filter( + (item) => item.phase === 'HUMAN-PRECOVID-SED-ADU', + ); + } return (
    - +
    + + arrow_back + Back + +
    + +

    {renderStudySummary()}

    - {/* nav tabs */} -
      - dispatch(actions.selectPass1B06Data())} +
      + - {userType && userType === 'internal' && ( - dispatch(actions.selectPass1A06Data())} - onResetFilters={onResetFilters} - /> - )} - {userType && userType === 'internal' && ( - - dispatch(actions.selectHumanPreCovidSedAduData()) - } - onResetFilters={onResetFilters} - /> - )} -
    - {/* tab panes */} -
    -
    - {dataDownload.pass1b06DataSelected && ( - item.phase === 'PASS1B-06', - )} - fetching={fetching} - activeFilters={activeFilters} - onChangeFilter={onChangeFilter} - onResetFilters={onResetFilters} - handleDownloadRequest={handleDownloadRequest} - downloadRequestResponse={downloadRequestResponse} - waitingForResponse={waitingForResponse} - studySummary="Experimental data from endurance trained (1 week, 2 weeks, 4 weeks or 8 weeks) compared to untrained young adult rats (6 months old)." - /> - )} -
    - {userType && userType === 'internal' && ( -
    - {dataDownload.pass1a06DataSelected && ( - item.phase === 'PASS1A-06', - )} - fetching={fetching} - activeFilters={activeFilters} - onChangeFilter={onChangeFilter} - onResetFilters={onResetFilters} - handleDownloadRequest={handleDownloadRequest} - downloadRequestResponse={downloadRequestResponse} - waitingForResponse={waitingForResponse} - studySummary="Experimental data from acute exercise study on young adult rats for a comprehensive analysis of the physiological responses following a single exercise session in 6-month-old F344 rats." - /> - )} -
    - )} - {userType && userType === 'internal' && ( -
    - {dataDownload.humanPrecovidSedAduDataSelected && ( - item.phase === 'HUMAN-PRECOVID-SED-ADU', - )} - fetching={fetching} - activeFilters={activeFilters} - onChangeFilter={onChangeFilter} - onResetFilters={onResetFilters} - handleDownloadRequest={handleDownloadRequest} - downloadRequestResponse={downloadRequestResponse} - waitingForResponse={waitingForResponse} - studySummary="Differential analysis results data for differences in changes during the acute bout, comparing the change from pre-exercise baseline at any given timepoint during the acute bout as compared to resting control." - /> - )} -
    - )}
    From 19077229115298b4334cc72833f7dc1b63ebf339 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 23:00:08 -0700 Subject: [PATCH 53/62] Move page summary text to parent component --- .../selectiveDataDownloadFileBrowser.jsx | 67 +++++++++---------- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/src/BrowseDataPage/components/selectiveDataDownloadFileBrowser.jsx b/src/BrowseDataPage/components/selectiveDataDownloadFileBrowser.jsx index 0d56375f..478d11c2 100644 --- a/src/BrowseDataPage/components/selectiveDataDownloadFileBrowser.jsx +++ b/src/BrowseDataPage/components/selectiveDataDownloadFileBrowser.jsx @@ -15,44 +15,40 @@ function SelectiveDataDownloadFileBrowser({ handleDownloadRequest, downloadRequestResponse, waitingForResponse, - studySummary, }) { return ( - <> -

    {studySummary}

    -
    - + + {fetching && ( +
    + +
    + )} + {!fetching && !filteredFiles.length && ( +
    +

    + + No matches found for the selected filters. Please refer to the{' '} + Summary Table for data that are + available. + +

    +
    + )} + {!fetching && filteredFiles.length && ( + - {fetching && ( -
    - -
    - )} - {!fetching && !filteredFiles.length && ( -
    -

    - - No matches found for the selected filters. Please refer to the{' '} - Summary Table for data that are - available. - -

    -
    - )} - {!fetching && filteredFiles.length && ( - - )} -
    - + )} +
    ); } @@ -72,7 +68,6 @@ SelectiveDataDownloadFileBrowser.propTypes = { handleDownloadRequest: PropTypes.func.isRequired, downloadRequestResponse: PropTypes.string.isRequired, waitingForResponse: PropTypes.bool.isRequired, - studySummary: PropTypes.string.isRequired, }; SelectiveDataDownloadFileBrowser.defaultProps = { From 454fdd846f435cc406d151c57357e54d0e6295a1 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 23:02:30 -0700 Subject: [PATCH 54/62] Refactor to use single modal component to handle both authenticated and anonymous users --- .../components/openAccessModal.jsx | 53 +++++++++++++++---- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/src/BrowseDataPage/components/openAccessModal.jsx b/src/BrowseDataPage/components/openAccessModal.jsx index 45a276f0..9ea2039f 100644 --- a/src/BrowseDataPage/components/openAccessModal.jsx +++ b/src/BrowseDataPage/components/openAccessModal.jsx @@ -9,10 +9,15 @@ function OpenAccessFileDownloadModal({ waitingForResponse, handleDownloadRequest, selectedFiles, + profile, }) { const [submitted, setSubmitted] = useState(false); - const [name, setName] = useState(''); - const [email, setEmail] = useState(''); + const [name, setName] = useState( + profile && profile.user_metadata.name ? profile.user_metadata.name : '', + ); + const [email, setEmail] = useState( + profile && profile.user_metadata.email ? profile.user_metadata.email : '', + ); const dispatch = useDispatch(); // get states from redux store @@ -36,7 +41,12 @@ function OpenAccessFileDownloadModal({ return false; } // submit download request - handleDownloadRequest(email, name, '', selectedFiles); + handleDownloadRequest( + email, + name, + profile && profile.userid ? profile.userid : '', + selectedFiles, + ); // set user survey id in redux store dispatch(surveyModdalActions.setUserSurveyId(email)); // update store to show that user has downloaded data @@ -50,8 +60,17 @@ function OpenAccessFileDownloadModal({ return (

    - Please provide your email address and name. We will notify you when - the the download is ready. + {profile && profile.user_metadata.email ? ( + + Please submit your request upon verifying your email address and + name. We will notify you when the the download is ready. + + ) : ( + + Please submit your request upon providing your email address and + name. We will notify you when the the download is ready. + + )}

    @@ -59,6 +78,7 @@ function OpenAccessFileDownloadModal({ type="email" className="form-control w-100 mt-1" id="requester-email" + value={email} onChange={(e) => { e.preventDefault(); setEmail(e.target.value); @@ -71,6 +91,7 @@ function OpenAccessFileDownloadModal({ type="text" className="form-control w-100 mt-1" id="requester-name" + value={name} onChange={(e) => { e.preventDefault(); setName(e.target.value); @@ -81,7 +102,7 @@ function OpenAccessFileDownloadModal({ @@ -90,7 +111,7 @@ function OpenAccessFileDownloadModal({ ); } - // reset state and close modal if user has not submitted download request + // reset state and close modal function handleModalClose() { setName(''); setEmail(''); @@ -134,8 +155,8 @@ function OpenAccessFileDownloadModal({ className="close" data-dismiss="modal" aria-label="Close" - onClick={ - submitted ? handleModalCloseAfterRequest : handleModalClose + onClick={() => + submitted ? handleModalCloseAfterRequest() : handleModalClose() } > @@ -166,7 +187,7 @@ function OpenAccessFileDownloadModal({ type="button" className="btn btn-secondary px-3" data-dismiss="modal" - onClick={handleModalCloseAfterRequest} + onClick={() => handleModalCloseAfterRequest()} > Done @@ -183,6 +204,18 @@ OpenAccessFileDownloadModal.propTypes = { downloadRequestResponse: PropTypes.string.isRequired, handleDownloadRequest: PropTypes.func.isRequired, selectedFiles: PropTypes.arrayOf(PropTypes.shape({})).isRequired, + profile: PropTypes.shape({ + userid: PropTypes.string, + user_metadata: PropTypes.shape({ + userType: PropTypes.string, + email: PropTypes.string, + name: PropTypes.string, + }), + }), +}; + +OpenAccessFileDownloadModal.defaultProps = { + profile: {}, }; export default OpenAccessFileDownloadModal; From 1d2d59f84c85a8b97f44269ef1439243a077b6ac Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 23:08:03 -0700 Subject: [PATCH 55/62] Add style for link back to data download main page --- src/sass/browseData/_browseData.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sass/browseData/_browseData.scss b/src/sass/browseData/_browseData.scss index 11d0697b..d4e8a256 100644 --- a/src/sass/browseData/_browseData.scss +++ b/src/sass/browseData/_browseData.scss @@ -80,10 +80,17 @@ } .data-download-selective-files { + /* tab UI temporary removed .nav.nav-tabs { margin-left: 15px; margin-right: 15px; } + */ + .link-back { + a { + text-decoration: none; + } + } } label { From eb232ff79c37af6e596d8d7e0064530c3b1a09ab Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 23:12:34 -0700 Subject: [PATCH 56/62] Reset data filters when user navigates back to data download main page --- src/BrowseDataPage/components/selectiveDataDownloads.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BrowseDataPage/components/selectiveDataDownloads.jsx b/src/BrowseDataPage/components/selectiveDataDownloads.jsx index 3aa93e40..9649bce9 100644 --- a/src/BrowseDataPage/components/selectiveDataDownloads.jsx +++ b/src/BrowseDataPage/components/selectiveDataDownloads.jsx @@ -71,7 +71,11 @@ function SelectiveDataDownloads({ return (
    - + arrow_back Back From 1e439a3878e6713a6dc1a137f825d431c9f89447 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 23:20:33 -0700 Subject: [PATCH 57/62] Add extra condition to set email and name values --- src/BrowseDataPage/components/openAccessModal.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/BrowseDataPage/components/openAccessModal.jsx b/src/BrowseDataPage/components/openAccessModal.jsx index 9ea2039f..a063da44 100644 --- a/src/BrowseDataPage/components/openAccessModal.jsx +++ b/src/BrowseDataPage/components/openAccessModal.jsx @@ -13,10 +13,14 @@ function OpenAccessFileDownloadModal({ }) { const [submitted, setSubmitted] = useState(false); const [name, setName] = useState( - profile && profile.user_metadata.name ? profile.user_metadata.name : '', + profile && profile.user_metadata && profile.user_metadata.name + ? profile.user_metadata.name + : '', ); const [email, setEmail] = useState( - profile && profile.user_metadata.email ? profile.user_metadata.email : '', + profile && profile.user_metadata && profile.user_metadata.email + ? profile.user_metadata.email + : '', ); const dispatch = useDispatch(); @@ -60,7 +64,7 @@ function OpenAccessFileDownloadModal({ return (

    - {profile && profile.user_metadata.email ? ( + {profile && profile.user_metadata && profile.user_metadata.email ? ( Please submit your request upon verifying your email address and name. We will notify you when the the download is ready. From 6369c21fbe6b3bb712dca0408b4d877cffae3155 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 23:37:00 -0700 Subject: [PATCH 58/62] Update test assertion --- src/App/__test__/App.test.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/__test__/App.test.jsx b/src/App/__test__/App.test.jsx index a72acc89..a3a2bb34 100644 --- a/src/App/__test__/App.test.jsx +++ b/src/App/__test__/App.test.jsx @@ -23,7 +23,7 @@ describe('', () => { }); test('It should contain fifteen children', () => { - expect(component.find('Route').length).toBe(21); + expect(component.find('Route').length).toBe(22); }); test('It should contain four children', () => { From ebbe509c889d7adb480f5327a4247319f64ab6eb Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 23:37:21 -0700 Subject: [PATCH 59/62] Reinstall npm dependencies --- yarn.lock | 56 +++++++++++++++++++++---------------------------------- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/yarn.lock b/yarn.lock index 517c4f29..f986753f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2032,9 +2032,9 @@ ts-dedent "^2.0.0" "@storybook/csf@^0.1.2", "@storybook/csf@^0.1.4": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@storybook/csf/-/csf-0.1.6.tgz#247bdf6c371b83af5c4f0bc6654954eaabdb7595" - integrity sha512-JjWnBptVhBYJ14yq+cHs66BXjykRUWQ5TlD1RhPxMOtavynYyV/Q+QR98/N+XB+mcPtFMm5I2DvNkpj0/Dk8Mw== + version "0.1.7" + resolved "https://registry.yarnpkg.com/@storybook/csf/-/csf-0.1.7.tgz#dcc6c16a353bc09c8c619ba1a23ba93b2aab0b9d" + integrity sha512-53JeLZBibjQxi0Ep+/AJTfxlofJlxy1jXcSKENlnKxHjWEYyHQCumMP5yTFjf7vhNnMjEpV3zx6t23ssFiGRyw== dependencies: type-fest "^2.19.0" @@ -2580,16 +2580,16 @@ "@types/node" "*" "@types/node@*": - version "20.12.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.8.tgz#35897bf2bfe3469847ab04634636de09552e8256" - integrity sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w== + version "20.12.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.10.tgz#8f0c3f12b0f075eee1fe20c1afb417e9765bef76" + integrity sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw== dependencies: undici-types "~5.26.4" "@types/node@^18.0.0": - version "18.19.31" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.31.tgz#b7d4a00f7cb826b60a543cebdbda5d189aaecdcd" - integrity sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA== + version "18.19.32" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.32.tgz#96e4c80dca0ccf48505add2a399f36465955e0be" + integrity sha512-2bkg93YBSDKk8DLmmHnmj/Rwr18TLx7/n+I23BigFwgexUJoMHZOd8X1OFxuF/W3NN0S2W2E5sVabI5CPinNvA== dependencies: undici-types "~5.26.4" @@ -5042,9 +5042,9 @@ ejs@^3.1.6: jake "^10.8.5" electron-to-chromium@^1.4.668: - version "1.4.756" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.756.tgz#7b872ed8c8c5bee571be771730225d6d2a37fe45" - integrity sha512-RJKZ9+vEBMeiPAvKNWyZjuYyUqMndcP1f335oHqn3BEQbs2NFtVrnK5+6Xg5wSM9TknNNpWghGDUCKGYF+xWXw== + version "1.4.758" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.758.tgz#f39e530cae2ca4329a0f0e1840629d8d1da73156" + integrity sha512-/o9x6TCdrYZBMdGeTifAP3wlF/gVT+TtWJe3BSmtNh92Mw81U9hrYwW9OAGUh+sEOX/yz5e34sksqRruZbjYrw== emittery@^0.10.2: version "0.10.2" @@ -5077,9 +5077,9 @@ encodeurl@~1.0.2: integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== enhanced-resolve@^5.16.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787" - integrity sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== + version "5.16.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz#e8bc63d51b826d6f1cbc0a150ecb5a8b0c62e567" + integrity sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -7873,13 +7873,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - magic-string@^0.25.0, magic-string@^0.25.7: version "0.25.9" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" @@ -10126,11 +10119,9 @@ semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.2, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: - version "7.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" + version "7.6.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.1.tgz#60bfe090bf907a25aa8119a72b9f90ef7ca281b2" + integrity sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA== send@0.18.0: version "0.18.0" @@ -10929,9 +10920,9 @@ to-regex-range@^5.0.1: is-number "^7.0.0" tocbot@^4.25.0: - version "4.27.19" - resolved "https://registry.yarnpkg.com/tocbot/-/tocbot-4.27.19.tgz#e288dc2a81332e05cdeb68438d5aa859733f3dbd" - integrity sha512-0yu8k0L3gCQ1OVNZnKqpbZp+kLd6qtlNEBxsb+e0G/bS0EXMl2tWqWi1Oy9knRX8rTPYfOxd/sI/OzAj3JowGg== + version "4.27.20" + resolved "https://registry.yarnpkg.com/tocbot/-/tocbot-4.27.20.tgz#c7ba627585894fa306d65b08f53f624949becf19" + integrity sha512-6M78FT20+FA5edtx7KowLvhG3gbZ6GRcEkL/0b2TcPbn6Ba+1ayI3SEVxe25zjkWGs0jd04InImaO81Hd8Hukw== toidentifier@1.0.1: version "1.0.1" @@ -12192,11 +12183,6 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" From 9d3519afa93d790f9a976095b81cf49956cadcfc Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Tue, 7 May 2024 23:55:02 -0700 Subject: [PATCH 60/62] Update hero section text --- src/LandingPage/landingPage.jsx | 15 +++------------ src/sass/_landingPage.scss | 5 +---- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/LandingPage/landingPage.jsx b/src/LandingPage/landingPage.jsx index c57f6a75..6542e7cd 100644 --- a/src/LandingPage/landingPage.jsx +++ b/src/LandingPage/landingPage.jsx @@ -214,18 +214,9 @@ export function LandingPage({ isAuthenticated, profile }) {

    Exercise

    - - Molecular Transducers of Physical Activity Consortium - (MoTrPAC) - {' '} - is a national research consortium. Its goal is to{' '} - - study the molecular changes that occur in response to - exercise, - {' '} - and ultimately to advance the understanding of how physical - activity improves and preserves health. We aim to generate a - molecular map of the effects of exercise. + Welcome to the data repository for the Molecular Transducers of Physical + Activity Consortium; a national research initiative that aims to generate + a molecular map of the effects of exercise and training.

    diff --git a/src/sass/_landingPage.scss b/src/sass/_landingPage.scss index ba6444c7..7d439a35 100644 --- a/src/sass/_landingPage.scss +++ b/src/sass/_landingPage.scss @@ -85,6 +85,7 @@ } p.hero { + font-weight: 400; margin-top: 1.75rem; a { @@ -93,10 +94,6 @@ line-height: 1.5; text-decoration: none; text-shadow: 0 0 0.1em rgba(0, 0, 0, 0.75); - - .about-motrpac-emphasis { - color: $accent-yellow; - } } } From 34afb29234115faa9f9204b03e942d4b442389a9 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Wed, 8 May 2024 00:57:44 -0700 Subject: [PATCH 61/62] Add minor style improvement to link back to data download main page --- src/sass/browseData/_browseData.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sass/browseData/_browseData.scss b/src/sass/browseData/_browseData.scss index d4e8a256..6f40274e 100644 --- a/src/sass/browseData/_browseData.scss +++ b/src/sass/browseData/_browseData.scss @@ -89,6 +89,7 @@ .link-back { a { text-decoration: none; + width: fit-content; } } } From 5094012e702195c97b2f0cf058736eb10658c5e6 Mon Sep 17 00:00:00 2001 From: Jimmy Zhen Date: Wed, 8 May 2024 19:29:08 -0700 Subject: [PATCH 62/62] Move Data Types description box toward the top of the page and update the description text in Learn More box --- .../components/dataDownloadsMain.jsx | 122 +++++++++--------- .../components/dataTypeInfo.jsx | 50 ++++--- src/sass/browseData/_browseData.scss | 7 + 3 files changed, 94 insertions(+), 85 deletions(-) diff --git a/src/BrowseDataPage/components/dataDownloadsMain.jsx b/src/BrowseDataPage/components/dataDownloadsMain.jsx index 56f7b35a..3fdb2219 100644 --- a/src/BrowseDataPage/components/dataDownloadsMain.jsx +++ b/src/BrowseDataPage/components/dataDownloadsMain.jsx @@ -3,7 +3,6 @@ import PropTypes from 'prop-types'; import { Link, useLocation } from 'react-router-dom'; import { useDispatch } from 'react-redux'; import PageTitle from '../../lib/ui/pageTitle'; -import ExternalLink from '../../lib/ui/externalLink'; import BrowseDataFilter from '../browseDataFilter'; import DataTypeInfo from './dataTypeInfo'; import BundleDatasets from './bundleDatasets'; @@ -53,41 +52,49 @@ function DataDownloadsMain({
    -

    +

    Explore and download the MoTrPAC multi-omics datasets, which includes quantitative results and analyses of molecular changes from exercise across tissues. Currently, the complete young rat endurance - training dataset is publicly available.{' '} + training dataset is publicly available. + {' '} {userType && userType === 'internal' ? 'The young rat acute exercise and human precovid sedentary adult datasets are currently available to consortium members only in the early preview phase. ' : null} For a summary of all the ongoing studies in MoTrPAC (data available - soon), please visit our{' '} - Project Overview. + soon), please visit our + {' '} + Project Overview + .

    -
    - Learn more about MoTrPAC studies: -
      -
    • - -
    • -
    • - -
    • -
    • - Project overview covering the study - design and study protocols -
    • -
    +
    + +
    +
    +

    Learn more about MoTrPAC studies

    + +
    +
    -
    +

    Study Data

    Browse and find the data of your interest by tissue, ome, or assay @@ -253,40 +260,37 @@ function DataDownloadsMain({

    {/* Additional data information */} {userType && userType === 'internal' ? ( - <> - -
    -
    -

    Additional Information

    -

    - The currently available young adult rats experimental data for - acute exercise and endurance training include all tissues and - assays from the very last consortium data release, as well as - additional tissues and assays made available afterwards. The - phenotypic data sets have also been updated since then. -

    -

    - Please refer to this{' '} - - README - - description - - {' '} - document for the data included in the very last consortium - data release. -

    -
    +
    +
    +

    Additional Information

    +

    + The currently available young adult rats experimental data for + acute exercise and endurance training include all tissues and + assays from the very last consortium data release, as well as + additional tissues and assays made available afterwards. The + phenotypic data sets have also been updated since then. +

    +

    + Please refer to this + {' '} + + README + + description + + + {' '} + document for the data included in the very last consortium + data release. +

    - - ) : ( - - )} +
    + ) : null}
    ); diff --git a/src/BrowseDataPage/components/dataTypeInfo.jsx b/src/BrowseDataPage/components/dataTypeInfo.jsx index fe288f74..50f65fd3 100644 --- a/src/BrowseDataPage/components/dataTypeInfo.jsx +++ b/src/BrowseDataPage/components/dataTypeInfo.jsx @@ -1,7 +1,6 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; -import EmailLink from '../../lib/ui/emailLink'; function DataTypeInfo({ grid }) { const [showMoreInfo, setShowMoreInfo] = useState(false); @@ -15,22 +14,37 @@ function DataTypeInfo({ grid }) { return (
    -

    Data Types

    -
      -
    • - Assay-specific differential analysis and - normalized data -
    • +
      +

      Data Types

      + +
      +
      • - Assay-specific quantitative results, experiment metadata, and QA/QC - reports + Assay-specific + {' '} + differential analysis + , normalized data, quantitative results, experiment metadata + and QA/QC reports
      • Cross-platform merged metabolomics data tables for named metabolites
      • Phenotypic data
      -
      +

      Note: Raw files are not currently available for direct download through the Data Hub portal. @@ -40,22 +54,6 @@ function DataTypeInfo({ grid }) { to the raw files.

      -
      - -
    ); diff --git a/src/sass/browseData/_browseData.scss b/src/sass/browseData/_browseData.scss index 6f40274e..40b11aae 100644 --- a/src/sass/browseData/_browseData.scss +++ b/src/sass/browseData/_browseData.scss @@ -17,6 +17,13 @@ text-decoration: none; } } + + .bd-callout-info { + ul { + padding-left: 1.0rem; + + } + } } .inline-link-with-icon .material-icons {