Skip to content

Commit 8289ade

Browse files
authored
FIX: Boilerplate (#157)
* RF: Replace fMRIPrep with NiBabies * FIX: Boilerplate, missing bib entries
1 parent b89ca83 commit 8289ade

File tree

8 files changed

+66
-24
lines changed

8 files changed

+66
-24
lines changed

nibabies/cli/parser.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,8 @@ def _slice_time_ref(value, parser):
157157
metavar="FILE",
158158
help="a JSON file describing custom BIDS input filters using PyBIDS. "
159159
"For further details, please check out "
160-
"https://fmriprep.readthedocs.io/en/%s/faq.html#"
161-
"how-do-I-select-only-certain-files-to-be-input-to-fMRIPrep"
162-
% (currentv.base_version if is_release else "latest"),
160+
"https://fmriprep.readthedocs.io/en/latest/faq.html#"
161+
"how-do-I-select-only-certain-files-to-be-input-to-fMRIPrep",
163162
)
164163
g_bids.add_argument(
165164
"--anat-derivatives",
@@ -276,8 +275,7 @@ def _slice_time_ref(value, parser):
276275
Important to note, the ``res-*`` modifier does not define the resolution used for \
277276
the spatial normalization. To generate no BOLD outputs, use this option without specifying \
278277
any spatial references. For further details, please check out \
279-
https://fmriprep.readthedocs.io/en/%s/spaces.html"""
280-
% (currentv.base_version if is_release else "latest"),
278+
https://fmriprep.readthedocs.io/en/latest/spaces.html""",
281279
)
282280

