help
help > RE: BACTH Processing Help
Mar 7, 2019 12:03 PM | Alfonso Nieto-Castanon - Boston University
RE: BACTH Processing Help
Hi Ben,
Sorry I missed that change, the list of preprocessing.steps names have also changed in order to organize a considerably larger array of optional steps (see "help conn_batch" for additional info). In any way, I believe your list corresponds to the older default MNI-space preprocessing pipeline, so, if appropriate to your dataset, I would probably recommend simply changing that line to:
BATCH.Setup.preprocessing.steps={'default_mni'};
If, on the other hand, you prefer to change anything in that pipeline, you may want to start from the more explicit syntax below and modify that:
BATCH.Setup.preprocessing.steps={'functional_label_as_original', 'functional_realign&unwarp', 'functional_center', 'functional_slicetime', 'functional_art', 'functional_segment&normalize_direct', 'functional_label_as_mnispace', 'structural_center', 'structural_segment&normalize', 'functional_smooth', 'functional_label_as_smoothed'};
Also, as a side note: I am just curious but it seems a bit odd that you are loading the realignment parameters explicitly in your batch script, even when you are realigning your data during preprocessing (typically realignment will automatically load the estimated motion parameters as a first-level covariate in CONN, so I would probably recommend simply commenting-out the BATCH.Setup.covariates lines in your script). It also seems suboptimal/unconventional that you are not running scrubbing during denoising (although this may be due to your original batch being from an older release) so I would probably recommend commenting-out the BATCH.preprocessing.confounds lines in your script so that CONN uses the newer default set of denoising procedures (which will include scrubbing when used in combination with the 'default_mni' preprocessing pipeline above)
Hope this helps
Alfonso
Originally posted by neuronerd:
Sorry I missed that change, the list of preprocessing.steps names have also changed in order to organize a considerably larger array of optional steps (see "help conn_batch" for additional info). In any way, I believe your list corresponds to the older default MNI-space preprocessing pipeline, so, if appropriate to your dataset, I would probably recommend simply changing that line to:
BATCH.Setup.preprocessing.steps={'default_mni'};
If, on the other hand, you prefer to change anything in that pipeline, you may want to start from the more explicit syntax below and modify that:
BATCH.Setup.preprocessing.steps={'functional_label_as_original', 'functional_realign&unwarp', 'functional_center', 'functional_slicetime', 'functional_art', 'functional_segment&normalize_direct', 'functional_label_as_mnispace', 'structural_center', 'structural_segment&normalize', 'functional_smooth', 'functional_label_as_smoothed'};
Also, as a side note: I am just curious but it seems a bit odd that you are loading the realignment parameters explicitly in your batch script, even when you are realigning your data during preprocessing (typically realignment will automatically load the estimated motion parameters as a first-level covariate in CONN, so I would probably recommend simply commenting-out the BATCH.Setup.covariates lines in your script). It also seems suboptimal/unconventional that you are not running scrubbing during denoising (although this may be due to your original batch being from an older release) so I would probably recommend commenting-out the BATCH.preprocessing.confounds lines in your script so that CONN uses the newer default set of denoising procedures (which will include scrubbing when used in combination with the 'default_mni' preprocessing pipeline above)
Hope this helps
Alfonso
Originally posted by neuronerd:
Hi Alfonso,
Thanks for the tips! Unfortunately I'm getting persistent errors now where it says it deosn't recognize 'slicetiming' or the other preprocessing commands...Wondering if I could ask for your feedback! Script and errors below:
clear BATCH;
BATCH.filename= '/media/nir/SharedDrive/Ben/GSPmar4.mat';
BATCH.Setup.isnew=1;
BATCH.Setup.preprocessing.steps={'slicetiming','realignment','coregistration','segmentation','normalization','smoothing','initialization'};
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);
CONN: RUNNING SETUP.PREPROCESSING STEP
Preparing process. Please wait...
Error using conn_setup_preproc (line 1881)
unrecognized option slicetiming
Error in conn_process (line 25)
case 'setup_preprocessing', disp(['CONN: RUNNING SETUP.PREPROCESSING STEP']); conn_setup_preproc(varargin{:});
Error in conn_batch (line 955)
conn_process('setup_preprocessing',steps,'subjects',SUBJECTS,OPTIONS{:});
Thanks for the tips! Unfortunately I'm getting persistent errors now where it says it deosn't recognize 'slicetiming' or the other preprocessing commands...Wondering if I could ask for your feedback! Script and errors below:
clear BATCH;
BATCH.filename= '/media/nir/SharedDrive/Ben/GSPmar4.mat';
BATCH.Setup.isnew=1;
BATCH.Setup.preprocessing.steps={'slicetiming','realignment','coregistration','segmentation','normalization','smoothing','initialization'};
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);
CONN: RUNNING SETUP.PREPROCESSING STEP
Preparing process. Please wait...
Error using conn_setup_preproc (line 1881)
unrecognized option slicetiming
Error in conn_process (line 25)
case 'setup_preprocessing', disp(['CONN: RUNNING SETUP.PREPROCESSING STEP']); conn_setup_preproc(varargin{:});
Error in conn_batch (line 955)
conn_process('setup_preprocessing',steps,'subjects',SUBJECTS,OPTIONS{:});
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 | |