help > conditions setup in batch
Showing 1-3 of 3 posts
Display:
Results per page:
Jan 19, 2015  03:01 PM | Greg Book
conditions setup in batch
I'm running a batch script in conn toolbox 14.n, and I'm noticing that some of the fields are not transferring from the batch script into the analysis when it is loaded into conn to view the results. The two items are the TR (RT) and the conditions. The TR is easy to fix in the GUI once it is loaded, but then I need to rerun parts of the analysis with the correct TR. The conditions are a little harder. I have 17 subjects, 2 sessions, and 6 conditions each session. I don't want to have to manually enter that info, the batch file is much easier.

For the TR, I have this line:

  batch.Setup.R=1.86

but when loading the analysis in the GUI, it says [2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2]
and for the conditions, this is subject 1, session 1

  batch.Setup.conditions.names={'rest_pre','even_pre','lose_pre','rest_post','even_post','lose_post'};

  batch.Setup.conditions.onsets{1}{1}{1}=[28,74,120,166,212,258,304,350];
  batch.Setup.conditions.onsets{2}{1}{1}=[0,138,230,276];
  batch.Setup.conditions.onsets{3}{1}{1}=[46,92,184,322];
  batch.Setup.conditions.durations{1}{1}{1}=[18,18,18,18,18,18,18,18];
  batch.Setup.conditions.durations{2}{1}{1}=[28,28,28,28];
  batch.Setup.conditions.durations{3}{1}{1}=[28,28,28,28];
  batch.Setup.conditions.onsets{4}{1}{1} = 0;
  batch.Setup.conditions.onsets{5}{1}{1} = 0;
  batch.Setup.conditions.onsets{6}{1}{1} = 0;
  batch.Setup.conditions.durations{4}{1}{1} = inf;
  batch.Setup.conditions.durations{5}{1}{1} = inf;
  batch.Setup.conditions.durations{6}{1}{1} = inf;

But when opening the analysis in the GUI, none of the 17 subject's conditions are displayed.
Attachment: rest_conn_group.m
Jan 23, 2015  02:01 PM | Greg Book
RE: conditions setup in batch
I just wanted to check in again. Is there apparently wrong with my batch script? Is there an example batch script I could look at for a reference?
Jan 27, 2015  07:01 PM | Alfonso Nieto-Castanon - Boston University
RE: conditions setup in batch
Hi Greg,

My initial guess would be that you might be getting an error during preprocessing (before CONN reaches the batch.Setup step), which would explain why none of the batch.Setup steps are run. Could you please let me know the command-line output when you run this script? One possible issue might be in your selection of the functional and structural files as '*.nii' within a given directory. Since the preprocessing steps are going to create several files in these same folders -and these files may already be there from previous attempts at preprocessing- perhaps you need to define a more specific filter (make sure that it selects just the desired files and no other files).

Also, you seem to be using the old preprocessing pipeline (preprocessing steps named 'segmentation', 'realignment', etc.), if possible I would suggest using the new preprocessing pipeline instead (preprocessing steps named 'structural_segmentation','functional_realign',etc.; see help conn_batch for details)

Hope this helps
Alfonso
Originally posted by Greg Book:
I'm running a batch script in conn toolbox 14.n, and I'm noticing that some of the fields are not transferring from the batch script into the analysis when it is loaded into conn to view the results. The two items are the TR (RT) and the conditions. The TR is easy to fix in the GUI once it is loaded, but then I need to rerun parts of the analysis with the correct TR. The conditions are a little harder. I have 17 subjects, 2 sessions, and 6 conditions each session. I don't want to have to manually enter that info, the batch file is much easier.

For the TR, I have this line:

  batch.Setup.R=1.86

but when loading the analysis in the GUI, it says [2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2]
and for the conditions, this is subject 1, session 1

  batch.Setup.conditions.names={'rest_pre','even_pre','lose_pre','rest_post','even_post','lose_post'};

  batch.Setup.conditions.onsets{1}{1}{1}=[28,74,120,166,212,258,304,350];
  batch.Setup.conditions.onsets{2}{1}{1}=[0,138,230,276];
  batch.Setup.conditions.onsets{3}{1}{1}=[46,92,184,322];
  batch.Setup.conditions.durations{1}{1}{1}=[18,18,18,18,18,18,18,18];
  batch.Setup.conditions.durations{2}{1}{1}=[28,28,28,28];
  batch.Setup.conditions.durations{3}{1}{1}=[28,28,28,28];
  batch.Setup.conditions.onsets{4}{1}{1} = 0;
  batch.Setup.conditions.onsets{5}{1}{1} = 0;
  batch.Setup.conditions.onsets{6}{1}{1} = 0;
  batch.Setup.conditions.durations{4}{1}{1} = inf;
  batch.Setup.conditions.durations{5}{1}{1} = inf;
  batch.Setup.conditions.durations{6}{1}{1} = inf;

But when opening the analysis in the GUI, none of the 17 subject's conditions are displayed.