help
help > RE: BACTH Processing Help
Mar 8, 2019 03:03 PM | Alfonso Nieto-Castanon - Boston University
RE: BACTH Processing Help
Hi Ben,
I would suggest changing
BATCH.Results.between_subjects.effect_names={'All'};
to
BATCH.Results.between_subjects.effect_names={'AllSubjects'};
but I am not really able to replicate this error, so if you could please update CONN to 18b and let me know your Matlab version that may help me better debug this.
Best
Alfonso
ps. just for general reference, the files "conn_batch_humanconnectomeproject.m" and "conn_batch_workshop_nyudataset.m" are perhaps good starting points to use when creating batch scripts, and "help conn_batch" always have up-to-date documentation on all conn_batch commands/syntax (as the manual you mention may be considerably outdated)
Originally posted by neuronerd:
I would suggest changing
BATCH.Results.between_subjects.effect_names={'All'};
to
BATCH.Results.between_subjects.effect_names={'AllSubjects'};
but I am not really able to replicate this error, so if you could please update CONN to 18b and let me know your Matlab version that may help me better debug this.
Best
Alfonso
ps. just for general reference, the files "conn_batch_humanconnectomeproject.m" and "conn_batch_workshop_nyudataset.m" are perhaps good starting points to use when creating batch scripts, and "help conn_batch" always have up-to-date documentation on all conn_batch commands/syntax (as the manual you mention may be considerably outdated)
Originally posted by neuronerd:
Hi Alfonso, thanks for the suggestions! I made
the BATCH script based on the manual available online and think
there's a few things I still have wrong. My current script
reads:
clear BATCH;
BATCH.filename= '/media/nir/SharedDrive/Ben/GSPmar4.mat';
BATCH.Setup.isnew=1;
BATCH.Setup.preprocessing.steps={'default_mni'};
BATCH.Setup.functionals{1}{1}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/Sub0052_Ses1_Scan_02_BOLD1.nii'
BATCH.Setup.functionals{1}{2}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/Sub0052_Ses1_Scan_03_BOLD2.nii'
BATCH.Setup.functionals{2}{1}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/Sub0053_Ses1_Scan_02_BOLD1.nii'
BATCH.Setup.functionals{2}{2}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/Sub0053_Ses1_Scan_03_BOLD2.nii'
BATCH.Setup.structurals{1}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/Sub0052_Ses1_Scan_01_ANAT1.nii'
BATCH.Setup.structurals{2}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/Sub0053_Ses1_Scan_01_ANAT1.nii'
BATCH.Setup.preprocessing.fwhm=8;
BATCH.Setup.preprocessing.voxelsize_func=2;
BATCH.Setup.preprocessing.sliceorder=[1:2:47,2:2:47];
BATCH.Setup.RT=3.0;
BATCH.Setup.nsubjects=2;
BATCH.Setup.analyses=[1,2];
BATCH.Setup.voxelmask=1;
BATCH.Setup.voxelresolution=1;
BATCH.Setup.outputfiles=[0,1,0];
BATCH.Setup.roi.names={'LeftVentralStriatum','RightVentralStriatum', 'LeftDorsalPutamen', 'RightDorsalPutamen', 'LeftMedialDorsalThalamus', 'RightMedialDorsalThalamus', 'LeftVentralPutamen', 'RightVentralPutamen', 'LeftDorsalStriatum', 'RightDorsalStriatum'};
%works this far
BATCH.Setup.rois.names={'LeftVentralStriatum','RightVentralStriatum', 'LeftDorsalPutamen', 'RightDorsalPutamen', 'LeftMedialDorsalThalamus', 'RightMedialDorsalThalamus', 'LeftVentralPutamen', 'RightVentralPutamen', 'LeftDorsalStriatum', 'RightDorsalStriatum'}
BATCH.Setup.rois.dimensions={1,1,1,1,1,1,1,1,1,1}
BATCH.Setup.rois.files{1}='/media/nir/SharedDrive/Ben/ROIs/binLeftVentralStriatum.nii';
BATCH.Setup.rois.files{2}='/media/nir/SharedDrive/Ben/ROIs/binRightVentralStriatum.nii';
BATCH.Setup.rois.files{3}='/media/nir/SharedDrive/Ben/ROIs/binLeftDorsalPutamen.nii';
BATCH.Setup.rois.files{4}='/media/nir/SharedDrive/Ben/ROIs/binRightDorsalPutamen.nii';
BATCH.Setup.rois.files{5}='/media/nir/SharedDrive/Ben/ROIs/binLeftMedialDorsalThalamus.nii';
BATCH.Setup.rois.files{6}='/media/nir/SharedDrive/Ben/ROIs/binRightMedialDorsalThalamus.nii';
BATCH.Setup.rois.files{7}='/media/nir/SharedDrive/Ben/ROIs/binLeftVentralPutamen.nii';
BATCH.Setup.rois.files{8}='/media/nir/SharedDrive/Ben/ROIs/binRightVentralPutamen.nii';
BATCH.Setup.rois.files{9}='/media/nir/SharedDrive/Ben/ROIs/binLeftDorsalStriatum.nii';
BATCH.Setup.rois.files{10}='/media/nir/SharedDrive/Ben/ROIs/binRightDorsalStriatum.nii';
BATCH.Setup.conditions.names={'preop'};
BATCH.Setup.conditions.onsets{1}{1}{1}=[6];
BATCH.Setup.conditions.onsets{1}{1}{2}=[6];
BATCH.Setup.conditions.onsets{1}{2}{1}=[6];
BATCH.Setup.conditions.onsets{1}{2}{2}=[6];
BATCH.Setup.conditions.durations{1}{1}{1}=[inf];
BATCH.Setup.conditions.durations{1}{1}{2}=[inf];
BATCH.Setup.conditions.durations{1}{2}{1}=[inf];
BATCH.Setup.conditions.durations{1}{2}{2}=[inf];
%BATCH.Setup.covariates.names={'realignment'};
%BATCH.Setup.covariates.files{1}{1}{1}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/rp_aSub0052_Ses1_Scan_02_BOLD1.txt';
%BATCH.Setup.covariates.files{1}{1}{2}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/rp_aSub0052_Ses1_Scan_03_BOLD2.txt';
%BATCH.Setup.covariates.files{1}{2}{1}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/rp_aSub0053_Ses1_Scan_02_BOLD1.txt';
%BATCH.Setup.covariates.files{1}{2}{2}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/rp_aSub0053_Ses1_Scan_03_BOLD2.txt';
BATCH.Setup.subjects.effect_names{1}={'ANYresponse'};
BATCH.Setup.subjects.effects{1}=[-1;1];
BATCH.Setup.done=1;
BATCH.Setup.overwrite='No';
BATCH.Preprocessing.filter=[.01,.1];
%BATCH.Preprocessing.confounds.names={'White','CSF','realignment'};
%BATCH.Preprocessing.confounds.dimensions={3,3,6};
%BATCH.Preprocessing.confounds.deriv={0,0,1};
BATCH.Preprocessing.done=1;
BATCH.Preprocessing.overwrite='No';
BATCH.Analysis.type=1;
BATCH.Analysis.measure=1;
BATCH.Analysis.weight=2;
BATCH.Analysis.sources.names={'LeftVentralStriatum','RightVentralStriatum', 'LeftDorsalPutamen', 'RightDorsalPutamen', 'LeftMedialDorsalThalamus', 'RightMedialDorsalThalamus', 'LeftVentralPutamen', 'RightVentralPutamen', 'LeftDorsalStriatum', 'RightDorsalStriatum'};
BATCH.Analysis.sources.dimensions={1,1,1,1,1,1,1,1,1,1};
BATCH.Analysis.sources.deriv={0,0,0,0,0,0,0,0,0,0};
BATCH.Analysis.done=1;
BATCH.Analysis.overwrite='No';
BATCH.Results.between_subjects.effect_names={'All'};
BATCH.Results.between_subjects.contrast=[1];
%BATCH.Results.between_conditions.effect_names={task1','task2'};
%BATCH.Results.between_conditions.contrast=[1,-1];
BATCH.Results.between_sources.effect_names={'RightVentralStriatum'};
BATCH.Results.between_sources.contrast=[1];
%BATCH.Results.analysis_number=2;
BATCH.Results.done=1;
conn_batch(BATCH);
and it seems to go farther, but now I'm getting this error:
Error using cell/strmatch (line 19)
Requires character array or cell array of character vectors as inputs.
Error in conn_batch (line 1289)
idx=strmatch(batch.Results.between_subjects.effect_names{neffect},CONN_x.Setup.l2covariates.names,'exact');
Error in CONNbatch (line 77)
conn_batch(BATCH);
I'm guessing I need to comment out line 19?
Ben
clear BATCH;
BATCH.filename= '/media/nir/SharedDrive/Ben/GSPmar4.mat';
BATCH.Setup.isnew=1;
BATCH.Setup.preprocessing.steps={'default_mni'};
BATCH.Setup.functionals{1}{1}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/Sub0052_Ses1_Scan_02_BOLD1.nii'
BATCH.Setup.functionals{1}{2}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/Sub0052_Ses1_Scan_03_BOLD2.nii'
BATCH.Setup.functionals{2}{1}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/Sub0053_Ses1_Scan_02_BOLD1.nii'
BATCH.Setup.functionals{2}{2}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/Sub0053_Ses1_Scan_03_BOLD2.nii'
BATCH.Setup.structurals{1}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/Sub0052_Ses1_Scan_01_ANAT1.nii'
BATCH.Setup.structurals{2}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/Sub0053_Ses1_Scan_01_ANAT1.nii'
BATCH.Setup.preprocessing.fwhm=8;
BATCH.Setup.preprocessing.voxelsize_func=2;
BATCH.Setup.preprocessing.sliceorder=[1:2:47,2:2:47];
BATCH.Setup.RT=3.0;
BATCH.Setup.nsubjects=2;
BATCH.Setup.analyses=[1,2];
BATCH.Setup.voxelmask=1;
BATCH.Setup.voxelresolution=1;
BATCH.Setup.outputfiles=[0,1,0];
BATCH.Setup.roi.names={'LeftVentralStriatum','RightVentralStriatum', 'LeftDorsalPutamen', 'RightDorsalPutamen', 'LeftMedialDorsalThalamus', 'RightMedialDorsalThalamus', 'LeftVentralPutamen', 'RightVentralPutamen', 'LeftDorsalStriatum', 'RightDorsalStriatum'};
%works this far
BATCH.Setup.rois.names={'LeftVentralStriatum','RightVentralStriatum', 'LeftDorsalPutamen', 'RightDorsalPutamen', 'LeftMedialDorsalThalamus', 'RightMedialDorsalThalamus', 'LeftVentralPutamen', 'RightVentralPutamen', 'LeftDorsalStriatum', 'RightDorsalStriatum'}
BATCH.Setup.rois.dimensions={1,1,1,1,1,1,1,1,1,1}
BATCH.Setup.rois.files{1}='/media/nir/SharedDrive/Ben/ROIs/binLeftVentralStriatum.nii';
BATCH.Setup.rois.files{2}='/media/nir/SharedDrive/Ben/ROIs/binRightVentralStriatum.nii';
BATCH.Setup.rois.files{3}='/media/nir/SharedDrive/Ben/ROIs/binLeftDorsalPutamen.nii';
BATCH.Setup.rois.files{4}='/media/nir/SharedDrive/Ben/ROIs/binRightDorsalPutamen.nii';
BATCH.Setup.rois.files{5}='/media/nir/SharedDrive/Ben/ROIs/binLeftMedialDorsalThalamus.nii';
BATCH.Setup.rois.files{6}='/media/nir/SharedDrive/Ben/ROIs/binRightMedialDorsalThalamus.nii';
BATCH.Setup.rois.files{7}='/media/nir/SharedDrive/Ben/ROIs/binLeftVentralPutamen.nii';
BATCH.Setup.rois.files{8}='/media/nir/SharedDrive/Ben/ROIs/binRightVentralPutamen.nii';
BATCH.Setup.rois.files{9}='/media/nir/SharedDrive/Ben/ROIs/binLeftDorsalStriatum.nii';
BATCH.Setup.rois.files{10}='/media/nir/SharedDrive/Ben/ROIs/binRightDorsalStriatum.nii';
BATCH.Setup.conditions.names={'preop'};
BATCH.Setup.conditions.onsets{1}{1}{1}=[6];
BATCH.Setup.conditions.onsets{1}{1}{2}=[6];
BATCH.Setup.conditions.onsets{1}{2}{1}=[6];
BATCH.Setup.conditions.onsets{1}{2}{2}=[6];
BATCH.Setup.conditions.durations{1}{1}{1}=[inf];
BATCH.Setup.conditions.durations{1}{1}{2}=[inf];
BATCH.Setup.conditions.durations{1}{2}{1}=[inf];
BATCH.Setup.conditions.durations{1}{2}{2}=[inf];
%BATCH.Setup.covariates.names={'realignment'};
%BATCH.Setup.covariates.files{1}{1}{1}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/rp_aSub0052_Ses1_Scan_02_BOLD1.txt';
%BATCH.Setup.covariates.files{1}{1}{2}='/media/nir/SharedDrive/Ben/GSP/Sub0052_Ses1/rp_aSub0052_Ses1_Scan_03_BOLD2.txt';
%BATCH.Setup.covariates.files{1}{2}{1}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/rp_aSub0053_Ses1_Scan_02_BOLD1.txt';
%BATCH.Setup.covariates.files{1}{2}{2}='/media/nir/SharedDrive/Ben/GSP/Sub0053_Ses1/rp_aSub0053_Ses1_Scan_03_BOLD2.txt';
BATCH.Setup.subjects.effect_names{1}={'ANYresponse'};
BATCH.Setup.subjects.effects{1}=[-1;1];
BATCH.Setup.done=1;
BATCH.Setup.overwrite='No';
BATCH.Preprocessing.filter=[.01,.1];
%BATCH.Preprocessing.confounds.names={'White','CSF','realignment'};
%BATCH.Preprocessing.confounds.dimensions={3,3,6};
%BATCH.Preprocessing.confounds.deriv={0,0,1};
BATCH.Preprocessing.done=1;
BATCH.Preprocessing.overwrite='No';
BATCH.Analysis.type=1;
BATCH.Analysis.measure=1;
BATCH.Analysis.weight=2;
BATCH.Analysis.sources.names={'LeftVentralStriatum','RightVentralStriatum', 'LeftDorsalPutamen', 'RightDorsalPutamen', 'LeftMedialDorsalThalamus', 'RightMedialDorsalThalamus', 'LeftVentralPutamen', 'RightVentralPutamen', 'LeftDorsalStriatum', 'RightDorsalStriatum'};
BATCH.Analysis.sources.dimensions={1,1,1,1,1,1,1,1,1,1};
BATCH.Analysis.sources.deriv={0,0,0,0,0,0,0,0,0,0};
BATCH.Analysis.done=1;
BATCH.Analysis.overwrite='No';
BATCH.Results.between_subjects.effect_names={'All'};
BATCH.Results.between_subjects.contrast=[1];
%BATCH.Results.between_conditions.effect_names={task1','task2'};
%BATCH.Results.between_conditions.contrast=[1,-1];
BATCH.Results.between_sources.effect_names={'RightVentralStriatum'};
BATCH.Results.between_sources.contrast=[1];
%BATCH.Results.analysis_number=2;
BATCH.Results.done=1;
conn_batch(BATCH);
and it seems to go farther, but now I'm getting this error:
Error using cell/strmatch (line 19)
Requires character array or cell array of character vectors as inputs.
Error in conn_batch (line 1289)
idx=strmatch(batch.Results.between_subjects.effect_names{neffect},CONN_x.Setup.l2covariates.names,'exact');
Error in CONNbatch (line 77)
conn_batch(BATCH);
I'm guessing I need to comment out line 19?
Ben
Threaded View
Title | Author | Date |
---|---|---|
Benjamin Davidson | Mar 6, 2019 | |
Alfonso Nieto-Castanon | Mar 6, 2019 | |
Benjamin Davidson | Mar 6, 2019 | |
Benjamin Davidson | Mar 6, 2019 | |
Alfonso Nieto-Castanon | Mar 7, 2019 | |
Benjamin Davidson | Mar 7, 2019 | |
Alfonso Nieto-Castanon | Mar 8, 2019 | |
Benjamin Davidson | Mar 11, 2019 | |