MICA-MNI / micapipe

micapipe from the Multimodal imaging and connectome analysis lab (http://mica-mni.github.io) at the Montreal Neurological Institute. Read The Docs documentation below
http://micapipe.readthedocs.io
GNU General Public License v3.0
86 stars 29 forks source link

Two resting state scans: before and after TMS #48

Closed dkp closed 1 year ago

dkp commented 2 years ago

We have two runs of rsfmri in a single session:

tree inputs/sub-219/ses-itbs/func
inputs/sub-219/ses-itbs/func
├── sub-219_ses-itbs_task-rest_run-01_bold.json
├── sub-219_ses-itbs_task-rest_run-01_bold.nii.gz
├── sub-219_ses-itbs_task-rest_run-01_events.tsv
├── sub-219_ses-itbs_task-rest_run-02_bold.json
├── sub-219_ses-itbs_task-rest_run-02_bold.nii.gz
└── sub-219_ses-itbs_task-rest_run-02_events.tsv

I'd like to process them separately, so I specified and ran two separate docker commands:

docker run -ti --rm \
    -v ${PWD}/inputs:/bids_dataset:ro \
    -v ${PWD}/outputs:/output_directory \
    -v ${PWD}/working:/tmp \
    -v ${PWD}/inputs/code/freesurfer_license_file.txt:/opt/freesurfer-6.0.0/license.txt \
    micalab/micapipe:latest \
    -bids /bids_dataset \
    -out /output_directory \
    -sub 219 -ses itbs \
    -proc_rsfmri \
    -mainScanStr task-rest_run-01_bold -mainScanRun 1

and

docker run -ti --rm \
    -v ${PWD}/inputs:/bids_dataset:ro \
    -v ${PWD}/outputs:/output_directory \
    -v ${PWD}/working:/tmp \
    -v ${PWD}/inputs/code/freesurfer_license_file.txt:/opt/freesurfer-6.0.0/license.txt \
    micalab/micapipe:latest \
    -bids /bids_dataset \
    -out /output_directory \
    -sub 219 -ses itbs \
    -proc_rsfmri \
    -mainScanStr task-rest_run-02_bold -mainScanRun 2

Only the first run claims to have completed. How can I get separate output for each run?

dkp commented 2 years ago

Follow up: I ran run-01 first and then renamed the func directory, then I ran run2. I guess this works.

rcruces commented 1 year ago

Hi, you found a great solution to this. As we also encountered a similar issue we implemented a different solution to process multiple functional acquisitions in the same derivatives output directory. The code is part of the 0.1.3 release, we are currently building the container and the readTheDocs will be updated with this new functionality. The new modality is called -proc_func and it allows to process multiple functional acquisitions (not at the same time) as well al multi echo acquisitions. I'll tell you when the container is ready

rcruces commented 1 year ago

The following versions including our newest version v0.2.0 can handle this issues, please take a look and try it!

https://github.com/MICA-MNI/micapipe/releases/tag/v0.2.0