From 20ac539998a94d8711cd22fa8f1020e35ff0e734 Mon Sep 17 00:00:00 2001 From: Onur Sumer Date: Thu, 26 Dec 2024 16:20:31 -0500 Subject: [PATCH] add a new step to update mapping files --- data/fetch_autominerva_mappings.sh | 1 + data/fetch_dsa_mappings.sh | 1 + data/update_dsa_mappings.sh | 1 - package.json | 3 ++- 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 data/fetch_autominerva_mappings.sh create mode 100755 data/fetch_dsa_mappings.sh delete mode 100755 data/update_dsa_mappings.sh diff --git a/data/fetch_autominerva_mappings.sh b/data/fetch_autominerva_mappings.sh new file mode 100644 index 00000000..c5102238 --- /dev/null +++ b/data/fetch_autominerva_mappings.sh @@ -0,0 +1 @@ +curl https://d3p249wtgzkn5u.cloudfront.net/final-output/htan-imaging-assets-latest.json diff --git a/data/fetch_dsa_mappings.sh b/data/fetch_dsa_mappings.sh new file mode 100755 index 00000000..2cf0a95f --- /dev/null +++ b/data/fetch_dsa_mappings.sh @@ -0,0 +1 @@ +curl 'https://raw.githubusercontent.com/ncihtan/dsa-htan/master/synapseSync/htanCrosswalkFiles/mvpImageData.working.json' diff --git a/data/update_dsa_mappings.sh b/data/update_dsa_mappings.sh deleted file mode 100755 index 41a1777e..00000000 --- a/data/update_dsa_mappings.sh +++ /dev/null @@ -1 +0,0 @@ -curl 'https://raw.githubusercontent.com/ncihtan/dsa-htan/master/synapseSync/htanCrosswalkFiles/mvpImageData.working.json' > dsa-images.json diff --git a/package.json b/package.json index b249ff33..a4a40647 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ }, "scripts": { "dev": "yarn run next dev", - "updateData": "yarn run findAndReplace && yarn run processSynapseJSON && yarn run gzip", + "updateMappings": "bash data/fetch_autominerva_mappings.sh > data/htan-imaging-assets.json && bash data/fetch_dsa_mappings.sh > data/dsa-images.json", + "updateData": "yarn run findAndReplace && yarn updateMappings && yarn run processSynapseJSON && yarn run gzip", "gzip": "yarn run gzipData && yarn run gzipMetadata", "gzipData": "gzip < public/syn_data.json > public/syn_data.json.gz && gzip < public/processed_syn_data.json > public/processed_syn_data.json.gz", "gzipMetadata": "rm -rf data/metadata_gzip/ && cp -r data/metadata data/metadata_gzip && find data/metadata_gzip -type f -exec gzip {} \\; -exec mv {}.gz {} \\;",