Skip to content

Commit 1127558

Browse files
authored
Merge pull request #1159 from ZhifangYe/master
ENH: Pre-cache DKT31 template in Docker image
2 parents 4aa12b2 + 7db9a31 commit 1127558

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

docker/scripts/get_templates.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ OASIS_TEMPLATE="https://files.osf.io/v1/resources/fvuh8/providers/osfstorage/584
88
OASIS_SHA256="d87300e91346c16f55baf6f54f5f990bc020b61e8d5df9bcc3abb0cc4b943113"
99
NKI_TEMPLATE="https://files.osf.io/v1/resources/fvuh8/providers/osfstorage/59cd90f46c613b02b3d79782"
1010
NKI_SHA256="4bba067f6675d15be96b205cb227e18a540673fd7e4577e13feedcef3a6f0ec5"
11+
OASIS_DKT31_TEMPLATE="https://files.osf.io/v1/resources/fvuh8/providers/osfstorage/5b16f17aeca4a80012bd7542"
12+
OASIS_DKT31_SHA256="623fa7141712b1a7263331dba16eb069a4443e9640f52556c89d461611478145"
1113

1214
GET(){
1315
URL=$1; SHA256=$2;
@@ -32,4 +34,6 @@ echo "Getting OASIS template"
3234
GET "$OASIS_TEMPLATE" "$OASIS_SHA256"
3335
echo "Getting NKI template"
3436
GET "$NKI_TEMPLATE" "$NKI_SHA256"
37+
echo "Getting OASIS DKT31 template"
38+
GET "$OASIS_DKT31_TEMPLATE" "$OASIS_DKT31_SHA256"
3539
echo "Done!"

docs/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ dependencies:
2828
- svgutils
2929
- nitime
3030
- nilearn
31-
- niworkflows>=0.4.0
31+
- niworkflows>=0.4.1

fmriprep/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
'pybids>=0.5.1',
7272
'nitime',
7373
'nipype>=1.0.4',
74-
'niworkflows>=0.4.0',
74+
'niworkflows>=0.4.1',
7575
'statsmodels',
7676
'nipype',
7777
'seaborn',

fmriprep/interfaces/cifti.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,10 @@ def _fetch_data(self):
130130
raise IOError("Freesurfer annotations for %s not found in %s" % (
131131
self.inputs.surface_target, self.inputs.subjects_dir))
132132

133-
label_space = 'oasis_dkt31_mni152'
134-
label_template = os.path.dirname(getters.get_dataset(label_space))
135-
label_file = os.path.join(label_template,
136-
'oasis_trt20_DKT31-MNI152NLin',
137-
('OASIS-TRT-20_jointfusion_DKT31_CMA_labels'
138-
'_in_MNI152NLin2009cAsym_2mm_v2.nii.gz'))
133+
label_space = 'tpl-OASISTRT20'
134+
label_dir = getters.get_oasis_dkt31_mni152()
135+
label_file = os.path.join(label_dir,
136+
'tpl-OASISTRT20_variant-DKT31_space-MNI152NLin2009cAsym.nii.gz')
139137

140138
download_link = getters.OSF_PROJECT_URL + getters.OSF_RESOURCES[label_space][0]
141139
return annotation_files, label_file, download_link

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
niworkflows>=0.4.0
1+
niworkflows>=0.4.1
22
versioneer

0 commit comments

Comments
 (0)