Skip to content

Commit b9cdd3a

Browse files
committed
doc: include metadata in workflow description
1 parent bdd07c9 commit b9cdd3a

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

fmriprep/workflows/bold/resampling.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ def init_wb_surf_surf_wf(
677677
678678
from fmriprep.workflows.bold.resampling import init_wb_surf_surf_wf
679679
wf = init_wb_surf_surf_wf(
680-
space='fsLR',
680+
template='fsLR',
681681
density='32k',
682682
omp_nthreads=1,
683683
mem_gb=1,
@@ -782,7 +782,7 @@ def init_wb_surf_surf_wf(
782782
resample_to_template = pe.Node(
783783
MetricResample(method='ADAP_BARY_AREA', area_surfs=True),
784784
name='resample_to_template',
785-
mem_gb=1,
785+
mem_gb=mem_gb,
786786
n_procs=omp_nthreads,
787787
)
788788

@@ -806,6 +806,18 @@ def init_wb_surf_surf_wf(
806806
]),
807807
]) # fmt:skip
808808

809+
# Fetch template metadata
810+
template_meta = tf.get_metadata(template.split(':')[0])
811+
template_refs = ['@{}'.format(template.split(':')[0].lower())]
812+
if template_meta.get('RRID', None):
813+
template_refs += [f'RRID:{template_meta["RRID"]}']
814+
815+
workflow.__desc__ = f"""\
816+
The BOLD series was resampled to *{template_meta['Name']}* [
817+
{', '.join(template_refs)}; TemplateFlow ID: {template}] surface with
818+
`wb_command -metric-resample`, leveraging surface files generated by FreeSurfer.
819+
"""
820+
809821
return workflow
810822

811823

0 commit comments

Comments
 (0)