populse / mia_processes

The default processes repository for mia
Other
1 stars 2 forks source link

[brick] update path SPM.mat file in Level1design brick #75

Closed manuegrx closed 2 months ago

manuegrx commented 2 months ago

Currently, in the level1design brick (SPM), the SPM.mat file is saved in a folder named namesub1_data (or if there is several subjects in sess_scans parameter namebesub1namesub2..._data).

However, it is possible that for one subject with several fMRI data, we want to analyze each fMRI data separately (so with one SPM.mat file for each data) (for example this is the case for a new pipeline I would like to implement in MIA). It seems also possible that we want to analyses again the same data with some parameters modifications (for this one I do not an example in mind for now).

My first idea was to add a sub-folder in the namessubjects_data named after the functional files involved for the analysis. However, it could be a really long name if there are several functional files.

So, I propose to add a parameter "out_dir_name" in the Level1design Brick set by default to "stats". This folder will be created in namessubjects_data directory. It will allow the user to choose the name of the SPM.mat folder and so for one subject to have one folder for each analysis (for example, stats_gene, stats_reco ..)

(this "out_dir_name" parameter will be also added to EstimateContrast and EstimateModel brick in case the SPM.mat file is not already in the derived_data directory)

This modification is already done in this branch https://github.com/populse/mia_processes/tree/update_level1design but I would like to be sure that I am not missing something before to merge.

As far I know, currently the only pipeline in production that used level1design brick is the CO2_inhalation pipeline.
I tested with the modification and it is working, there is only one additional folder :

│   ├── CVR_physio_reg.mat
│   ├── results_aggregation
│   │   ├──...
│   ├── ROI_data
│   │   ├──...
│   └── stats
│       ├── beta_0001.nii
│       ├── beta_0002.nii
│       ├── beta_0003.nii
│       ├── beta_0004.nii
│       ├── beta_0005.nii
│       ├── beta_0006.nii
│       ├── beta_0007.nii
│       ├── beta_0008.nii
│       ├── con_0001.nii
│       ├── mask.nii
│       ├── ResMS.nii
│       ├── RPV.nii
│       ├── SPM.mat
│       └── spmT_0001.nii

If nobody identifies a problem, I will update the documentation and merge the branch

manuegrx commented 2 months ago

Done here : https://github.com/populse/mia_processes/pull/77