Skip to content

Commit 2502b25

Browse files
committed
flake8
1 parent 83c55e9 commit 2502b25

File tree

4 files changed

+43
-25
lines changed

4 files changed

+43
-25
lines changed

smriprep/cli/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ def get_parser():
209209
"--fs-reuse-base",
210210
action="store_true",
211211
dest="fs_reuse_base",
212-
help="Reuse freesurfer base template (from longitudinal preprocessing)",
212+
help="Reuse freesurfer base template"
213+
"(from longitudinal preprocessing)",
213214
)
214215
# Surface generation xor
215216
g_surfs = parser.add_argument_group("Surface preprocessing options")

smriprep/workflows/anatomical.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def init_anat_preproc_wf(
131131
hires : :obj:`bool`
132132
Enable sub-millimeter preprocessing in FreeSurfer
133133
fs_reuse_base : bool
134-
Adjust pipeline to reuse base template of existing longitudinal freesurfer
134+
Adjust pipeline to reuse base template
135+
of an existing longitudinal freesurfer output
135136
longitudinal : :obj:`bool`
136137
Create unbiased structural template, regardless of number of inputs
137138
(may increase runtime)
@@ -530,7 +531,10 @@ def _check_img(img):
530531

531532
# 5. Surface reconstruction (--fs-no-reconall not set)
532533
surface_recon_wf = init_surface_recon_wf(
533-
name="surface_recon_wf", omp_nthreads=omp_nthreads, hires=hires, fs_reuse_base=fs_reuse_base,
534+
name="surface_recon_wf",
535+
omp_nthreads=omp_nthreads,
536+
hires=hires,
537+
fs_reuse_base=fs_reuse_base,
534538
)
535539
applyrefined = pe.Node(fsl.ApplyMask(), name="applyrefined")
536540
sphere_reg_wf = init_sphere_reg_wf(msm_sulc=msm_sulc, sloppy=sloppy, name="sphere_reg_wf")

smriprep/workflows/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ def init_single_subject_wf(
284284
hires : :obj:`bool`
285285
Enable sub-millimeter preprocessing in FreeSurfer
286286
fs_reuse_base : bool
287-
Adjust pipeline to reuse base template of existing longitudinal freesurfer
287+
Adjust pipeline to reuse base template
288+
of an existing longitudinal freesurfer output
288289
layout : BIDSLayout object
289290
BIDS dataset layout
290291
longitudinal : :obj:`bool`

smriprep/workflows/surfaces.py

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@
5353
from ..interfaces.workbench import CreateSignedDistanceVolume
5454

5555

56-
def init_surface_recon_wf(*, omp_nthreads, hires, fs_reuse_base, name="surface_recon_wf"):
56+
def init_surface_recon_wf(
57+
*,
58+
omp_nthreads,
59+
hires,
60+
fs_reuse_base,
61+
name="surface_recon_wf"
62+
):
5763
r"""
5864
Reconstruct anatomical surfaces using FreeSurfer's ``recon-all``.
5965
@@ -125,7 +131,8 @@ def init_surface_recon_wf(*, omp_nthreads, hires, fs_reuse_base, name="surface_r
125131
hires : bool
126132
Enable sub-millimeter preprocessing in FreeSurfer
127133
fs_reuse_base : bool
128-
Adjust pipeline to reuse base template of existing longitudinal freesurfer
134+
Adjust pipeline to reuse base template
135+
of an existing longitudinal freesurfer output
129136
130137
Inputs
131138
------
@@ -264,42 +271,48 @@ def init_surface_recon_wf(*, omp_nthreads, hires, fs_reuse_base, name="surface_r
264271
# Passing subjects_dir / subject_id enforces serial order
265272
(inputnode, autorecon1, [('subjects_dir', 'subjects_dir'),
266273
('subject_id', 'subject_id')]),
267-
(autorecon1, skull_strip_extern, [('subjects_dir', 'subjects_dir'),
268-
('subject_id', 'subject_id')]),
269-
(skull_strip_extern, autorecon_resume_wf, [('subjects_dir', 'inputnode.subjects_dir'),
270-
('subject_id', 'inputnode.subject_id')]),
274+
(autorecon1, skull_strip_extern, [
275+
('subjects_dir', 'subjects_dir'),
276+
('subject_id', 'subject_id')]),
277+
(skull_strip_extern, autorecon_resume_wf, [
278+
('subjects_dir', 'inputnode.subjects_dir'),
279+
('subject_id', 'inputnode.subject_id')]),
271280
(autorecon_resume_wf, gifti_surface_wf, [
272281
('outputnode.subjects_dir', 'inputnode.subjects_dir'),
273282
('outputnode.subject_id', 'inputnode.subject_id')]),
274283
# Reconstruction phases
275284
(inputnode, autorecon1, [('t1w', 'T1_files')]),
276285
(inputnode, fov_check, [('t1w', 'in_files')]),
277286
(fov_check, autorecon1, [('out', 'flags')]),
278-
(recon_config, autorecon1, [('t2w', 'T2_file'),
279-
('flair', 'FLAIR_file'),
280-
('hires', 'hires'),
281-
# First run only (recon-all saves expert options)
282-
('mris_inflate', 'mris_inflate')]),
283-
(inputnode, skull_strip_extern, [('skullstripped_t1', 'in_brain')]),
284-
(recon_config, autorecon_resume_wf, [('use_t2w', 'inputnode.use_T2'),
285-
('use_flair', 'inputnode.use_FLAIR')]),
287+
(recon_config, autorecon1, [
288+
('t2w', 'T2_file'),
289+
('flair', 'FLAIR_file'),
290+
('hires', 'hires'),
291+
# First run only (recon-all saves expert options)
292+
('mris_inflate', 'mris_inflate')]),
293+
(inputnode, skull_strip_extern, [
294+
('skullstripped_t1', 'in_brain')]),
295+
(recon_config, autorecon_resume_wf, [
296+
('use_t2w', 'inputnode.use_T2'),
297+
('use_flair', 'inputnode.use_FLAIR')]),
286298
(autorecon1, fsnative2t1w_xfm, [('T1', 'source_file')]),
287-
288-
289299
(autorecon_resume_wf, aseg_to_native_wf, [
290300
('outputnode.subjects_dir', 'inputnode.subjects_dir'),
291301
('outputnode.subject_id', 'inputnode.subject_id')]),
292-
293302
(autorecon_resume_wf, aparc_to_native_wf, [
294303
('outputnode.subjects_dir', 'inputnode.subjects_dir'),
295304
('outputnode.subject_id', 'inputnode.subject_id')]),
296305
# Output
297-
(autorecon_resume_wf, outputnode, [('outputnode.subjects_dir', 'subjects_dir'),
298-
('outputnode.subject_id', 'subject_id')]),
306+
(autorecon_resume_wf, outputnode, [
307+
('outputnode.subjects_dir', 'subjects_dir'),
308+
('outputnode.subject_id', 'subject_id')]),
299309
])
300310
# fmt:on
301311
else:
302-
fs_base_inputs = pe.Node(nio.FreeSurferSource(), name='fs_base_inputs')
312+
fs_base_inputs = pe.Node(
313+
nio.FreeSurferSource(),
314+
name='fs_base_inputs'
315+
)
303316

304317
# fmt:off
305318
workflow.connect([
@@ -317,7 +330,6 @@ def init_surface_recon_wf(*, omp_nthreads, hires, fs_reuse_base, name="surface_r
317330
(inputnode, aparc_to_native_wf, [
318331
('subjects_dir', 'inputnode.subjects_dir'),
319332
('subject_id', 'inputnode.subject_id')]),
320-
321333
# Output
322334
(inputnode, outputnode, [('subjects_dir', 'subjects_dir'),
323335
('subject_id', 'subject_id')]),

0 commit comments

Comments
 (0)