Skip to content

Commit 92c8eef

Browse files
padback
1 parent b4f8911 commit 92c8eef

4 files changed

Lines changed: 32 additions & 18 deletions

File tree

docs/command.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ optional parameters
104104

105105
* ``-deriv`` : creates a derivatives directory, with all important files, properly named following BIDS derivatives convertion. See :ref:`Derivatives <derivatives>` for a descrition of the outputs
106106

107-
* ``-pad`` : exports most important files in native (original) space
107+
* ``-padback`` : exports most important files in native (original) space
108108

109109
------------------------
110110
more optional parameters
@@ -135,4 +135,4 @@ Command line examples
135135
136136
.. code:: bash
137137
138-
$ python workflows/segment_pnh.py -data ~/Data_maca -out ./local_test -soft ANTS -params params.json -sub Apache Baron -ses 01 -rec mean -deriv -pad
138+
$ python workflows/segment_pnh.py -data ~/Data_maca -out ./local_test -soft ANTS -params params.json -sub Apache Baron -ses 01 -rec mean -deriv -padback

docs/derivatives.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ Depending on the options provided by command line and params.json, different fil
1313

1414
Derivatives will be output if option ``-deriv`` is provided to the command line (See `Commands <commands>`):
1515

16-
All files are by default in stereo space; if option ``-pad`` is provided to the command line (See `Commands <commands>`), files in native will also be output.
16+
All files are by default in stereo space; if option ``-padback`` is provided to the command line (See `Commands <commands>`), files in native will also be output.
1717

1818
Data Preparation
1919
****************
2020

21+
|
22+
2123
Original files (possibly after reorientation and avereging):
2224

2325
*sub-Stevie_ses-01_space-native_T1w.nii.gz*
@@ -26,7 +28,7 @@ Original files (possibly after reorientation and avereging):
2628

2729
|
2830
29-
If -pad is defined in command line (See `Commands <commands>`):
31+
If ``-padback`` is defined in command line (See `Commands <commands>`):
3032

3133
*sub-Stevie_ses-01_space-native_desc-denoised_T1w.nii.gz*
3234

@@ -68,18 +70,26 @@ Transformations:
6870

6971
*sub-Stevie_ses-01_space-stereo_target-native_affine.txt*
7072

73+
|
74+
7175
Brain extraction
7276
****************
7377

78+
|
79+
7480
Brain mask:
7581

7682
*sub-Stevie_ses-01_space-stereo_desc-brain_mask.nii.gz*
7783

7884
*sub-Stevie_ses-01_space-native_desc-brain_mask.nii.gz*
7985

86+
|
87+
8088
Brain segmentation
8189
******************
8290

91+
|
92+
8393
Brainmasked files after T1*T2 Bias correction:
8494

8595
*sub-Stevie_ses-01_space-stereo_desc-debiased_desc-brain_T1w.nii.gz*
@@ -114,9 +124,13 @@ Segmentated files as indexed tisses:
114124

115125
*sub-Stevie_ses-01_space-native_desc-brain_dseg.nii.gz*
116126

127+
|
128+
117129
Optional Post brain segmentation
118130
********************************
119131

132+
|
133+
120134
Segmented files in mrtrix format:
121135

122136
*sub-Stevie_ses-01_space-stereo_desc-5tt_dseg.nii.gz*

docs/quick_test.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Testing from Singularity image
2525

2626
.. code:: bash
2727
28-
$ singularity run -B /path/to/data:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg_test -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2
28+
$ singularity run -B /path/to/data:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg_test -species marmo -sub Tresor -ses 01 -deriv -padback -dt T1 T2
2929
30-
$ singularity run -B /path/to/data:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg_prep -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2
30+
$ singularity run -B /path/to/data:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg_prep -species marmo -sub Tresor -ses 01 -deriv -padback -dt T1 T2
3131
32-
$ singularity run -B /path/to/data:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg_noseg -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2
32+
$ singularity run -B /path/to/data:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg_noseg -species marmo -sub Tresor -ses 01 -deriv -padback -dt T1 T2
3333
34-
$ singularity run -B /path/to/data:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2
34+
$ singularity run -B /path/to/data:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg -species marmo -sub Tresor -ses 01 -deriv -padback -dt T1 T2
3535
3636
3737
The 4 commands earlier corresponds to brain segmentation performed on an example of marmoset (Tresor) . The 4 steps corresponds to incremental processings, and can performed in the given order. It is possible to test directly the last command (with *-soft ANTS*), but the caching system of nipype should work and the previous steps will not be performed again.
@@ -68,7 +68,7 @@ For testing the docker installation, the beginning of the commands should be rep
6868

