help > CONN stalls while importing functional data
Sep 10, 2019  12:09 PM | Eugenio Abela
CONN stalls while importing functional data
Hi all, 

I'm using the script below, it is based on the conn_batchexample_singlesubject.m Although it starts successfully, it stall while importing the functional data. When performing the same steps through the GUI, functional data import takes roughly 5 minutes; the script has been frozen for 1 hour now. 

Does any of you see my error? any help would be hugely appreciated!

Thank you

Eugenio

The CONN log is here:

CONN: RUNNING SETUP STEP
Step 1/7: Checking data completeness
spm @ /nan/ceph/network/system/el6/spm/spm-12-20181114
conn @ /home/k1632452/Documents/MATLAB/tools/conn
Checking if data files have been edited or moved
Step 2/7: Segmentation
Step 3/7: Importing conditions/covariates
Step 4/7: Importing functional data

It remains frozen at step 4/7

The script is below:

%% Preliminaries
% Addpath
addpath('/home/k1632452/Documents/MATLAB/tools/conn');

% Set data / results directory
subjDir = getenv('subj_dir'); % environment variables are set before the start of the script. this is to allow processing on a computer cluster
subjID = getenv('subj_id');
resultsDir = '/data/group/epilepsy/Abela/results/GSP1000';

% Select functional / anatomical volumes (already preprocessed externally)
func = cellstr(spm_select('FPListRec',subjDir,'^cwar'));
anat = cellstr(spm_select('FPListRec',subjDir,'^wmSub.*\.nii$'));

% Select tissue masks
gm = cellstr(spm_select('FPListRec',subjDir,'^mwp1'));
wm = cellstr(spm_select('FPListRec',subjDir,'^mwp2'));
csf = cellstr(spm_select('FPListRec',subjDir,'^mwp3'));

% Select regions of interest
roifiles = cellstr(spm_select('FPListRec','/data/group/epilepsy/Abela/data/ROI/Electrodes','ROI'));
roinames = cell(length(roifiles),1);
for roi = 1:length(roifiles)
[~,nam] = fileparts(roifiles{roi});
roinames(roi) = cellstr(nam);
end

% Select Volterra-expanded movement parametrs
vxmov = cellstr(spm_select('FPListRec',subjDir,'^vx'));

% Set erosion threshold for tissue masks
thresh = [0.5 0.5 0.5];

% Set TR (seconds)
TR = 2;

%% CONN New experiment
mkdir(resultsDir,['conn_' subjID]);
clear batch
batch.filename=fullfile(resultsDir,['conn_' subjID '.mat']);

%% CONN Setup
batch.Setup.nsubjects = 1;
batch.Setup.functionals{1}{1} = func;
batch.Setup.structurals{1}= anat;
batch.Setup.RT = TR;
batch.Setup.masks.Grey{1} = gm;
batch.Setup.masks.White{1}= wm;
batch.Setup.masks.CSF{1} = csf;
batch.Setup.binary_threshold = thresh;
batch.Setup.erosion_steps= [0 1 1];
batch.Setup.erosion_neighb= [1 1 1];
for count = 1:length(roifiles)
batch.Setup.rois.files{count}{1} =roifiles(count);
end
batch.Setup.conditions.names = {'rest'};
batch.Setup.conditions.onsets{1}{1}{1} = 0;
batch.Setup.conditions.durations{1}{1}{1}= Inf;
batch.Setup.covariates.names{1} = 'Friston24';
batch.Setup.covariates.files{1}{1}{1} = vxmov;
batch.Setup.outputfiles= [0 1 0 0 0 1];
batch.Setup.isnew=1;
batch.Setup.done =1;

%% CONN Denoising
batch.Denoising.filter = [0.009, 0.08]; % [0.01 0.1]
batch.Denoising.detrending= 1;
batch.Denoising.confounds.names{1} = 'Friston24';
batch.Denoising.confounds.names{2} = 'White Matter';
batch.Denoising.confounds.dimensions{2} = 5;
batch.Denoising.confounds.names{3}= 'CSF';
batch.Denoising.confounds.dimensions{3} = 5;
batch.Denoising.done=1;

%% CONN Analysis
batch.Analysis.analysis_number=1; % Sequential number identifying each set of independent first-level analyses
batch.Analysis.measure=1; % connectivity measure used {1 = 'correlation (bivariate)', 2 = 'correlation (semipartial)', 3 = 'regression (bivariate)', 4 = 'regression (multivariate)';
batch.Analysis.weight=1; % within-condition weight used {1 = 'none', 2 = 'hrf', 3 = 'hanning';
batch.Analysis.sources={}; % (defaults to all ROIs)
batch.Analysis.done=1;

%% CONN Run batch
conn_batch(batch);

Threaded View

TitleAuthorDate
CONN stalls while importing functional data
Eugenio Abela Sep 10, 2019
Eugenio Abela Sep 11, 2019