@@ -19,11 +19,11 @@ def fetch_MNI2009():
1919 tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_desc-fMRIPrep_boldref.nii.gz
2020 tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_label-brain_probseg.nii.gz
2121 """
22- template = " MNI152NLin2009cAsym"
22+ template = ' MNI152NLin2009cAsym'
2323
24- tf .get (template , resolution = 2 , desc = " brain" , suffix = " mask" )
25- tf .get (template , resolution = 2 , desc = " fMRIPrep" , suffix = " boldref" )
26- tf .get (template , resolution = 1 , label = " brain" , suffix = " probseg" )
24+ tf .get (template , resolution = 2 , desc = ' brain' , suffix = ' mask' )
25+ tf .get (template , resolution = 2 , desc = ' fMRIPrep' , suffix = ' boldref' )
26+ tf .get (template , resolution = 1 , label = ' brain' , suffix = ' probseg' )
2727
2828
2929def fetch_MNI152Lin ():
@@ -33,10 +33,10 @@ def fetch_MNI152Lin():
3333 tpl-MNI152Lin/tpl-MNI152Lin_res-02_T1w.nii.gz
3434 tpl-MNI152Lin/tpl-MNI152Lin_res-02_desc-brain_mask.nii.gz
3535 """
36- template = " MNI152Lin"
36+ template = ' MNI152Lin'
3737
38- tf .get (template , resolution = 2 , desc = None , suffix = " T1w" )
39- tf .get (template , resolution = 2 , desc = " brain" , suffix = " mask" )
38+ tf .get (template , resolution = 2 , desc = None , suffix = ' T1w' )
39+ tf .get (template , resolution = 2 , desc = ' brain' , suffix = ' mask' )
4040
4141
4242def fetch_OASIS ():
@@ -50,13 +50,13 @@ def fetch_OASIS():
5050 tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_desc-brain_mask.nii.gz
5151 tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_desc-BrainCerebellumExtraction_mask.nii.gz
5252 """
53- template = " OASIS30ANTs"
53+ template = ' OASIS30ANTs'
5454
55- tf .get (template , resolution = 1 , desc = "4" , suffix = " dseg" )
56- tf .get (template , resolution = 1 , desc = None , suffix = " T1w" )
57- tf .get (template , resolution = 1 , label = " brain" , suffix = " mask" )
58- tf .get (template , resolution = 1 , desc = " BrainCerebellumExtraction" , suffix = " mask" )
59- tf .get (template , resolution = 1 , label = " brain" , suffix = " probseg" )
55+ tf .get (template , resolution = 1 , desc = '4' , suffix = ' dseg' )
56+ tf .get (template , resolution = 1 , desc = None , suffix = ' T1w' )
57+ tf .get (template , resolution = 1 , label = ' brain' , suffix = ' mask' )
58+ tf .get (template , resolution = 1 , desc = ' BrainCerebellumExtraction' , suffix = ' mask' )
59+ tf .get (template , resolution = 1 , label = ' brain' , suffix = ' probseg' )
6060
6161
6262def fetch_fsaverage ():
@@ -70,10 +70,10 @@ def fetch_fsaverage():
7070 tpl-fsaverage/tpl-fsaverage_hemi-L_den-164k_midthickness.surf.gii
7171 tpl-fsaverage/tpl-fsaverage_hemi-R_den-164k_midthickness.surf.gii
7272 """
73- template = " fsaverage"
73+ template = ' fsaverage'
7474
75- tf .get (template , density = " 164k" , desc = " std" , suffix = " sphere" )
76- tf .get (template , density = " 164k" , suffix = " midthickness" )
75+ tf .get (template , density = ' 164k' , desc = ' std' , suffix = ' sphere' )
76+ tf .get (template , density = ' 164k' , suffix = ' midthickness' )
7777
7878
7979def fetch_fsLR ():
@@ -89,7 +89,7 @@ def fetch_fsLR():
8989 tpl-fsLR/tpl-fsLR_space-fsaverage_hemi-L_den-32k_sphere.surf.gii
9090 tpl-fsLR/tpl-fsLR_space-fsaverage_hemi-R_den-32k_sphere.surf.gii
9191 """
92- tf .get (" fsLR" , density = " 32k" )
92+ tf .get (' fsLR' , density = ' 32k' )
9393
9494
9595def fetch_all ():
@@ -100,21 +100,21 @@ def fetch_all():
100100 fetch_fsLR ()
101101
102102
103- if __name__ == " __main__" :
103+ if __name__ == ' __main__' :
104104 parser = argparse .ArgumentParser (
105- description = " Helper script for pre-caching required templates to run fMRIPrep" ,
105+ description = ' Helper script for pre-caching required templates to run fMRIPrep' ,
106106 )
107107 parser .add_argument (
108- " --tf-dir" ,
108+ ' --tf-dir' ,
109109 type = os .path .abspath ,
110- help = " Directory to save templates in. If not provided, templates will be saved to"
111- " `${HOME}/.cache/templateflow`." ,
110+ help = ' Directory to save templates in. If not provided, templates will be saved to'
111+ ' `${HOME}/.cache/templateflow`.' ,
112112 )
113113 opts = parser .parse_args ()
114114
115115 # set envvar (if necessary) prior to templateflow import
116116 if opts .tf_dir is not None :
117- os .environ [" TEMPLATEFLOW_HOME" ] = opts .tf_dir
117+ os .environ [' TEMPLATEFLOW_HOME' ] = opts .tf_dir
118118
119119 import templateflow .api as tf
120120
0 commit comments