6969
.. code:: bash
7070
71-
$ docker run -v /path/to/data:/data macatools/macapype:v0.5 segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2
71+
$ docker run -v /path/to/data:/data macatools/macapype:v0.5 segment_pnh -data /data/macapype_CI_v2.1/cerimed_marmo -out /data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg -species marmo -sub Tresor -ses 01 -deriv -padback -dt T1 T2
7272
7373
7474
Testing from python package install
@@ -78,13 +78,13 @@ From pip install
7878
~~~~~~~~~~~~~~~~
7979
.. code:: bash
8080
81-
$ segment_pnh -data /path/to/data/macapype_CI_v2.1/cerimed_marmo -out /path/to/data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2
81+
$ segment_pnh -data /path/to/data/macapype_CI_v2.1/cerimed_marmo -out /path/to/data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg -species marmo -sub Tresor -ses 01 -deriv -padback -dt T1 T2
8282
8383
From github install
8484
~~~~~~~~~~~~~~~~
8585
.. code:: bash
8686
87-
$ python workflows/segment_pnh.py -data /path/to/data/macapype_CI_v2.1/cerimed_marmo -out /path/to/data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2
87+
$ python workflows/segment_pnh.py -data /path/to/data/macapype_CI_v2.1/cerimed_marmo -out /path/to/data/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_robustreg -species marmo -sub Tresor -ses 01 -deriv -padback -dt T1 T2
8888
8989
**Note the /path/to/data instead of /data (as in the container install) in the arguments**
9090

@@ -100,22 +100,22 @@ Baboon
100100

101101
.. code:: bash
102102
103-
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_adult -soft ANTS -species baboon -sub Prune -ses 3 -deriv -pad -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
103+
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_adult -soft ANTS -species baboon -sub Prune -ses 3 -deriv -padback -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
104104
105-
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_all_ages -soft ANTS -species baboon3 -sub Prune -ses 3 -deriv -pad -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
105+
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_all_ages -soft ANTS -species baboon3 -sub Prune -ses 3 -deriv -padback -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
106106
107-
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_all_ages -soft ANTS -species baboon2 -sub Prune -ses 2 -deriv -pad -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
107+
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_all_ages -soft ANTS -species baboon2 -sub Prune -ses 2 -deriv -padback -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
108108
109-
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_all_ages -soft ANTS -species baboon1 -sub Prune -ses 1 -deriv -pad -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
109+
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_all_ages -soft ANTS -species baboon1 -sub Prune -ses 1 -deriv -padback -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
110110
111-
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_all_ages -soft ANTS -species baboon0 -sub Prune -ses 0 -deriv -pad -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
111+
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data /data/macapype_CI_v2.1/cerimed_baboon -out /data/macapype_CI_v2.1/cerimed_baboon/results_all_ages -soft ANTS -species baboon0 -sub Prune -ses 0 -deriv -padback -dt T1 T2 -indiv /data/cerimed_baboon/indiv_params_segment_baboon.json
112112
113113
Macaque
114114
*******
115115

116116
.. code:: bash
117117
118-
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data segment_pnh -data /data/macapype_CI_v2.1/cerimed_macaque -out /data/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_robustreg -sub Stevie -ses 01 -deriv -pad -dt T1 T2 -species macaque
118+
$ singularity run -B /path/to/data/:/data /path/to/containers/macapype_v0.5.sif segment_pnh -data segment_pnh -data /data/macapype_CI_v2.1/cerimed_macaque -out /data/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_robustreg -sub Stevie -ses 01 -deriv -padback -dt T1 T2 -species macaque
119119
120120
Testing different pipelines and options
121121
#######################################

workflows/segment_pnh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ def main():
624624
help="output derivatives in BIDS orig directory",
625625
required=False)
626626

627-
parser.add_argument("-pad", dest="pad", action='store_true',
627+
parser.add_argument("-pad", "-padback", dest="pad", action='store_true',
628628
help="padding mask and seg_mask",
629629
required=False)
630630

0 commit comments

Comments
 (0)