Alfonso,
I am hoping that you (or someone ) can help me. I have struggled using CONN on one of my data sets. I originally processed data sets individually and was able to go through first level analysis with no problems. However, when I tried to merge them I encountered multiple errors saying that the projects were not the same. Since I did not use conn_batch to run this data this is certainly possible. After several attempts to figure out what was wrong.
I decided to start over. I gathered the pre-processed data from the individual subjects and entered that through CONN batch script into setup. I am only doing 5 subjects. I was able to enter them into CONN and see the results through the GUI. However, when I ran Setup on the data via the GUI I am giving the following messages as Setup is running
warning: set-1 data for subject 1 session 1 not found
warning: set-1 data for subject 1 session 2 not found
warning: set-1 data for subject 2 session 1 not found
warning: set-1 data for subject 2 session 2 not found
warning: set-1 data for subject 3 session 1 not found
warning: set-1 data for subject 3 session 2 not found
...
The importing seems to be functioning. It takes about 2 minutes per subject. However, when it finishes it briefly moves to Denoising stage and then tells me that I need to "Run first the Setup step by pressing "Done" in the Setup Tab". At this point, I am out of ideas. The setup looks good to me but obviously I am doing something wrong.
Please help.
Bob
Here is my conn batch script.
function batch = me2ConnSetup
topDir = '/PACS-PI0/PACS-PI0/lindquist/me2/data/bkraft/'
me2Index = [35, 37, 38, 39, 40];
nSubjects = length(me2Index);
nSessions = 2;
nConditions = 2;
%
% Define the name of the conn.mat file.
%
outputDir = fullfile(topDir, 'group');
batch.filename = fullfile(outputDir, 'conn_me2.mat');
%
% Preprocessing Data sets
%
batch.Setup.nsubjects = nSubjects; % Number of Subjects
batch.Setup.RT = 2; % Repitition Time
% Functional and structural data for Sessions 1 and 2
%
batch.Setup.conditions.names{1} = 'restec';
batch.Setup.conditions.names{2} = 'neutral';
for iiSubject=1:nSubjects
for iiConditions=1:nConditions
for iiSessions=1:nSessions
batch.Setup.conditions.onsets{iiConditions}{iiSubject}{iiSessions} = []; % Condition{nCondition}{nSubject}{nSessions}
batch.Setup.conditions.durations{iiConditions}{iiSubject}{iiSessions} = [];
end
end
end
% For resting state fMRI onset is 0 and duration is inf
for ii=1:nSessions
for iiSubject=1:nSubjects
batch.Setup.conditions.onsets{ii}{iiSubject}{ii} = 0; % Condition{nCondition}{nSubject}{nSessions}
batch.Setup.conditions.durations{ii}{iiSubject}{ii} = inf;
end
end
%
%
batch.Setup.subjects.effect_names{1} = 'subjectID';
batch.Setup.covariates.names{1} = 'motion';
% batch.Setup.covariates.names{2} = 'scrubbing';
for iiSubject=1:length(me2Index)
iiSubject
subjectDir = fullfile(topDir, sprintf('me%03d', me2Index(iiSubject)))
batch.Setup.structurals{iiSubject}{1} = fullfile(subjectDir, 'wcrT1w.nii');
batch.Setup.masks.Grey{iiSubject} = fullfile(subjectDir, 'wc1crT1w.nii');
batch.Setup.masks.White{iiSubject} = fullfile(subjectDir, 'wc2crT1w.nii');
batch.Setup.masks.CSF{iiSubject} = fullfile(subjectDir, 'wc3crT1w.nii');
batch.Setup.functionals{iiSubject}{1} = fullfile(subjectDir, 'swaurestec.nii');
batch.Setup.functionals{iiSubject}{2} = fullfile(subjectDir, 'swauneutral.nii');
batch.Setup.covariates.files{1}{iiSubject}{1} = fullfile(subjectDir, 'rp_restec.txt');
% batch.Setup.covariates.files{2}{iiSubject}{1} = fullfile(subjectDir, 'art_regression_outliers_waurestec.mat');
batch.Setup.covariates.files{1}{iiSubject}{2} = fullfile(subjectDir, 'rp_neutral.txt');
% batch.Setup.covariates.files{2}{iiSubject}{2} = fullfile(subjectDir, 'art_regression_outliers_wauneutral.mat');
batch.Setup.subjects.effects{1}(iiSubject) = me2Index(ii);
end
conn_batch(batch)
I am hoping that you (or someone ) can help me. I have struggled using CONN on one of my data sets. I originally processed data sets individually and was able to go through first level analysis with no problems. However, when I tried to merge them I encountered multiple errors saying that the projects were not the same. Since I did not use conn_batch to run this data this is certainly possible. After several attempts to figure out what was wrong.
I decided to start over. I gathered the pre-processed data from the individual subjects and entered that through CONN batch script into setup. I am only doing 5 subjects. I was able to enter them into CONN and see the results through the GUI. However, when I ran Setup on the data via the GUI I am giving the following messages as Setup is running
warning: set-1 data for subject 1 session 1 not found
warning: set-1 data for subject 1 session 2 not found
warning: set-1 data for subject 2 session 1 not found
warning: set-1 data for subject 2 session 2 not found
warning: set-1 data for subject 3 session 1 not found
warning: set-1 data for subject 3 session 2 not found
...
The importing seems to be functioning. It takes about 2 minutes per subject. However, when it finishes it briefly moves to Denoising stage and then tells me that I need to "Run first the Setup step by pressing "Done" in the Setup Tab". At this point, I am out of ideas. The setup looks good to me but obviously I am doing something wrong.
Please help.
Bob
Here is my conn batch script.
function batch = me2ConnSetup
topDir = '/PACS-PI0/PACS-PI0/lindquist/me2/data/bkraft/'
me2Index = [35, 37, 38, 39, 40];
nSubjects = length(me2Index);
nSessions = 2;
nConditions = 2;
%
% Define the name of the conn.mat file.
%
outputDir = fullfile(topDir, 'group');
batch.filename = fullfile(outputDir, 'conn_me2.mat');
%
% Preprocessing Data sets
%
batch.Setup.nsubjects = nSubjects; % Number of Subjects
batch.Setup.RT = 2; % Repitition Time
% Functional and structural data for Sessions 1 and 2
%
batch.Setup.conditions.names{1} = 'restec';
batch.Setup.conditions.names{2} = 'neutral';
for iiSubject=1:nSubjects
for iiConditions=1:nConditions
for iiSessions=1:nSessions
batch.Setup.conditions.onsets{iiConditions}{iiSubject}{iiSessions} = []; % Condition{nCondition}{nSubject}{nSessions}
batch.Setup.conditions.durations{iiConditions}{iiSubject}{iiSessions} = [];
end
end
end
% For resting state fMRI onset is 0 and duration is inf
for ii=1:nSessions
for iiSubject=1:nSubjects
batch.Setup.conditions.onsets{ii}{iiSubject}{ii} = 0; % Condition{nCondition}{nSubject}{nSessions}
batch.Setup.conditions.durations{ii}{iiSubject}{ii} = inf;
end
end
%
%
batch.Setup.subjects.effect_names{1} = 'subjectID';
batch.Setup.covariates.names{1} = 'motion';
% batch.Setup.covariates.names{2} = 'scrubbing';
for iiSubject=1:length(me2Index)
iiSubject
subjectDir = fullfile(topDir, sprintf('me%03d', me2Index(iiSubject)))
batch.Setup.structurals{iiSubject}{1} = fullfile(subjectDir, 'wcrT1w.nii');
batch.Setup.masks.Grey{iiSubject} = fullfile(subjectDir, 'wc1crT1w.nii');
batch.Setup.masks.White{iiSubject} = fullfile(subjectDir, 'wc2crT1w.nii');
batch.Setup.masks.CSF{iiSubject} = fullfile(subjectDir, 'wc3crT1w.nii');
batch.Setup.functionals{iiSubject}{1} = fullfile(subjectDir, 'swaurestec.nii');
batch.Setup.functionals{iiSubject}{2} = fullfile(subjectDir, 'swauneutral.nii');
batch.Setup.covariates.files{1}{iiSubject}{1} = fullfile(subjectDir, 'rp_restec.txt');
% batch.Setup.covariates.files{2}{iiSubject}{1} = fullfile(subjectDir, 'art_regression_outliers_waurestec.mat');
batch.Setup.covariates.files{1}{iiSubject}{2} = fullfile(subjectDir, 'rp_neutral.txt');
% batch.Setup.covariates.files{2}{iiSubject}{2} = fullfile(subjectDir, 'art_regression_outliers_wauneutral.mat');
batch.Setup.subjects.effects{1}(iiSubject) = me2Index(ii);
end
conn_batch(batch)