open-discussion > RE: Reproducibility analysis mICA
Mar 29, 2018  01:03 AM | Will Khan - King's College London
RE: Reproducibility analysis mICA
Hi Tawfik, 

Thank you for your suggestions. 

In the mICA/bin folder I can locate the mica script which has the following options to perform ICA. 

Perform masked-ICA

Usage: mica [options]
input: a text file containing a list of all preprocessed functional images (nifti)
-mask mask file (nifti)
-dim ICA decomposition dimensions. Either one value, comma separated values (e.g. 20,30,40), or a range (e.g. 2-100). If more than one value was entered, the analysis would be repeated for each parameter value.
-merge-stats merge MELODIC mixture model stats in one 4D nifit files
-parcel generate ICA-based parcellation
-Sdes design matrix across subject-domain
-Scon t-contrast matrix across subject-domain
-Tdes design matrix across time-domain
-Tcon t-contrast matrix across time-domain
-dr perform Dual-Regression. permutations value for randomize (usually 500).
-inversion perform direct Back-Reconstruction (Inversion).
-extra pass the all following command-line arguments to MELODIC

I ran the command in bash as so: 

./mica $working_dir/mica_testing_list $working_dir/results/testing_mica -mask $working_dir/masks/PCC_and_Precuneus_mask_thr20_Harvard.nii.gz -dim 8 -extra -a concat --sep_vn --nobet --bgthreshold=10 --tr=1 --report --mmthresh=0.5 --Oall

and I get the following error: 

./mica: line 242: /Volumes/ImagingData_WillKhan/HCP_Data2018/results/testing_mica/mica_log.txt: No such file or directory
./mica: line 244: /Volumes/ImagingData_WillKhan/HCP_Data2018/results/testing_mica/mica_log.txt: No such file or directory
./mica: line 245: /Volumes/ImagingData_WillKhan/HCP_Data2018/results/testing_mica/mica_log.txt: No such file or directory
./mica: line 251: /Volumes/ImagingData_WillKhan/HCP_Data2018/results/testing_mica/mica_log.txt: No such file or directory

Could you please advise what I am doing here? I thought I would test each script separately on a few HCP datasets before I created a master wrapper script to execute everything. 

Thank you!



Originally posted by Tawfik Moher Alsady:
Hello Will,

it is possible to use mICA scripts through command line. However, some checks of input correctness might not be performed as they are implemented in the GUI. In addition, you might have to write a wrapper script to automatize the analysis.

For preprocessing, group/single-subject mICA and back-reconstruction you can use the bash scripts in the bin folder, which are documented. 

For reproducibility, you have to prepare the randomly splitted groups using
Usage: python list_filename permutations out_prefix
list_filename: path of a text file containing all preprocessed input data (list of nii files)
permutations: is the number of permutation as in the GUI (0 for test-retest)
out_prefix: path of output folder

step 2: is using mica (in bin directory) to perform mICA for each of sampled groups

step 3: calculate correlation using python in_prefix samples dims [just_read]
in_prefix:  path of the folder that contains samples folders (out_prefix of the previous step)
samples:   number of samplings
dims:   dimensionality range
[just_read]:  0 is default. 1 will not perform fsl_cc and just reads any previously calculated cross-correlation files.

let me know if you need more help.


Threaded View

Will Khan Mar 22, 2018
Florian Beissner Mar 22, 2018
Will Khan Mar 27, 2018
Tawfik Moher Alsady Mar 27, 2018
RE: Reproducibility analysis mICA
Will Khan Mar 29, 2018
Will Khan Mar 29, 2018
Tawfik Moher Alsady Mar 29, 2018
Will Khan Apr 4, 2018
Tawfik Moher Alsady Apr 9, 2018
Will Khan Apr 10, 2018