help > RE: extract denoised time courses
May 22, 2017  07:05 PM | Alfonso Nieto-Castanon - Boston University
RE: extract denoised time courses
Dear Heidi,

I see what you mean. Just as a quick note you should be able to easily export and/or import multiple ROI-to-ROI correlations (e.g. in the Setup tab you may select multiple second-level covariates and then click on the 'export to file' button to save all of those simultaneously to a single file; similarly in the Results tab you may select multiple Seed and Target ROIs and click on 'import values' to simultaneously import all of those connections). In any way, a more automatic way to get all of these correlations for all ROI pairs would be to use the following script to convert the .mat file which contains all of those correlations to a .csv file that you may be able to read from excel or other software packages.

filename = '/data/conn_myproject/results/firstlevel/ANALYSIS_01/resultsROI_Condition001.mat'; % change this to your project/analysis folder
load(filename,'Z','names','names2'); % Z is a ROIs x ROIs x Subjects 3d matrix of Fisher-transformed correlation coefficients (for default weighted-GLM correlation analyses)

% write .csv data
fh = fopen(conn_prepend('',filename,'.csv'),'wt');
% write header entries
for nroi1=1:numel(names)
  for nroi2=1:numel(names)
      fprintf(fh,'connectivity between %s and %s,',names{nroi1},names2{nroi2});
  end
end
fprintf(fh,'\n');
% write data entries
for nsub=1:size(Z,3)
for nroi1=1:numel(names)
for nroi2=1:numel(names)
fprintf(fh,'%f,',Z(nroi1,nroi2,nsub));
end
end
fprintf(fh,'\n');
end
fclose(fh);


Hope this helps
Alfonso

Originally posted by Heidi Jacobs:
Dear Alfonso,

Thank you. I would like to extract the individual correlations between ROIs (so that I can plot them).
I know I can export them to the covariate tab (I also know I can plot them in the calculator), but then I would have to download them one by one as a text file. Since there are many ROIs, that would not be the most convenient thing.

Thanks
Heidi

Threaded View

TitleAuthorDate
Heidi Jacobs Apr 2, 2017
Alfonso Nieto-Castanon Apr 3, 2017
Heidi Jacobs Apr 4, 2017
Alfonso Nieto-Castanon Apr 7, 2017
Heidi Jacobs May 18, 2017
RE: extract denoised time courses
Alfonso Nieto-Castanon May 22, 2017
Wade Weber Dec 14, 2017
Heidi Jacobs Jun 10, 2017