Back to PLS Help

error in batch_create_datamat
grace
Posted on 06/08/12 14:23:28
Number of posts: 16
grace posts:

I'm getting this error when I try to run batch_plsgui:

batch_plsgui PLSfile16.txt PLSfile18.txt
??? Error using ==> cell
NaN and Inf not allowed.

Error in ==> batch_create_datamat at 227
session.subj_files = cell(session.num_cond, session.num_subj);

Error in ==> batch_plsgui at 38
batch_create_datamat(fid);




The text file looks like this:




%------------------------------------------------------------------------

%%%%%%%%%%%%%%%%%%%%%%%%%%%
% General Section Start %
%%%%%%%%%%%%%%%%%%%%%%%%%%%

prefix odorscan16
brain_region 0.15
win_size 8
across_run 1
single_subj 0
single_ref_scan 0 % 1 for single reference scan, 0 for normal reference scan
single_ref_onset 0 % single reference scan onset
single_ref_number 1 % single reference scan number
normalize 0 % normalize volume mean (keey 0 unless necessary)

%%%%%%%%%%%%%%%%%%%%%%%%%
% General Section End %
%%%%%%%%%%%%%%%%%%%%%%%%%

%------------------------------------------------------------------------

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Condition Section Start %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

cond_name 1
ref_scan_onset 0
num_ref_scan 1

cond_name 3
ref_scan_onset 0
num_ref_scan 1

cond_name 4
ref_scan_onset 0
num_ref_scan 1

cond_name 5
ref_scan_onset 0
num_ref_scan 1

cond_name 6
ref_scan_onset 0
num_ref_scan 1

cond_name 7
ref_scan_onset 0
num_ref_scan 1

cond_name 8
ref_scan_onset 0
num_ref_scan 1

cond_name 9
ref_scan_onset 0
num_ref_scan 1

cond_name 11
ref_scan_onset 0
num_ref_scan 1

cond_name 13
ref_scan_onset 0
num_ref_scan 1

cond_name 14
ref_scan_onset 0
num_ref_scan 1

cond_name 15
ref_scan_onset 0
num_ref_scan 1

cond_name 16
ref_scan_onset 0
num_ref_scan 1


%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Condition Section End %
%%%%%%%%%%%%%%%%%%%%%%%%%%%

%------------------------------------------------------------------------

%%%%%%%%%%%%%%%%%%%%%%%
% Run Section Start %
%%%%%%%%%%%%%%%%%%%%%%%

data_files /home/grace/odorscan/odorscan_afni/plsdir/subj16_epi_TT.nii

event_onsets 21.38 235.09 608.8034 759.6113 1251.4572 1552.978 1812.443
event_onsets 30.2 262.33 503.88 581.6457 868.8 946.93 1224.79 1366.21 1517.11 1739.9504
event_onsets 120.3853 252.9948 548.5751 636.4 850.45 973.8186 1187.995 1465.5841 1643.6397 1758.0861
event_onsets 111.59 343.95 467.069 699.3242 787.74 1073.5357 1296.784 1661.7669 1730.8773
event_onsets 57.29 280.1597 512.3455 572.5915 955.683 1438.7 1670.8306 1794.3324
event_onsets 84.18 361.83 530.4644 681.98 923.19 1037.61 1197.56 1339.14 1571.7 1848.6893
event_onsets 47.9 244.28 385.85 600.89 905.11 964.7466 1288.41 1457.15 1562.81 1704.01
event_onsets 66.53 307.85 421.8079 727.64 814.0099 1046.58 1142.81 1393.92 1535.04 1776.2051
event_onsets 271.1055 521.3998 663.66 769.13 1028.43 1170.34 1430.02 1626.23 1749.06
event_onsets 102.64 198.6619 440.34 626.8983 823.0653 1111.16 1402.36 1607.3682 1803.3961
event_onsets 157.24 352.6033 430.8643 717.4348 886.51 991.9543 1151.7403 1356.94 1543.9143 1695.06
event_onsets 148.33 226.16 404.32 914.36 1011.1 1269.82 1634.97
event_onsets 3.72 207.89 495.83 708.3795 1100.7183 1178.9397 1329.77 1580.98 1722.24

%%%%%%%%%%%%%%%%%%%%%
% Run Section End %
%%%%%%%%%%%%%%%%%%%%%

%------------------------------------------------------------------------


Would appreciate it if someone could point out what I'm doing wrong! Thanks!
Grace

Replies:

Untitled Post

I'm Online
jshen
Posted on 06/08/12 15:02:05
Number of posts: 291
jshen replies:

I tried the batch script that you posted (odorscan16), and it looks fine. I cannot duplicate the error messages that you encountered. Would you please upload your data (subj16_epi_TT.nii) to somewhere that I can access, and send me the link to the data, in order for me to look into it further? (Please DO NOT attach your data to the email).




Untitled Post
grace
Posted on 06/08/12 16:58:15
Number of posts: 16
grace replies:

Hi Jimmy, I've uploaded the data here: http://mt-hood.stanford.edu/grace/pls/ Thanks for your help!


Untitled Post

I'm Online
jshen
Posted on 06/08/12 18:08:33
Number of posts: 291
jshen replies:

I am still not able to duplicate your error message.

I have successfully created the datamat without changing your batch file (except the path), and I have uploaded them to my FTP site:
ftp://ftp.rotman-baycrest.on.ca/pub/jimmy/forGrace/

The error message that you received is really strange, and I cannot even imagine where could be the problem. The only suggestion that I can give you is that try it on another computer with different MATLAB, and actually there is no reason for this suggestion. Sorry.



Untitled Post
grace
Posted on 06/08/12 18:10:37
Number of posts: 16
grace replies:

Thanks for your help Jimmy!


Untitled Post

I'm Online
nlobaugh
Posted on 06/08/12 18:46:31
Number of posts: 229
nlobaugh replies:

Grace.. your preprocessing pipeline is broken. You've set a threshold of 0.15 for the background, but most of your "background" voxels are higher than the "brain" voxels. This causes only noise to pass the threshold, and when the software tries to find "common" voxels, it is unable to find a single location that contains data across all of your TRs, so the datamat is "created" but is empty. It appears you have normalized these datasets in some way. If you are confident in that part of your processing pipeline, you can specify a brain mask instead of the threshold to eliminate the backround voxels for each subject. nancy


Untitled Post
grace
Posted on 06/08/12 18:50:14
Number of posts: 16
grace replies:

Hi Nancy, thanks for pointing this out! I'll take a closer look at my preprocessing to see where I'm going wrong.


Untitled Post
grace
Posted on 06/20/12 21:54:38
Number of posts: 16
grace replies:

Hi Nancy and Jimmy, I used another machine and the scripts run fine. Also I used non-normalized data and I am getting (hopefully) sensible results. Thanks for the advice!



Login to reply to this topic.

  • Keep in touch

Enter your email above to receive electronic messages from Baycrest, including invitations to programs and events, newsletters, updates and other communications.
You can unsubscribe at any time.
Please refer to our Privacy Policy or contact us for more details.

  • Follow us on social
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube

Contact Us:

3560 Bathurst Street
Toronto, Ontario
Canada M6A 2E1
Phone: (416) 785-2500

Baycrest is an academic health sciences centre fully affiliated with the University of Toronto