From 546c1e3dbc68c90070177a1a90bcace29ea26e31 Mon Sep 17 00:00:00 2001 From: Gregory Rushton Date: Thu, 4 Apr 2024 14:16:46 -0400 Subject: [PATCH] [DUOS-2835][DUOS-2878][risk=no] Use the url dataset property instead of the dbGap version (#2521) --- .../DacDatasetTable/dac_dataset_table.spec.js | 2 +- .../DarCollectionReview/dar_collection_review.spec.js | 2 +- public/DataSetSample.tsv | 2 -- src/components/data_update/DatasetUpdate.jsx | 10 +++++----- src/components/modals/DacDatasetsModal.js | 4 ++-- src/pages/DatasetCatalog.js | 2 +- src/pages/DatasetRegistration.js | 4 ++-- 7 files changed, 12 insertions(+), 14 deletions(-) delete mode 100644 public/DataSetSample.tsv diff --git a/cypress/component/DacDatasetTable/dac_dataset_table.spec.js b/cypress/component/DacDatasetTable/dac_dataset_table.spec.js index 53c504c26..a79667186 100644 --- a/cypress/component/DacDatasetTable/dac_dataset_table.spec.js +++ b/cypress/component/DacDatasetTable/dac_dataset_table.spec.js @@ -58,7 +58,7 @@ const sampleDataset = { }, { 'dataSetId': 1408, - 'propertyName': 'dbGAP', + 'propertyName': 'url', 'propertyValue': 'http://...', 'propertyType': 'String' }, diff --git a/cypress/component/DarCollectionReview/dar_collection_review.spec.js b/cypress/component/DarCollectionReview/dar_collection_review.spec.js index a7915797e..3939c8daa 100644 --- a/cypress/component/DarCollectionReview/dar_collection_review.spec.js +++ b/cypress/component/DarCollectionReview/dar_collection_review.spec.js @@ -569,7 +569,7 @@ const dar = { 'propertyId': null, 'dataSetId': 13, 'propertyKey': null, - 'propertyName': 'dbGAP', + 'propertyName': 'url', 'propertyValue': 'https://...', 'createDate': null, 'schemaProperty': null, diff --git a/public/DataSetSample.tsv b/public/DataSetSample.tsv deleted file mode 100644 index 16a52a7b2..000000000 --- a/public/DataSetSample.tsv +++ /dev/null @@ -1,2 +0,0 @@ -Dataset Name Data Type Species Phenotype/Indication # of participants Description dbGAP Data Depositor Principal Investigator(PI) Sample Collection ID Consent ID -(Bucienne Monco) - Muc-1 Kidney Disease DNA, whole genome human muc-1, kidney disease 31 muc-1 patients that developed cancer , 5 weeks after treatment http://.... John Doe Mark Smith SC-20658 \ No newline at end of file diff --git a/src/components/data_update/DatasetUpdate.jsx b/src/components/data_update/DatasetUpdate.jsx index 9c1859871..729e20c00 100644 --- a/src/components/data_update/DatasetUpdate.jsx +++ b/src/components/data_update/DatasetUpdate.jsx @@ -88,7 +88,7 @@ export const DatasetUpdate = (props) => { asProperty('Phenotype/Indication', formData.properties.phenotype), asProperty('# of participants', formData.properties.nrParticipants), asProperty('Description', formData.properties.description), - asProperty('dbGAP', formData.properties.dbGap), + asProperty('URL', formData.properties.url), asProperty('Data Depositor', formData.properties.dataDepositor), asProperty('Principal Investigator(PI)', formData.properties.principalInvestigator), ] @@ -118,7 +118,7 @@ export const DatasetUpdate = (props) => { phenotype: extract('Phenotype/Indication'), nrParticipants: extract('# of participants'), description: extract('Description'), - dbGap: extract('dbGAP'), + url: extract('url'), dataDepositor: extract('Data Depositor'), principalInvestigator: dataset?.study?.piName || extract('Principal Investigator(PI)'), }, @@ -173,12 +173,12 @@ export const DatasetUpdate = (props) => { }} /> { - formData.properties.dbGap = value; + formData.properties.url = value; }} /> { }; const getDbGapLinkValue = (properties) => { - const href = getPropertyValue(properties, 'dbGAP', ''); + const href = getPropertyValue(properties, 'url', ''); return href.length > 0 ? Link : ---; @@ -72,7 +72,7 @@ const DacDatasetsModal = (props) => { Dataset Id Dataset Name - dbGap + URL Structured Data Use Limitations Data Type Phenotype/Indication diff --git a/src/pages/DatasetCatalog.js b/src/pages/DatasetCatalog.js index f67b81f78..29b8be3b6 100644 --- a/src/pages/DatasetCatalog.js +++ b/src/pages/DatasetCatalog.js @@ -100,7 +100,7 @@ export default function DatasetCatalog(props) { row.checked = false; row.ix = index; row.dbGapLink = - getOr('')('propertyValue')(find({propertyName: 'dbGAP'})(row.properties)); + getOr('')('propertyValue')(find({propertyName: 'url'})(row.properties)); // Extracting these fields to make sorting easier row['Dataset ID'] = row.datasetIdentifier; row['Data Access Committee'] = findDacName(localDacs, row); diff --git a/src/pages/DatasetRegistration.js b/src/pages/DatasetRegistration.js index 374784352..728b4d93d 100644 --- a/src/pages/DatasetRegistration.js +++ b/src/pages/DatasetRegistration.js @@ -135,7 +135,7 @@ class DatasetRegistration extends Component { let phenotype = fp.find({propertyName: 'Phenotype/Indication'})(dataset.properties); let nrParticipants = fp.find({propertyName: '# of participants'})(dataset.properties); let description = fp.find({propertyName: 'Description'})(dataset.properties); - let datasetRepoUrl = fp.find({propertyName: 'dbGAP'})(dataset.properties); + let datasetRepoUrl = fp.find({propertyName: 'url'})(dataset.properties); let researcher = fp.find({propertyName: 'Data Depositor'})(dataset.properties); let pi = fp.find({propertyName: 'Principal Investigator(PI)'})(dataset.properties); let dac = fp.find({dacId: dataset.dacId})(this.state.dacList); @@ -555,7 +555,7 @@ class DatasetRegistration extends Component { properties.push({'propertyName': 'Description', 'propertyValue': formData.description}); } if (formData.datasetRepoUrl) { - properties.push({'propertyName': 'dbGAP', 'propertyValue': formData.datasetRepoUrl}); + properties.push({'propertyName': 'url', 'propertyValue': formData.datasetRepoUrl}); } if (formData.researcher) { properties.push({'propertyName': 'Data Depositor', 'propertyValue': formData.researcher});