help
help > RE: conn merge via Matlab script
Jan 15, 2020 11:01 AM | Alfonso Nieto-Castanon - Boston University
RE: conn merge via Matlab script
Hi Jeremy,
You may merge those files using something like:
fileinput={'/data/P01_conn.mat','/data/P02_conn.mat','/data/P03_conn.mat'};
fileoutput='/data/Pall_conn.mat';
conn('load', fileinput{1});
conn('save', fileoutput);
conn_merge(char(fileinput), [], true, true);
conn_process postmerge;
That said, all of CONN's HPC parallelization options can be used without a GUI so my impression is that it should be simpler in your case to run your desired first-level analyses in your HPC cluster using CONN batch commands directly (and let CONN handle the division into node-specific projects and subsequent merging of these projects automatically) rather than doing this manually yourself. For example, if you have 100 subjects in your CONN project, simply using:
conn_batch('Analysis.analysis_number',1, 'Analysis.done',true, 'parallel.N',100);
will submit 100 jobs (one per subject) to your HPC cluster, each of them will run separately the first first-level analysis defined in your project for one individual subject, and all of their results will be merged into your original project when finished (see "help conn_batch" for additional info).
Hope this helps
Alfonso
Originally posted by Jeremy Hogeveen:
You may merge those files using something like:
fileinput={'/data/P01_conn.mat','/data/P02_conn.mat','/data/P03_conn.mat'};
fileoutput='/data/Pall_conn.mat';
conn('load', fileinput{1});
conn('save', fileoutput);
conn_merge(char(fileinput), [], true, true);
conn_process postmerge;
That said, all of CONN's HPC parallelization options can be used without a GUI so my impression is that it should be simpler in your case to run your desired first-level analyses in your HPC cluster using CONN batch commands directly (and let CONN handle the division into node-specific projects and subsequent merging of these projects automatically) rather than doing this manually yourself. For example, if you have 100 subjects in your CONN project, simply using:
conn_batch('Analysis.analysis_number',1, 'Analysis.done',true, 'parallel.N',100);
will submit 100 jobs (one per subject) to your HPC cluster, each of them will run separately the first first-level analysis defined in your project for one individual subject, and all of their results will be merged into your original project when finished (see "help conn_batch" for additional info).
Hope this helps
Alfonso
Originally posted by Jeremy Hogeveen:
Hi there,
I'm currently running CONN on a HPC cluster that does not have GUI capabilities. Specifically, I ran seed-to-seed and seed-to-voxel first level models on all of my subjects in parallel across a bunch of compute nodes, leaving me with single-subject P##_conn.mat files. I know it's possible to merge conn files using the GUI, but can't figure out how to merge them from batch for second-level modeling on the HPC.
Is it possible to run conn_merge via a Matlab script rather than via the GUI?
Any advice from folks who have done this would be much appreciated!
Cheers,
Jeremy
I'm currently running CONN on a HPC cluster that does not have GUI capabilities. Specifically, I ran seed-to-seed and seed-to-voxel first level models on all of my subjects in parallel across a bunch of compute nodes, leaving me with single-subject P##_conn.mat files. I know it's possible to merge conn files using the GUI, but can't figure out how to merge them from batch for second-level modeling on the HPC.
Is it possible to run conn_merge via a Matlab script rather than via the GUI?
Any advice from folks who have done this would be much appreciated!
Cheers,
Jeremy
Threaded View
| Title | Author | Date |
|---|---|---|
| Jeremy Hogeveen | Jan 13, 2020 | |
| Alfonso Nieto-Castanon | Jan 15, 2020 | |
| Jeremy Hogeveen | Jan 16, 2020 | |
| Alfonso Nieto-Castanon | Jan 16, 2020 | |
