help
help > RE: importing existing connectivity matrices in CONN
Aug 31, 2022 10:08 AM | chirokoff
RE: importing existing connectivity matrices in CONN
Dear Alfonso,
Thank you for your response. I tried entering my options as suggested but I get the following error message :
"
conn module glm /data/valentine/DicLearning/ConnToolbox/ConfFiles.cfg
ERROR DESCRIPTION:
Not enough input arguments.
Error in conn_module_glm (line 31)
if ischar(filenames), filenames=cellstr(filenames); end
Error in conn_module (line 325)
else feval(fh,varargin{:});
Error in conn (line 9636)
if ~nargout, feval(fh,varargin{2:end})
"
My configuration files contains the following informations :
"
#data
/data/Matcorrelation1.mtx.nii
/data/Matcorrelation2.mtx.nii
/data/Matcorrelation3.mtx.nii
/data/Matcorrelation4.mtx.nii
/data/Matcorrelation5.mtx.nii
/data/Matcorrelation6.mtx.nii
/data/Matcorrelation7.mtx.nii
/data/Matcorrelation8.mtx.nii
/data/Matcorrelation9.mtx.nii
/data/Matcorrelation10.mtx.nii
/data/Matcorrelation11.mtx.nii
/data/Matcorrelation12.mtx.nii
/data/Matcorrelation13.mtx.nii
/data/Matcorrelation14.mtx.nii
/data/Matcorrelation15.mtx.nii
/data/Matcorrelation16.mtx.nii
/data/Matcorrelation17.mtx.nii
/data/Matcorrelation18.mtx.nii
/data/Matcorrelation19.mtx.nii
/data/Matcorrelation20.mtx.nii
/data/Matcorrelation21.mtx.nii
/data/Matcorrelation22.mtx.nii
/data/Matcorrelation23.mtx.nii
/data/Matcorrelation24.mtx.nii
/data/Matcorrelation25.mtx.nii
/data/Matcorrelation26.mtx.nii
/data/Matcorrelation27.mtx.nii
/data/Matcorrelation28.mtx.nii
/data/Matcorrelation29.mtx.nii
/data/Matcorrelation30.mtx.nii
/data/Matcorrelation31.mtx.nii
/data/Matcorrelation32.mtx.nii
/data/Matcorrelation33.mtx.nii
/data/Matcorrelation34.mtx.nii
/data/Matcorrelation35.mtx.nii
/data/Matcorrelation36.mtx.nii
/data/Matcorrelation37.mtx.nii
/data/Matcorrelation38.mtx.nii
/data/Matcorrelation39.mtx.nii
/data/Matcorrelation40.mtx.nii
#design
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
10216.0909090909 16424.8750000000 14421 14064.0909090909 14474.2500000000 14677.3000000000 15574.5454545455 9900 19186.4166666667 8704.70000000000 15216.9166666667 9029.30769230769 8771.18181818182 18489.2500000000 17503.7692307692 9658.81818181818 9141.33333333333 9136.16666666667 24469.4000000000 11631 10169.2222222222 15095.5714285714 13452.0909090909 16820.6923076923 15999.5454545455 14649.4444444444 17008.6363636364 12680.3076923077 17211.2307692308 10661.2307692308 14627.4545454545 13310.1538461538 13099.6923076923 11844.1818181818 18468.5384615385 17644.5384615385 32163.2500000000 14139.2500000000 7381.30769230769 9183.76923076923
33 52 45 55 54 41 31 42 52 34 53 46 35 27 53 35 19 22 61 37 28 34 38 41 52 35 31 62 55 55 45 45 56 52 42 62 35 34 27 41
#contrast_between
0 1 0
#folder
/home/Results/
"
Do you know what could be wrong ?
Thank you for your help,
Valentine
Originally posted by Alfonso Nieto-Castanon:
Hi
I would probably suggest trying entering your options in a .cfg file instead of from the command-line, see for example the documentation and example in https://web.conn-toolbox.org/resources/e...
Best
Alfonso
Originally posted by chirokoff:
Thank you for your response. I tried entering my options as suggested but I get the following error message :
"
conn module glm /data/valentine/DicLearning/ConnToolbox/ConfFiles.cfg
ERROR DESCRIPTION:
Not enough input arguments.
Error in conn_module_glm (line 31)
if ischar(filenames), filenames=cellstr(filenames); end
Error in conn_module (line 325)
else feval(fh,varargin{:});
Error in conn (line 9636)
if ~nargout, feval(fh,varargin{2:end})
"
My configuration files contains the following informations :
"
#data
/data/Matcorrelation1.mtx.nii
/data/Matcorrelation2.mtx.nii
/data/Matcorrelation3.mtx.nii
/data/Matcorrelation4.mtx.nii
/data/Matcorrelation5.mtx.nii
/data/Matcorrelation6.mtx.nii
/data/Matcorrelation7.mtx.nii
/data/Matcorrelation8.mtx.nii
/data/Matcorrelation9.mtx.nii
/data/Matcorrelation10.mtx.nii
/data/Matcorrelation11.mtx.nii
/data/Matcorrelation12.mtx.nii
/data/Matcorrelation13.mtx.nii
/data/Matcorrelation14.mtx.nii
/data/Matcorrelation15.mtx.nii
/data/Matcorrelation16.mtx.nii
/data/Matcorrelation17.mtx.nii
/data/Matcorrelation18.mtx.nii
/data/Matcorrelation19.mtx.nii
/data/Matcorrelation20.mtx.nii
/data/Matcorrelation21.mtx.nii
/data/Matcorrelation22.mtx.nii
/data/Matcorrelation23.mtx.nii
/data/Matcorrelation24.mtx.nii
/data/Matcorrelation25.mtx.nii
/data/Matcorrelation26.mtx.nii
/data/Matcorrelation27.mtx.nii
/data/Matcorrelation28.mtx.nii
/data/Matcorrelation29.mtx.nii
/data/Matcorrelation30.mtx.nii
/data/Matcorrelation31.mtx.nii
/data/Matcorrelation32.mtx.nii
/data/Matcorrelation33.mtx.nii
/data/Matcorrelation34.mtx.nii
/data/Matcorrelation35.mtx.nii
/data/Matcorrelation36.mtx.nii
/data/Matcorrelation37.mtx.nii
/data/Matcorrelation38.mtx.nii
/data/Matcorrelation39.mtx.nii
/data/Matcorrelation40.mtx.nii
#design
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
10216.0909090909 16424.8750000000 14421 14064.0909090909 14474.2500000000 14677.3000000000 15574.5454545455 9900 19186.4166666667 8704.70000000000 15216.9166666667 9029.30769230769 8771.18181818182 18489.2500000000 17503.7692307692 9658.81818181818 9141.33333333333 9136.16666666667 24469.4000000000 11631 10169.2222222222 15095.5714285714 13452.0909090909 16820.6923076923 15999.5454545455 14649.4444444444 17008.6363636364 12680.3076923077 17211.2307692308 10661.2307692308 14627.4545454545 13310.1538461538 13099.6923076923 11844.1818181818 18468.5384615385 17644.5384615385 32163.2500000000 14139.2500000000 7381.30769230769 9183.76923076923
33 52 45 55 54 41 31 42 52 34 53 46 35 27 53 35 19 22 61 37 28 34 38 41 52 35 31 62 55 55 45 45 56 52 42 62 35 34 27 41
#contrast_between
0 1 0
#folder
/home/Results/
"
Do you know what could be wrong ?
Thank you for your help,
Valentine
Originally posted by Alfonso Nieto-Castanon:
Hi
I would probably suggest trying entering your options in a .cfg file instead of from the command-line, see for example the documentation and example in https://web.conn-toolbox.org/resources/e...
Best
Alfonso
Originally posted by chirokoff:
Hello,
I am currently trying to import connectivity matrices analyzed via an other software as described in the following post. I managed to create the .mtx.nii but when I tried to run the conn_module using :
"conn_module( 'glm' , ...
'data', Files.mtx.nii, ...
'design_matrix', X, ...
'contrast_between', C, ...
'contrast_within', M, ...
'folder', folder);
"
I get the following error message :" Too many input argument".
Using :
"conn_module( 'glm' , ...
'Files.mtx.nii', ...
'X', ...
'C', ...
'M', ...
'folder')
"
Fix the bug but results in another error "Incorrect dimensions (X and C1 should have the same number of columns)" (X and C does have the same numbers of colums).
I managed to run the function anyway using :
"
conn_module_glm(X, Files.mtx.nii; C, M, folder)
"
But then i get :
"
Warning: Matrix is singular to working precision.
> In spm_inv (line 30)
In spm_reml (line 100)
In spm_est_non_sphericity (line 281)
In spm_spm (line 433)
In conn_module_glm (line 151)
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =
-1.000000e+00.
> In spm_inv (line 30)
In spm_reml (line 103)
In spm_est_non_sphericity (line 281)
In spm_spm (line 433)
In conn_module_glm (line 151)
Error using spm_dx>expv (line 279)
The requested tolerance is too high.
Error in spm_dx (line 102)
dx = expv(1,J,x);
Error in spm_reml (line 145)
dh = spm_dx(dFdhh,dFdh,{t});
Error in spm_est_non_sphericity (line 281)
[V,h] = spm_reml(Cy,xX.X,xVi.Vi);
Error in spm_spm (line 433)
[xVi, am] = spm_est_non_sphericity(SPM);
Error in conn_module_glm (line 151)
SPM=spm_spm(SPM);
"
Does someone know how to fix this ?
Thank you a lot for your help,
Valentine
Originally posted by Alfonso Nieto-Castanon:
I am currently trying to import connectivity matrices analyzed via an other software as described in the following post. I managed to create the .mtx.nii but when I tried to run the conn_module using :
"conn_module( 'glm' , ...
'data', Files.mtx.nii, ...
'design_matrix', X, ...
'contrast_between', C, ...
'contrast_within', M, ...
'folder', folder);
"
I get the following error message :" Too many input argument".
Using :
"conn_module( 'glm' , ...
'Files.mtx.nii', ...
'X', ...
'C', ...
'M', ...
'folder')
"
Fix the bug but results in another error "Incorrect dimensions (X and C1 should have the same number of columns)" (X and C does have the same numbers of colums).
I managed to run the function anyway using :
"
conn_module_glm(X, Files.mtx.nii; C, M, folder)
"
But then i get :
"
Warning: Matrix is singular to working precision.
> In spm_inv (line 30)
In spm_reml (line 100)
In spm_est_non_sphericity (line 281)
In spm_spm (line 433)
In conn_module_glm (line 151)
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =
-1.000000e+00.
> In spm_inv (line 30)
In spm_reml (line 103)
In spm_est_non_sphericity (line 281)
In spm_spm (line 433)
In conn_module_glm (line 151)
Error using spm_dx>expv (line 279)
The requested tolerance is too high.
Error in spm_dx (line 102)
dx = expv(1,J,x);
Error in spm_reml (line 145)
dh = spm_dx(dFdhh,dFdh,{t});
Error in spm_est_non_sphericity (line 281)
[V,h] = spm_reml(Cy,xX.X,xVi.Vi);
Error in spm_spm (line 433)
[xVi, am] = spm_est_non_sphericity(SPM);
Error in conn_module_glm (line 151)
SPM=spm_spm(SPM);
"
Does someone know how to fix this ?
Thank you a lot for your help,
Valentine
Originally posted by Alfonso Nieto-Castanon:
Hi
Jaron,
Yes, that is perfectly fine, to run second-level analyses of arbitrary ROI-to-ROI connectivity matrices you may:
1) convert first your matrix data to NIFTI format, for example using something like:
conn_mtx_write('/folder/mydatafile.mtx.nii', Z);
where Z is your ROI-by-ROI-by-subjects 3D matrix containing the connectivity values for each subject. You may also include the ROI labels as well as the ROI spatial locations info to the conn_mtx_write command if you wish, see "help conn_mtx_write" for additional details
2) run your desired group-level analyses, for example using something like:
conn_module( 'glm' , ...
'data', '/folder/mydatafile.mtx.nii', ...
'design_matrix', X, ...
'contrast_between', C, ...
'contrast_within', M, ...
'folder', '/folder/myresults' );
where X is your design matrix, and C/M are the between- and within- subjects contrast, respectively (see https://web.conn-toolbox.org/fmri-method... for details)
and 3) after that, you may display the second-level results using the standard CONN gui options at any time using the syntax:
conn_display /folder/myresults
Hope this helps
Alfonso
Originally posted by Jaron Kupers:
Yes, that is perfectly fine, to run second-level analyses of arbitrary ROI-to-ROI connectivity matrices you may:
1) convert first your matrix data to NIFTI format, for example using something like:
conn_mtx_write('/folder/mydatafile.mtx.nii', Z);
where Z is your ROI-by-ROI-by-subjects 3D matrix containing the connectivity values for each subject. You may also include the ROI labels as well as the ROI spatial locations info to the conn_mtx_write command if you wish, see "help conn_mtx_write" for additional details
2) run your desired group-level analyses, for example using something like:
conn_module( 'glm' , ...
'data', '/folder/mydatafile.mtx.nii', ...
'design_matrix', X, ...
'contrast_between', C, ...
'contrast_within', M, ...
'folder', '/folder/myresults' );
where X is your design matrix, and C/M are the between- and within- subjects contrast, respectively (see https://web.conn-toolbox.org/fmri-method... for details)
and 3) after that, you may display the second-level results using the standard CONN gui options at any time using the syntax:
conn_display /folder/myresults
Hope this helps
Alfonso
Originally posted by Jaron Kupers:
Hello,
We are new to CONN. We would like to use CONN for the visualization of already analyzed resting-state fMRI results. We have already processed rs-fmri data, and constructed matrices of ROI connectivity and used in NBS. We are happy with the results, but not with the visualization tools offered in NBS. We were wondering therefore whether it Is possible to import only the connectivity matrices together with the mni labels and coordinates (in text files), hence without being forced to redo the preprocessing steps in CONN?
Thanks.
jaron
We are new to CONN. We would like to use CONN for the visualization of already analyzed resting-state fMRI results. We have already processed rs-fmri data, and constructed matrices of ROI connectivity and used in NBS. We are happy with the results, but not with the visualization tools offered in NBS. We were wondering therefore whether it Is possible to import only the connectivity matrices together with the mni labels and coordinates (in text files), hence without being forced to redo the preprocessing steps in CONN?
Thanks.
jaron
Threaded View
| Title | Author | Date |
|---|---|---|
| Jaron Kupers | Jan 7, 2021 | |
| Alfonso Nieto-Castanon | Jan 7, 2021 | |
| chirokoff | Aug 22, 2022 | |
| Alfonso Nieto-Castanon | Aug 29, 2022 | |
| chirokoff | Aug 31, 2022 | |
| Alfonso Nieto-Castanon | Aug 31, 2022 | |
| Samantha Baldi | Jul 14, 2022 | |
| Alfonso Nieto-Castanon | Jul 19, 2022 | |
| Jaron Kupers | Jan 8, 2021 | |
| Alfonso Nieto-Castanon | Jan 15, 2021 | |
| Jaron Kupers | Jan 21, 2021 | |
| Alfonso Nieto-Castanon | Jan 11, 2021 | |
| Jaron Kupers | Jan 14, 2021 | |
