Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import os
from collections import OrderedDict
from bids import BIDSLayout
os.environ['FREESURFER_HOME'] = os.getcwd()
from smriprep.workflows.base import init_smriprep_wf
wf = init_smriprep_wf(
debug=False,
freesurfer=True,
hires=True,
layout=BIDSLayout('.', validate=False),
longitudinal=False,
low_mem=False,
omp_nthreads=1,
output_dir='.',
output_spaces=OrderedDict([('MNI152NLin2009cAsym', {}),
('fsaverage5', {})]),
run_uuid='testrun',
skull_strip_fixed_seed=False,
skull_strip_template=('OASIS30ANTs', {}),
subject_list=['smripreptest'],
work_dir='.',
)
import os
from collections import namedtuple
BIDSLayout = namedtuple('BIDSLayout', ['root'])
os.environ['FREESURFER_HOME'] = os.getcwd()
from smriprep.workflows.base import init_smriprep_wf
from niworkflows.utils.spaces import SpatialReferences, Reference
wf = init_smriprep_wf(
debug=False,
fast_track=False,
freesurfer=True,
fs_subjects_dir=None,
hires=True,
layout=BIDSLayout('.'),
longitudinal=False,
low_mem=False,
omp_nthreads=1,
output_dir='.',
run_uuid='testrun',
skull_strip_fixed_seed=False,
skull_strip_mode='force',
skull_strip_template=Reference('OASIS30ANTs'),
spaces=SpatialReferences(spaces=['MNI152NLin2009cAsym', 'fsaverage5']),
subject_list=['smripreptest'],
if opts.run_uuid is not None:
run_uuid = opts.run_uuid
retval['return_code'] = generate_reports(subject_list, str(output_dir), run_uuid,
packagename="smriprep")
return retval
logger.log(25, INIT_MSG(
version=__version__,
bids_dir=bids_dir,
subject_list=subject_list,
uuid=run_uuid,
spaces=opts.output_spaces)
)
# Build main workflow
retval['workflow'] = init_smriprep_wf(
debug=opts.sloppy,
fast_track=opts.fast_track,
freesurfer=opts.run_reconall,
fs_subjects_dir=opts.fs_subjects_dir,
hires=opts.hires,
layout=layout,
longitudinal=opts.longitudinal,
low_mem=opts.low_mem,
omp_nthreads=omp_nthreads,
output_dir=str(output_dir),
run_uuid=run_uuid,
skull_strip_fixed_seed=opts.skull_strip_fixed_seed,
skull_strip_mode=opts.skull_strip_mode,
skull_strip_template=opts.skull_strip_template[0],
spaces=opts.output_spaces,
subject_list=subject_list,