junifer 0.0.5.dev62__py3-none-any.whl → 0.0.5.dev86__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. junifer/_version.py +2 -2
  2. junifer/api/cli.py +26 -0
  3. junifer/api/functions.py +1 -1
  4. junifer/api/res/freesurfer/mri_binarize +3 -0
  5. junifer/api/res/freesurfer/mri_mc +3 -0
  6. junifer/api/res/freesurfer/mri_pretess +3 -0
  7. junifer/api/res/freesurfer/mris_convert +3 -0
  8. junifer/api/res/freesurfer/run_freesurfer_docker.sh +61 -0
  9. junifer/configs/juseless/datagrabbers/tests/test_ucla.py +1 -3
  10. junifer/configs/juseless/datagrabbers/ucla.py +9 -9
  11. junifer/data/masks.py +10 -22
  12. junifer/data/parcellations.py +1 -1
  13. junifer/data/tests/test_masks.py +8 -28
  14. junifer/datagrabber/aomic/id1000.py +34 -38
  15. junifer/datagrabber/aomic/piop1.py +33 -37
  16. junifer/datagrabber/aomic/piop2.py +35 -39
  17. junifer/datagrabber/aomic/tests/test_id1000.py +10 -11
  18. junifer/datagrabber/aomic/tests/test_piop1.py +10 -11
  19. junifer/datagrabber/aomic/tests/test_piop2.py +10 -11
  20. junifer/datagrabber/datalad_base.py +10 -1
  21. junifer/datagrabber/dmcc13_benchmark.py +36 -54
  22. junifer/datagrabber/pattern.py +116 -46
  23. junifer/datagrabber/pattern_datalad.py +22 -12
  24. junifer/datagrabber/tests/test_datagrabber_utils.py +15 -9
  25. junifer/datagrabber/tests/test_dmcc13_benchmark.py +46 -19
  26. junifer/datagrabber/utils.py +127 -54
  27. junifer/datareader/default.py +91 -42
  28. junifer/pipeline/utils.py +64 -1
  29. junifer/preprocess/base.py +2 -2
  30. junifer/preprocess/confounds/fmriprep_confound_remover.py +44 -60
  31. junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py +72 -113
  32. junifer/testing/datagrabbers.py +5 -5
  33. junifer/testing/tests/test_partlycloudytesting_datagrabber.py +7 -7
  34. {junifer-0.0.5.dev62.dist-info → junifer-0.0.5.dev86.dist-info}/METADATA +1 -1
  35. {junifer-0.0.5.dev62.dist-info → junifer-0.0.5.dev86.dist-info}/RECORD +40 -35
  36. {junifer-0.0.5.dev62.dist-info → junifer-0.0.5.dev86.dist-info}/AUTHORS.rst +0 -0
  37. {junifer-0.0.5.dev62.dist-info → junifer-0.0.5.dev86.dist-info}/LICENSE.md +0 -0
  38. {junifer-0.0.5.dev62.dist-info → junifer-0.0.5.dev86.dist-info}/WHEEL +0 -0
  39. {junifer-0.0.5.dev62.dist-info → junifer-0.0.5.dev86.dist-info}/entry_points.txt +0 -0
  40. {junifer-0.0.5.dev62.dist-info → junifer-0.0.5.dev86.dist-info}/top_level.txt +0 -0
junifer/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.0.5.dev62'
16
- __version_tuple__ = version_tuple = (0, 0, 5, 'dev62')
15
+ __version__ = version = '0.0.5.dev86'
16
+ __version_tuple__ = version_tuple = (0, 0, 5, 'dev86')
junifer/api/cli.py CHANGED
@@ -588,3 +588,29 @@ def ants_docker() -> None: # pragma: no cover
588
588
  export PATH="$PATH:{ants_wrappers_path}"