283281
g_conf.add_argument(

nibabies/data/boilerplate.bib

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,44 @@ @article{posse_t2s
338338
volume = 42,
339339
year = 1999
340340
}
341+
342+
@article{topup,
343+
author = {Jesper L.R. Andersson and Stefan Skare and John Ashburner},
344+
title = {How to correct susceptibility distortions in spin-echo echo-planar images: application to diffusion tensor imaging},
345+
journal = {NeuroImage},
346+
volume = 20,
347+
number = 2,
348+
pages = {870-888},
349+
year = 2003,
350+
issn = {1053-8119},
351+
doi = {10.1016/S1053-8119(03)00336-7},
352+
url = {https://www.sciencedirect.com/science/article/pii/S1053811903003367}
353+
}
354+
355+
@article{mniinfant,
356+
doi = {10.1016/s1053-8119(09)70884-5},
357+
url = {https://doi.org/10.1016%2Fs1053-8119%2809%2970884-5},
358+
year = 2009,
359+
month = {jul},
360+
publisher = {Elsevier {BV}},
361+
volume = {47},
362+
pages = {S102},
363+
author = {VS Fonov and AC Evans and RC McKinstry and CR Almli and DL Collins},
364+
title = {Unbiased nonlinear average age-appropriate brain templates from birth to adulthood},
365+
journal = {{NeuroImage}}
366+
}
367+
368+
@article{uncinfant,
369+
doi = {10.1371/journal.pone.0018746},
370+
url = {https://doi.org/10.1371%2Fjournal.pone.0018746},
371+
year = 2011,
372+
month = {apr},
373+
publisher = {Public Library of Science ({PLoS})},
374+
volume = {6},
375+
number = {4},
376+
pages = {e18746},
377+
author = {Feng Shi and Pew-Thian Yap and Guorong Wu and Hongjun Jia and John H. Gilmore and Weili Lin and Dinggang Shen},
378+
editor = {Hitoshi Okazawa},
379+
title = {Infant Brain Atlases from Neonates to 1- and 2-Year-Olds},
380+
journal = {{PLoS} {ONE}}
381+
}

nibabies/interfaces/reports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ def _generate_segment(self):
281281

282282

283283
class AboutSummaryInputSpec(BaseInterfaceInputSpec):
284-
version = Str(desc="FMRIPREP version")
285-
command = Str(desc="FMRIPREP command")
284+
version = Str(desc="NiBabies version")
285+
command = Str(desc="NiBabies command")
286286
# Date not included - update timestamp only if version or command changes
287287

288288

nibabies/utils/bids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def write_derivative_description(bids_dir, deriv_dir):
5454
if "NIBABIES_DOCKER_TAG" in os.environ:
5555
desc["GeneratedBy"][0]["Container"] = {
5656
"Type": "docker",
57-
"Tag": f"nipreps/fmriprep:{os.environ['NIBABIES_DOCKER_TAG']}",
57+
"Tag": f"nipreps/nibabies:{os.environ['NIBABIES_DOCKER_TAG']}",
5858
}
5959
if "NIBABIES_SINGULARITY_URL" in os.environ:
6060
desc["GeneratedBy"][0]["Container"] = {

nibabies/utils/confounds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def acompcor_masks(in_files, is_aseg=False, zooms=None):
6767
believe that they always operated slice-wise given the large slice-thickness of
6868
their functional data.
6969
70-
Instead, *fMRIPrep*'s implementation deviates from Behzadi's implementation on two
70+
Instead, *NiBabies*'s implementation deviates from Behzadi's implementation on two
7171
aspects:
7272
7373
* the masks are prepared in high-resolution, anatomical space and then

nibabies/workflows/anatomical/base.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def init_infant_anat_wf(
7575
GIFTI surfaces (gray/white boundary, midthickness, pial, inflated)
7676
"""
7777
from nipype.interfaces.ants.base import Info as ANTsInfo
78+
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
7879

7980
from ...utils.misc import fix_multi_source_name
8081
from .brain_extraction import init_infant_brain_extraction_wf
@@ -89,12 +90,11 @@ def init_infant_anat_wf(
8990
num_t1w = len(t1w) if t1w else 0
9091
num_t2w = len(t2w) if t2w else 0
9192

92-
wf = pe.Workflow(name=name)
93-
desc = """Anatomical data preprocessing
93+
wf = Workflow(name=name)
94+
desc = f"""\n
95+
Anatomical data preprocessing
9496
95-
: """
96-
desc += f"""\
97-
A total of {num_t1w} T1w and {num_t2w} T2w images were found within the input
97+
: A total of {num_t1w} T1w and {num_t2w} T2w images were found within the input
9898
BIDS dataset."""
9999

100100
inputnode = pe.Node(
@@ -130,6 +130,7 @@ def init_infant_anat_wf(
130130
)
131131

132132
if existing_derivatives:
133+
# TODO: verify reuse anat
133134
raise NotImplementedError("Reusing derivatives is not yet supported.")
134135

135136
desc += (
@@ -159,6 +160,8 @@ def init_infant_anat_wf(
159160
ants_ver=ANTsInfo.version() or "(version unknown)",
160161
skullstrip_tpl=skull_strip_template.fullname,
161162
)
163+
wf.__postdesc__ = ""
164+
162165
# Define output workflows
163166
anat_reports_wf = init_anat_reports_wf(
164167
freesurfer=freesurfer, output_dir=output_dir, sloppy=sloppy

nibabies/workflows/base.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def init_single_subject_wf(subject_id):
170170
config.loggers.workflow.warning(
171171
f"""\
172172
Attempted to access pre-existing anatomical derivatives at \
173-
<{config.execution.anat_derivatives}>, however not all expectations of fMRIPrep \
173+
<{config.execution.anat_derivatives}>, however not all expectations of NiBabies \
174174
were met (for participant <{subject_id}>, spaces <{', '.join(std_spaces)}>, \
175175
reconall <{config.workflow.run_reconall}>)."""
176176
)
@@ -184,29 +184,29 @@ def init_single_subject_wf(subject_id):
184184
workflow = Workflow(name=name)
185185
workflow.__desc__ = """
186186
Results included in this manuscript come from preprocessing
187-
performed using *fMRIPrep* {fmriprep_ver}
188-
(@fmriprep1; @fmriprep2; RRID:SCR_016216),
189-
which is based on *Nipype* {nipype_ver}
187+
performed using *NiBabies* {nibabies_ver},
188+
derived from fMRIPrep (@fmriprep1; @fmriprep2; RRID:SCR_016216).
189+
The underlying workflow engine used is *Nipype* {nipype_ver}
190190
(@nipype1; @nipype2; RRID:SCR_002502).
191191
192192
""".format(
193-
fmriprep_ver=config.environment.version,
193+
nibabies_ver=config.environment.version,
194194
nipype_ver=config.environment.nipype_version,
195195
)
196196
workflow.__postdesc__ = """
197197
198-
Many internal operations of *fMRIPrep* use
198+
Many internal operations of *NiBabies* use
199199
*Nilearn* {nilearn_ver} [@nilearn, RRID:SCR_001362],
200200
mostly within the functional processing workflow.
201201
For more details of the pipeline, see [the section corresponding
202-
to workflows in *fMRIPrep*'s documentation]\
202+
to workflows in *nibabies*'s documentation]\
203203
(https://nibabies.readthedocs.io/en/latest/workflows.html \
204-
"FMRIPrep's documentation").
204+
"NiBabies's documentation").
205205
206206
207207
### Copyright Waiver
208208
209-
The above boilerplate text was automatically generated by fMRIPrep
209+
The above boilerplate text was automatically generated by NiBabies
210210
with the express intention that users should copy and paste this
211211
text into their manuscripts *unchanged*.
212212
It is released under the [CC0]\

nibabies/workflows/bold/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
def init_func_preproc_wf(bold_file, has_fieldmap=False):
4545
"""
46-
This workflow controls the functional preprocessing stages of *fMRIPrep*.
46+
This workflow controls the functional preprocessing stages of *NiBabies*.
4747
4848
Workflow Graph
4949
.. workflow::

0 commit comments

Comments
 (0)