open-discussion > "Error using Harvest (line 47)" - SPM batch preprocessing
Showing 1-3 of 3 posts
Display:
Results per page:
Feb 7, 2019  04:02 PM | Sara Calzolari
"Error using Harvest (line 47)" - SPM batch preprocessing
Hi all,

I am preprocessing some resting-state fMRI data, and I keep getting an error right after the SPM Batch module "Realign: Estimate and Reslice" saying "Error using harvest (line 47). Dependencies resolved, but not suitable for this item".

I can understand there's something wrong in the process of taking the output of Realignment to the next step (Slice Timing), but I don't understand why. I checked the quality of the data and they seem fine, the dependencies are correct in the batch, and I am using the default parameters as indicated in the SPM manual (SPM12).

Anyone has had this problem before?

Many thanks

Best,
Sara
Feb 8, 2019  12:02 AM | mehrnaz jenabi - mskcc
"Error using Harvest (line 47)" - SPM batch preprocessing
> Hi Sara
I don’t have enough information about your data, but you have to check your rfmri information with SPM defaults. They are not always works for all images.
Best
Mehrnaz
Feb 18, 2019  10:02 AM | Sara Calzolari
RE: "Error using Harvest (line 47)" - SPM batch preprocessing
Dear Mehrnaz,

I am dealing with 20 minutes-long resting-state fmri data collected during 3 different tDCS stimulation conditions (sham, anodal, cathodal). Data were collected with a Philips Achieva scanner.

Here below is the beginning of my batch preprocessing pipeline (Realign - Estimate and Reslice, and Slice Timing):

matlabbatch{1}.cfg_basicio.file_dir.dir_ops.cfg_cd.dir = '';
matlabbatch{2}.spm.spatial.realign.estwrite.data = {''};
matlabbatch{2}.spm.spatial.realign.estwrite.eoptions.quality = 0.9;
matlabbatch{2}.spm.spatial.realign.estwrite.eoptions.sep = 4;
matlabbatch{2}.spm.spatial.realign.estwrite.eoptions.fwhm = 5;
matlabbatch{2}.spm.spatial.realign.estwrite.eoptions.rtm = 1;
matlabbatch{2}.spm.spatial.realign.estwrite.eoptions.interp = 2;
matlabbatch{2}.spm.spatial.realign.estwrite.eoptions.wrap = [0 0 0];
matlabbatch{2}.spm.spatial.realign.estwrite.eoptions.weight = '';
matlabbatch{2}.spm.spatial.realign.estwrite.roptions.which = [2 1];
matlabbatch{2}.spm.spatial.realign.estwrite.roptions.interp = 4;
matlabbatch{2}.spm.spatial.realign.estwrite.roptions.wrap = [0 0 0];
matlabbatch{2}.spm.spatial.realign.estwrite.roptions.mask = 1;
matlabbatch{2}.spm.spatial.realign.estwrite.roptions.prefix = 'r';

matlabbatch{3}.spm.temporal.st.scans{1}(1) = cfg_dep('Realign: Estimate & Reslice: Resliced Images (Sess 1)', substruct('.','val', '{}',{2}, '.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}), substruct('.','sess', '()',{1}, '.','rfiles'));
matlabbatch{3}.spm.temporal.st.nslices = 34;
matlabbatch{3}.spm.temporal.st.tr = 2;
matlabbatch{3}.spm.temporal.st.ta = 1.94117647058824;
matlabbatch{3}.spm.temporal.st.so = [1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34];
matlabbatch{3}.spm.temporal.st.refslice = 1;
matlabbatch{3}.spm.temporal.st.prefix = 'a';


Attached you can find the script I'm using for calling inputs and job file (I'm trying with just one subject and the three tdcs conditions).
The error that I get after the realignment step is the following:


Done 'Realign: Estimate & Reslice'
Item 'Session', field 'val': Number of matching files (1) less than required (2).
Error using harvest (line 47)
Dependencies resolved, but not suitable for this item.
In item Session:
Dependency 1: Realign: Estimate & Reslice: Resliced Images (Sess 1)
(out.sess(1).rfiles)
'/projects/pbic1036/sara/bids_m1_data/derivatives/preprocessing/sub-0…'

Error in harvest (line 62)
Error in harvest (line 49)
Error in harvest (line 51)
Error in cfg_util>local_runcj (line 1723)
Error in cfg_util (line 959)
Error in spm_jobman>fill_run_job (line 458)
Error in spm_jobman (line 247)
Error in preprocessing_lets_try (line 29)


Any idea of what could be causing this error?
Many thanks

Best,
Sara