From a857573ddaafedd221a7f71be2cfd4abc95630f3 Mon Sep 17 00:00:00 2001 From: Xiao Gui <xgui3783@gmail.com> Date: Fri, 10 Jan 2020 10:40:42 +0100 Subject: [PATCH] chore update to big brain fetching logic --- deploy/datasets/util.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/deploy/datasets/util.js b/deploy/datasets/util.js index 2b8e7c7ad..bda610f0b 100644 --- a/deploy/datasets/util.js +++ b/deploy/datasets/util.js @@ -73,6 +73,7 @@ const populateSet = (flattenedRegions, set = new Set()) => { const initPrArray = [] let juBrainSet = new Set(), + bigbrainCytoSet = new Set() shortBundleSet = new Set(), longBundleSet = new Set(), waxholm1Set = new Set(), @@ -81,6 +82,16 @@ let juBrainSet = new Set(), allen2015Set = new Set(), allen2017Set = new Set() +initPrArray.push( + readConfigFile('bigbrain.json') + .then(data => JSON.parse(data)) + .then(json => { + const bigbrainCyto = flattenArray(json.parcellations.find(({ name }) => name === 'Cytoarchitectonic Maps').regions) + bigbrainCytoSet = populateSet(bigbrainCyto) + }) + .catch(console.error) +) + initPrArray.push( readConfigFile('MNI152.json') .then(data => JSON.parse(data)) @@ -200,6 +211,9 @@ const filterDataset = async (dataset = null, { templateName, parcellationName }) let overwriteParcellationName switch (parcellationName) { case 'Cytoarchitectonic Maps': + useSet = bigbrainCytoSet + overwriteParcellationName = 'Jülich Cytoarchitechtonic Brain Atlas (human)' + break; case 'JuBrain Cytoarchitectonic Atlas': useSet = juBrainSet overwriteParcellationName = 'Jülich Cytoarchitechtonic Brain Atlas (human)' -- GitLab