589
589
  """
590
590
  click.secho(msg, fg="blue")
591
+
592
+
593
+ @setup.command("freesurfer-docker")
594
+ def freesurfer_docker() -> None: # pragma: no cover
595
+ """Configure FreeSurfer-Docker wrappers."""
596
+ import junifer
597
+
598
+ pkg_path = Path(junifer.__path__[0]) # type: ignore
599
+ fs_wrappers_path = pkg_path / "api" / "res" / "freesurfer"
600
+ msg = f"""
601
+ Installation instructions for FreeSurfer-Docker wrappers:
602
+
603
+ 1. Install Docker: https://docs.docker.com/get-docker/
604
+
605
+ 2. Get the FreeSurfer-Docker image by running this on the command line:
606
+
607
+ docker pull freesurfer/freesurfer
608
+
609
+ 3. Get license from: https://surfer.nmr.mgh.harvard.edu/registration.html .
610
+ You can skip this step if you already have one.
611
+
612
+ 4. Add this line to the ~/.bashrc or ~/.zshrc file:
613
+
614
+ export PATH="$PATH:{fs_wrappers_path}"
615
+ """
616
+ click.secho(msg, fg="blue")
junifer/api/functions.py CHANGED
@@ -362,7 +362,7 @@ def reset(config: Dict) -> None:
362
362
  shutil.rmtree(job_dir)
363
363
  # Remove parent directory (if empty)
364
364
  if not next(os.scandir(job_dir.parent), None):
365
- job_dir.parent.rmdir()
365
+ job_dir.parent.rmdir()
366
366
 
367
367
 
368
368
  def list_elements(
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ run_freesurfer_docker.sh mri_binarize "$@"
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ run_freesurfer_docker.sh mri_mc "$@"
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ run_freesurfer_docker.sh mri_pretess "$@"
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ run_freesurfer_docker.sh mris_convert "$@"
@@ -0,0 +1,61 @@
1
+ #!/bin/bash
2
+
3
+ corrected_args=()
4
+ docker_args=()
5
+ mounts=0
6
+
7
+ FS_LICENSE="${FS_LICENSE:=$HOME/freesurfer_license.txt}"
8
+
9
+ if [ -f "${FS_LICENSE}" ]; then
10
+ >&2 echo "Using freesurfer license from ${FS_LICENSE}"
11
+ else
12
+ >&2 echo "Freesurfer license not found at ${FS_LICENSE}. You can either set FS_LICENSE to the path of the license file or place the license file at
13
+ ${FS_LICENSE}"
14
+ exit 1
15
+ fi
16
+
17
+ # Map the license path to the container by binding
18
+ license_path=$(realpath "${FS_LICENSE}")
19
+ license_path_fname=$(basename "${FS_LICENSE}")
20
+ host_dir=$(dirname "${license_path}")
21
+ ((mounts+=1))
22
+ container_dir="/data/mount_${mounts}"
23
+ docker_args+=("-v ${host_dir}:${container_dir}")
24
+ export DOCKERENV_FS_LICENSE=${container_dir}/${license_path_fname}
25
+
26
+ for var in "$@"
27
+ do
28
+ if [ -d "${var}" ]; then
29
+ echo "$var is a directory" >&2
30
+ var=$(realpath "${var}")
31
+ host_dir=$(dirname "${var}")
32
+ ((mounts+=1))
33
+ container_dir="/data/mount_${mounts}"
34
+ docker_args+=("-v ${host_dir}:${container_dir}")
35
+ var=${container_dir}
36
+ elif [ -f "${var}" ] || [[ "${var}" == /* ]]; then
37
+ if [ -f "${var}" ]; then
38
+ echo "$var is a file" >&2
39
+ var=$(realpath "${var}")
40
+ else
41
+ echo "$var is a prefix" >&2
42
+ fi
43
+ fname=$(basename "${var}")
44
+ host_dir=$(dirname "${var}")
45
+ ((mounts+=1))
46
+ container_dir="/data/mount_${mounts}"
47
+ docker_args+=("-v ${host_dir}:${container_dir}")
48
+ var=${container_dir}/${fname}
49
+ fi
50
+ corrected_args+=("${var}")
51
+ done
52
+
53
+ echo "Docker args: ${docker_args[*]}" >&2
54
+ echo "Corrected args for FreeSurfer: ${corrected_args[*]}" >&2
55
+
56
+ cwd=$(pwd)
57
+ cmd="docker run --rm ${docker_args[*]} -v ${cwd}:${cwd} -w ${cwd} freesurfer/freesurfer ${corrected_args[*]}"
58
+ echo "Running command: ${cmd}" >&2
59
+ ${cmd}
60
+
61
+ unset DOCKERENV_FS_LICENSE
@@ -27,7 +27,6 @@ def test_JuselessUCLA() -> None:
27
27
 
28
28
  types = [
29
29
  "BOLD",
30
- "BOLD_confounds",
31
30
  "T1w",
32
31
  "VBM_CSF",
33
32
  "VBM_GM",
@@ -43,12 +42,11 @@ def test_JuselessUCLA() -> None:
43
42
  "types",
44
43
  [
45
44
  "BOLD",
46
- "BOLD_confounds",
47
45
  "T1w",
48
46
  "VBM_CSF",
49
47
  "VBM_GM",
50
48
  "VBM_WM",
51
- ["BOLD", "BOLD_confounds"],
49
+ ["BOLD", "VBM_CSF"],
52
50
  ["T1w", "VBM_CSF"],
53
51
  ["VBM_GM", "VBM_WM"],
54
52
  ["BOLD", "T1w"],
@@ -23,8 +23,8 @@ class JuselessUCLA(PatternDataGrabber):
23
23
  datadir : str or Path, optional
24
24
  The directory where the dataset is stored.
25
25
  (default "/data/project/psychosis_thalamus/data/fmriprep").
26
- types: {"BOLD", "BOLD_confounds", "T1w", "VBM_CSF", "VBM_GM", \
27
- "VBM_WM"} or a list of the options, optional
26
+ types: {"BOLD", "T1w", "VBM_CSF", "VBM_GM", "VBM_WM"} or \
27
+ list of the options, optional
28
28
  UCLA data types. If None, all available data types are selected.
29
29
  (default None).
30
30
  tasks : {"rest", "bart", "bht", "pamenc", "pamret", \
@@ -76,13 +76,13 @@ class JuselessUCLA(PatternDataGrabber):
76
76
  "MNI152NLin2009cAsym_preproc.nii.gz"
77
77
  ),
78
78
  "space": "MNI152NLin2009cAsym",
79
- },
80
- "BOLD_confounds": {
81
- "pattern": (
82
- "{subject}/func/{subject}_"
83
- "task-{task}_bold_confounds.tsv"
84
- ),
85
- "space": "fmriprep",
79
+ "confounds": {
80
+ "pattern": (
81
+ "{subject}/func/{subject}_"
82
+ "task-{task}_bold_confounds.tsv"
83
+ ),
84
+ "space": "fmriprep",
85
+ },
86
86
  },
87
87
  "T1w": {
88
88
  "pattern": (
junifer/data/masks.py CHANGED
@@ -250,8 +250,8 @@ def get_mask( # noqa: C901
250
250
  ValueError
251
251
  If extra key is provided in addition to mask name in ``masks`` or
252
252
  if no mask is provided or
253
- if ``masks = "inherit"`` but ``extra_input`` is None or ``mask_item``
254
- is None or ``mask_items``'s value is not in ``extra_input`` or
253
+ if ``masks = "inherit"`` and ``mask`` key for the ``target_data`` is
254
+ not found or
255
255
  if callable parameters are passed to non-callable mask or
256
256
  if parameters are passed to :func:`nilearn.masking.intersect_masks`
257
257
  when there is only one mask or
@@ -310,8 +310,8 @@ def get_mask( # noqa: C901
310
310
  if len(true_masks) == 0:
311
311
  raise_error("No mask was passed. At least one mask is required.")
312
312
 
313
- # Get the data type for the input data type's mask
314
- inherited_mask_item = target_data.get("mask_item", None)
313
+ # Get the nested mask data type for the input data type
314
+ inherited_mask_item = target_data.get("mask", None)
315
315
 
316
316
  # Create component-scoped tempdir
317
317
  tempdir = WorkDirManager().get_tempdir(prefix="masks")
@@ -330,28 +330,16 @@ def get_mask( # noqa: C901
330
330
  mask_name = t_mask
331
331
  mask_params = None
332
332
 
333
- # If mask is being inherited from previous steps like preprocessing
333
+ # If mask is being inherited from the datagrabber or a preprocessor,
334
+ # check that it's accessible
334
335
  if mask_name == "inherit":
335
- # Requires extra input to be passed
336
- if extra_input is None:
337
- raise_error(
338
- "Cannot inherit mask from another data item "
339
- "because no extra data was passed."
340
- )
341
- # Missing inherited mask item
342
336
  if inherited_mask_item is None:
343
337
  raise_error(
344
- "Cannot inherit mask from another data item "
345
- "because no mask item was specified "
346
- "(missing `mask_item` key in the data object)."
347
- )
348
- # Missing inherited mask item in extra input
349
- if inherited_mask_item not in extra_input:
350
- raise_error(
351
- "Cannot inherit mask from another data item "
352
- f"because the item ({inherited_mask_item}) does not exist."
338
+ "Cannot inherit mask from the target data. Either the "
339
+ "DataGrabber or a Preprocessor does not provide `mask` "
340
+ "for the target data type."
353
341
  )
354
- mask_img = extra_input[inherited_mask_item]["data"]
342
+ mask_img = inherited_mask_item["data"]
355
343
  # Starting with new mask
356
344
  else:
357
345
  # Load mask
@@ -889,7 +889,7 @@ def _retrieve_tian(
889
889
  )
890
890
  with open(parcellation_lname, "w") as filehandle:
891
891
  for listitem in labels:
892
- filehandle.write("%s\n" % listitem)
892
+ filehandle.write(f"{listitem}\n")
893
893
  logger.info(
894
894
  "Currently there are no labels provided for the 7T Tian "
895
895
  "parcellation. A simple numbering scheme for distinction was "
@@ -365,27 +365,10 @@ def test_get_mask_errors() -> None:
365
365
  target_data=vbm_gm,
366
366
  )
367
367
 
368
- # Test "inherited" masks errors
369
-
370
- # 1) No extra_data parameter
371
- with pytest.raises(ValueError, match=r"no extra data was passed"):
368
+ # Test "inherited" masks error
369
+ with pytest.raises(ValueError, match=r"provide `mask`"):
372
370
  get_mask(masks="inherit", target_data=vbm_gm)
373
371
 
374
- extra_input = {"VBM_MASK": {}}
375
-
376
- # 2) No mask_item key in target_data
377
- with pytest.raises(ValueError, match=r"no mask item was specified"):
378
- get_mask(
379
- masks="inherit", target_data=vbm_gm, extra_input=extra_input
380
- )
381
-
382
- # 3) mask_item not in extra data
383
- with pytest.raises(ValueError, match=r"does not exist"):
384
- vbm_gm["mask_item"] = "wrong"
385
- get_mask(
386
- masks="inherit", target_data=vbm_gm, extra_input=extra_input
387
- )
388
-
389
372
 
390
373
  @pytest.mark.parametrize(
391
374
  "mask_name,function,params,resample",
@@ -457,18 +440,15 @@ def test_get_mask_inherit() -> None:
457
440
  )
458
441
 
459
442
  # Now get the mask using the inherit functionality, passing the
460
- # computed mask as extra data
461
- extra_input = {
462
- "BOLD_MASK": {
463
- "data": gm_mask,
464
- "space": element_data["BOLD"]["space"],
465
- }
443
+ # computed mask as the data
444
+ bold_dict = element_data["BOLD"]
445
+ bold_dict["mask"] = {
446
+ "data": gm_mask,
447
+ "space": element_data["BOLD"]["space"],
466
448
  }
467
- element_data["BOLD"]["mask_item"] = "BOLD_MASK"
468
449
  mask2 = get_mask(
469
450
  masks="inherit",
470
- target_data=element_data["BOLD"],
471
- extra_input=extra_input,
451
+ target_data=bold_dict,
472
452
  )
473
453
 
474
454
  # Both masks should be equal
@@ -24,9 +24,8 @@ class DataladAOMICID1000(PatternDataladDataGrabber):
24
24
  The directory where the datalad dataset will be cloned. If None,
25
25
  the datalad dataset will be cloned into a temporary directory
26
26
  (default None).
27
- types: {"BOLD", "BOLD_confounds", "BOLD_mask", "T1w", "T1w_mask", \
28
- "VBM_CSF", "VBM_GM", "VBM_WM", "DWI"} or \
29
- a list of the options, optional
27
+ types: {"BOLD", "T1w", "VBM_CSF", "VBM_GM", "VBM_WM", "DWI"} or \
28
+ list of the options, optional
30
29
  AOMIC data types. If None, all available data types are selected.
31
30
  (default None).
32
31
  native_t1w : bool, optional
@@ -49,24 +48,23 @@ class DataladAOMICID1000(PatternDataladDataGrabber):
49
48
  "space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
50
49
  ),
51
50
  "space": "MNI152NLin2009cAsym",
52
- "mask_item": "BOLD_mask",
53
- },
54
- "BOLD_confounds": {
55
- "pattern": (
56
- "derivatives/fmriprep/{subject}/func/"
57
- "{subject}_task-moviewatching_"
58
- "desc-confounds_regressors.tsv"
59
- ),
60
- "format": "fmriprep",
61
- },
62
- "BOLD_mask": {
63
- "pattern": (
64
- "derivatives/fmriprep/{subject}/func/"
65
- "{subject}_task-moviewatching_"
66
- "space-MNI152NLin2009cAsym_"
67
- "desc-brain_mask.nii.gz"
68
- ),
69
- "space": "MNI152NLin2009cAsym",
51
+ "mask": {
52
+ "pattern": (
53
+ "derivatives/fmriprep/{subject}/func/"
54
+ "{subject}_task-moviewatching_"
55
+ "space-MNI152NLin2009cAsym_"
56
+ "desc-brain_mask.nii.gz"
57
+ ),
58
+ "space": "MNI152NLin2009cAsym",
59
+ },
60
+ "confounds": {
61
+ "pattern": (
62
+ "derivatives/fmriprep/{subject}/func/"
63
+ "{subject}_task-moviewatching_"
64
+ "desc-confounds_regressors.tsv"
65
+ ),
66
+ "format": "fmriprep",
67
+ },
70
68
  },
71
69
  "T1w": {
72
70
  "pattern": (
@@ -75,15 +73,14 @@ class DataladAOMICID1000(PatternDataladDataGrabber):
75
73
  "desc-preproc_T1w.nii.gz"
76
74
  ),
77
75
  "space": "MNI152NLin2009cAsym",
78
- "mask_item": "T1w_mask",
79
- },
80
- "T1w_mask": {
81
- "pattern": (
82
- "derivatives/fmriprep/{subject}/anat/"
83
- "{subject}_space-MNI152NLin2009cAsym_"
84
- "desc-brain_mask.nii.gz"
85
- ),
86
- "space": "MNI152NLin2009cAsym",
76
+ "mask": {
77
+ "pattern": (
78
+ "derivatives/fmriprep/{subject}/anat/"
79
+ "{subject}_space-MNI152NLin2009cAsym_"
80
+ "desc-brain_mask.nii.gz"
81
+ ),
82
+ "space": "MNI152NLin2009cAsym",
83
+ },
87
84
  },
88
85
  "VBM_CSF": {
89
86
  "pattern": (
@@ -128,14 +125,13 @@ class DataladAOMICID1000(PatternDataladDataGrabber):
128
125
  "{subject}_desc-preproc_T1w.nii.gz"
129
126
  ),
130
127
  "space": "native",
131
- "mask_item": "T1w_mask",
132
- },
133
- "T1w_mask": {
134
- "pattern": (
135
- "derivatives/fmriprep/{subject}/anat/"
136
- "{subject}_desc-brain_mask.nii.gz"
137
- ),
138
- "space": "native",
128
+ "mask": {
129
+ "pattern": (
130
+ "derivatives/fmriprep/{subject}/anat/"
131
+ "{subject}_desc-brain_mask.nii.gz"
132
+ ),
133
+ "space": "native",
134
+ },
139
135
  },
140
136
  "Warp": {
141
137
  "pattern": (
@@ -26,9 +26,8 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
26
26
  The directory where the datalad dataset will be cloned. If None,
27
27
  the datalad dataset will be cloned into a temporary directory
28
28
  (default None).
29
- types: {"BOLD", "BOLD_confounds", "BOLD_mask", "T1w", "T1w_mask", \
30
- "VBM_CSF", "VBM_GM", "VBM_WM", "DWI"} or \
31
- a list of the options, optional
29
+ types: {"BOLD", "T1w", "VBM_CSF", "VBM_GM", "VBM_WM", "DWI"} or \
30
+ list of the options, optional
32
31
  AOMIC data types. If None, all available data types are selected.
33
32
  (default None).
34
33
  tasks : {"restingstate", "anticipation", "emomatching", "faces", \
@@ -85,23 +84,22 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
85
84
  "space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
86
85
  ),
87
86
  "space": "MNI152NLin2009cAsym",
88
- "mask_item": "BOLD_mask",
89
- },
90
- "BOLD_confounds": {
91
- "pattern": (
92
- "derivatives/fmriprep/{subject}/func/"
93
- "{subject}_task-{task}_"
94
- "desc-confounds_regressors.tsv"
95
- ),
96
- "format": "fmriprep",
97
- },
98
- "BOLD_mask": {
99
- "pattern": (
100
- "derivatives/fmriprep/{subject}/func/"
101
- "{subject}_task-{task}_"
102
- "space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz"
103
- ),
104
- "space": "MNI152NLin2009cAsym",
87
+ "mask": {
88
+ "pattern": (
89
+ "derivatives/fmriprep/{subject}/func/"
90
+ "{subject}_task-{task}_"
91
+ "space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz"
92
+ ),
93
+ "space": "MNI152NLin2009cAsym",
94
+ },
95
+ "confounds": {
96
+ "pattern": (
97
+ "derivatives/fmriprep/{subject}/func/"
98
+ "{subject}_task-{task}_"
99
+ "desc-confounds_regressors.tsv"
100
+ ),
101
+ "format": "fmriprep",
102
+ },
105
103
  },
106
104
  "T1w": {
107
105
  "pattern": (
@@ -110,15 +108,14 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
110
108
  "desc-preproc_T1w.nii.gz"
111
109
  ),
112
110
  "space": "MNI152NLin2009cAsym",
113
- "mask_item": "T1w_mask",
114
- },
115
- "T1w_mask": {
116
- "pattern": (
117
- "derivatives/fmriprep/{subject}/anat/"
118
- "{subject}_space-MNI152NLin2009cAsym_"
119
- "desc-brain_mask.nii.gz"
120
- ),
121
- "space": "MNI152NLin2009cAsym",
111
+ "mask": {
112
+ "pattern": (
113
+ "derivatives/fmriprep/{subject}/anat/"
114
+ "{subject}_space-MNI152NLin2009cAsym_"
115
+ "desc-brain_mask.nii.gz"
116
+ ),
117
+ "space": "MNI152NLin2009cAsym",
118
+ },
122
119
  },
123
120
  "VBM_CSF": {
124
121
  "pattern": (
@@ -163,14 +160,13 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber):
163
160
  "{subject}_desc-preproc_T1w.nii.gz"
164
161
  ),
165
162
  "space": "native",
166
- "mask_item": "T1w_mask",
167
- },
168
- "T1w_mask": {
169
- "pattern": (
170
- "derivatives/fmriprep/{subject}/anat/"
171
- "{subject}_desc-brain_mask.nii.gz"
172
- ),
173
- "space": "native",
163
+ "mask": {
164
+ "pattern": (
165
+ "derivatives/fmriprep/{subject}/anat/"
166
+ "{subject}_desc-brain_mask.nii.gz"
167
+ ),
168
+ "space": "native",
169
+ },
174
170
  },
175
171
  "Warp": {
176
172
  "pattern": (
@@ -26,13 +26,12 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
26
26
  The directory where the datalad dataset will be cloned. If None,
27
27
  the datalad dataset will be cloned into a temporary directory
28
28
  (default None).
29
- types: {"BOLD", "BOLD_confounds", "BOLD_mask", "T1w", "T1w_mask", \
30
- "VBM_CSF", "VBM_GM", "VBM_WM", "DWI"} or \
31
- a list of the options, optional
29
+ types: {"BOLD", "T1w", "VBM_CSF", "VBM_GM", "VBM_WM", "DWI"} or \
30
+ list of the options, optional
32
31
  AOMIC data types. If None, all available data types are selected.
33
32
  (default None).
34
- tasks : {"restingstate", "stopsignal", "workingmemory"} \
35
- or list of the options, optional
33
+ tasks : {"restingstate", "stopsignal", "workingmemory"} or \
34
+ list of the options, optional
36
35
  AOMIC PIOP2 task sessions. If None, all available task sessions are
37
36
  selected (default None).
38
37
  native_t1w : bool, optional
@@ -82,23 +81,22 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
82
81
  "space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
83
82
  ),
84
83
  "space": "MNI152NLin2009cAsym",
85
- "mask_item": "BOLD_mask",
86
- },
87
- "BOLD_confounds": {
88
- "pattern": (
89
- "derivatives/fmriprep/{subject}/func/"
90
- "{subject}_task-{task}_"
91
- "desc-confounds_regressors.tsv"
92
- ),
93
- "format": "fmriprep",
94
- },
95
- "BOLD_mask": {
96
- "pattern": (
97
- "derivatives/fmriprep/{subject}/func/"
98
- "{subject}_task-{task}_"
99
- "space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz"
100
- ),
101
- "space": "MNI152NLin2009cAsym",
84
+ "mask": {
85
+ "pattern": (
86
+ "derivatives/fmriprep/{subject}/func/"
87
+ "{subject}_task-{task}_"
88
+ "space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz"
89
+ ),
90
+ "space": "MNI152NLin2009cAsym",
91
+ },
92
+ "confounds": {
93
+ "pattern": (
94
+ "derivatives/fmriprep/{subject}/func/"
95
+ "{subject}_task-{task}_"
96
+ "desc-confounds_regressors.tsv"
97
+ ),
98
+ "format": "fmriprep",
99
+ },
102
100
  },
103
101
  "T1w": {
104
102
  "pattern": (
@@ -107,15 +105,14 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
107
105
  "desc-preproc_T1w.nii.gz"
108
106
  ),
109
107
  "space": "MNI152NLin2009cAsym",
110
- "mask_item": "T1w_mask",
111
- },
112
- "T1w_mask": {
113
- "pattern": (
114
- "derivatives/fmriprep/{subject}/anat/"
115
- "{subject}_space-MNI152NLin2009cAsym_"
116
- "desc-brain_mask.nii.gz"
117
- ),
118
- "space": "MNI152NLin2009cAsym",
108
+ "mask": {
109
+ "pattern": (
110
+ "derivatives/fmriprep/{subject}/anat/"
111
+ "{subject}_space-MNI152NLin2009cAsym_"
112
+ "desc-brain_mask.nii.gz"
113
+ ),
114
+ "space": "MNI152NLin2009cAsym",
115
+ },
119
116
  },
120
117
  "VBM_CSF": {
121
118
  "pattern": (
@@ -160,14 +157,13 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber):
160
157
  "{subject}_desc-preproc_T1w.nii.gz"
161
158
  ),
162
159
  "space": "native",
163
- "mask_item": "T1w_mask",
164
- },
165
- "T1w_mask": {
166
- "pattern": (
167
- "derivatives/fmriprep/{subject}/anat/"
168
- "{subject}_desc-brain_mask.nii.gz"
169
- ),
170
- "space": "native",
160
+ "mask": {
161
+ "pattern": (
162
+ "derivatives/fmriprep/{subject}/anat/"
163
+ "{subject}_desc-brain_mask.nii.gz"
164
+ ),
165
+ "space": "native",
166
+ },
171
167
  },
172
168
  "Warp": {
173
169
  "pattern": (