Frequently Asked Question for PLS Program ========================================= Q: Is there any restriction on file name? A: Yes, but not many. There are 3 kinds of major files that will be used in this program. They are session file, datamat file, and result file. The 3 major files must be in the forms of: *_MODULEsession.mat *_MODULEdatamat.mat *_MODULEresult.mat You can replace MODULE with any of PET, ERP, fMRI, or BfMRI, depending what PLS are you working on, and the dialogbox will always prompt you with the correct MODULE. You can not insert your own string into the above forms and break it. However, you can always use your own string before "_MODULE". I do not recommend you to use symbol characters like "+ - * / % ^ $ ' ..." etc. in your own string. In addition, you should not use "mv" or "ren" to rename the the filename manually by yourself, since this will break the filename linkage stored inside the above major files. Q: Can I put session file, datamat file or result file into a different directory, or even a mounted disk space on another machine? A: Yes, you can. We modified the program, so for both datamat file and result file, it always read them from the current directory. If they are not on current directory, you can click "Change Current Working Directory" under "Tools" menu of the first window to change it. For a session file, please keep in mind that you are NOT required to modify the paths for it after you moved data from one location to the other, unless you would like to modify the contents of the session file. This is because that "Run Analysis" and "Show results" only read file from the current directory. After Version 3.0409301, the program provided a new feature to let you change all the data paths automatically by clicking "Change Data Paths" under "Edit" menu. When you load a session file to modify, the program will also do a preliminary scan for the first run (or subject for PET & ERP) sub-folder. If the path is invalid, it will diplay a message at the bottom of the session window, and prompt users to go to "Edit" and "Change Data Paths" menu. If you want to modify a session file with an invalid data paths in it, the program will crash. To use the above feature, the following restriction must be followed: 1. For each MRI study, all run sub-folder must stay together under one folder: e.g: /a/b/c/run1/(301 images); /a/b/c/run2/(288 images); ... It will not work if you choose run1 from /a/b/c/run1, and choose run2 from /d/e/f/run2. 2. For each PET or ERP study, all subjects sub-folder must stay together under one folder: e.g: /a/b/c/s1/(4 conditions from 9 images); /a/b/c/s2/(4 conditions from 8 images); ... It will not work if you choose s1 from /a/b/c/s1, and choose s2 from /d/e/f/s2. If you can not follow the above restriction, you will have to re-edit everything for that session file after you move the data and you also want to modify the contents of the session file. Q: When I opened the result file, it crashed and told me that the datamat file was unable to open. (No, the datamat file was not in the current directory.) A: In the early version of the PLSgui program, we used the stored 'pls_data_path' variable to locate the files. However, this also caused trouble when people want to copy those datamat files from directory to directory, and even from one machine to the other. So, we decided to use the "current directory" rather than the stored 'pls_data_path' variable for "Run PLS" window and "PLS result" window. If you are not starting the program from the "current directory" where those datamat files sit, you can always change to "current directory" in the very first window by clicking "Change Current Working Directory" under "Tools" menu. Q: The result file was able to open yesterday, but now it is crashed. (Yes, I modified datamat.) A: The result file was created before Version 3.0408201. To speed up the opening of the result file, PLS program does not store the datamat file into the result file, and it only stores the file name of the result file. That means, once you modified a datamat file, you must re-create all the result files that used this datamat file. For both MRI modules, because the session file is called in PLS run window, the session file and the datamat file must exist in pair. That means, for both MRI modules, if you modified a session file, you must re-generate the corresponding datamat file, and of cause, re-run all the result files that used this session_file/datamat_file pair. For all result files created after Version 3.0408201, timestamp information is imbeded inside the result files. The program will automatically check for the timestamp integrity, and will prompt with a pop-up window if necessary. Q: When I edited subject directory for ERP and PET, I was asked to enter the "Number of charactor for subject initial". What should I enter? A: For ERP and PET data, each subject has its own directory. The data files inside the subject directory are different conditions for this subject. The name of these files can be arbitrary; however, if you give consistent naming across subjects, it will give you convenience to match the conditions. If you changed condition/file mapping for 1 subject, all other subjects will make proper change. When we say "consistent naming across subjects", we mean there are the same characters at the beginning of each filename are allocated as the subject identifier, with the remaining characters identifying the condition (e.g., "SubjInit_CondName"). If you have consistent filenames, enter the length of the subject initials in the "Number of Characters for Subject Initial" box; otherwise, leave it as -1 and this feature will be disabled. Q: What can this PLS Program do? A: PLS indicates Partial Least Squares (PLS) analysis method. It is based on the assumption that the focus of analysis is on which aspects of the signal in one matrix are related directly to signals in another matrix. This PLS program is applied to neuroimaging data, such as PET, ERP, Event Related fMRI and Blocked fMRI. It has been used to identify the task-dependent changes in activity, changes in the relations between brain and behaviour, and to examine functional connectivity of one or more brain regions. The similarities and differences in brain-behavior relations can be identified from the resultant patterns. Q: What data should I prepare for analysis? A: The data can be obtained from PET, ERP, or fMRI scan images. For PET and ERP data, you put different condition of data for each subject into its corresponding directory. For fMRI data, you put each run of data into its corresponding directory. Q: I entered 4 conditions. Why does the program only record 3 of them? A: When you complete each condition entry, you click "Add" button to let the program record this entry. Sometimes, people click the "DONE" button, instead of the "Add" button after they input the last condition. If this is the case, the last condition is not recorded into your session profile. Q: I made some changes, but it disappeared. Why? A: Any changes you made on the edit box need to be recorded. This can be done by clicking "Enter" key on your keyboard, or simply click anywhere else on the window to let the focus switch off from this edit box. If you did not let the focus switch off from this edit box, the change will not be recorded. Q: I followed the "consistent naming" rule mentioned above, but when I changed condition/file mapping for 1 subject, the other subjects did not change. A: Please check the following possibilities: 1) All directories under the parent of this subject directory that you made change should be subject directories. That means, all files under these directories should follow the "consistent naming" rule. If one of them is not subject directory, or one file in one of these directories does not follow that rule, the automatic condition/file mapping for all subjects will not work. 2) Don't let the processed data file name affect SubjInit. Assuming under subject "JoeS", you have SubjInit "JS". When you normalize that file, you can not call it "nJS...". Instead, you can call it "JSn..." or even "JS..._n". Q: Does the length of the data file name matter? A: No. It can be any length. However, please make sure that "SubjInit" portion should be the same length, which is equal to the value you put in "Number of charactor for subject initial" field. Q: Does the letter case of the data file name matter? A: No. It is particularly designed for case insensitive. So you can call the first data file name "JSdata1", and the second "jsData2". Q: What should I enter for "Edit Behavior Data"? A: For PET and ERP data, the number of rows for behavior data should be the number of conditions times the number of subjects, in the order of subjects in conditions: cond1/subj1 cond1/subj2 ... cond2/subj1 cond2/subj2 ... For fMRI data, the number of rows for behavior data should be either just the number of conditions, or the number of conditions times the number of runs, depending on whether you choose of "across run" or "within run" when you create datamat. The order should be either all conditions, or runs in conditions: for across run: cond1 cond2 ... for within run: cond1/run1 cond1/run2 ... cond2/run1 cond2/run2 ... The column of the behavior data should correspond to the different sets of the behavior measures. Q: To create fMRI datamat, should I average conditions across runs or just average within run? A: Unless the run info is important, I would suggest average across runs. Q: Do you have a tool for yanking datamat values out at a given location, data that could then be used in Seed-PLS? A: Yes. Check text file "SeedPLS.txt". Q: When I exported data for behav analysis for PET module, I saw the exported file name looks like "?_PET_grp?_behavdata.txt". For the 2 fMRI module, however, it looks like "_fMRI_grp?_subj?_behavdata.txt". Why the PET module does not include the subject information? A: For PET module, each datamat (and session file) represents a group that already contains subjects. However, for fMRI, each datamat (and session file) represents a subject. So, for fMRI, we need behavior measure of each subject in the group in order to add it into datamat (from session profile). For PET, we need behavior measure of each group. Q: Can I rename the session / datamat / result files manually? Why after I save as fMRI datamat into another file name, the corresponded session file also changed its name? A: We do not recommend you to change name manually. For fMRI, there is some internal processing between session / datamat files. That's why the session file name will be changed after you saved datamat file into another name. Actually, even if you change the prefix in the session file, it will prompt you to save into the name with that prefix. Q: After deselect the conditions, why the behavior data I loaded before running analysis get lost (or still use the one from datamat)? A: Because the rows of behavior data is determined by the conditions you selected. So, you need to load behavior data after you deselect the conditions. Q: Do I need to load behavior data next time before I run analysis? A: The behavior data usually is inputted before you create datamat. If you want a different behavior data, then the program provide you a chance to modify it (or load new) right before running analysis. You need to keep the ASCII file of the behavior data in the hard drive if you want to do this again before running analysis. Otherwise, the program will not know. Q: When I generate fMRI datamat, I got something like this: Scans 147 for the condition 3 of run1 are not included due to out of bound. Do you have any idea what this means? A: When you enter onset data, make sure they are in the range. In most case, you encounter this problem because the onset data you input exceeds the maximum range. The minmum value is started from 0. However, The maximum value you can enter is: Number_of_Scans - Temporal_Window_Size_if_fMRI - 1. E.g.: If you have 180 files, and window size is 8, the maximum value in onset data is 171. Q: What is the lag number? Is there anywhere I can enter the lag values? A: In E.R.fMRI, lag number is the index of the temporal window, and it starts from 0. You decide the temporal size in "Generate ST Datamat" window. The unit is scan, and the default value is 8. In LagXYZ field of result window, you can enter lag value, as well as XYZ coordinates in voxel. Q: When we run the behav PLS on Matlab 6.0, it crashed. A: PLS program does not have restriction on the version of Matlab (as long as 5.3.1 and up). However, we did find that Behavior PLS crashed on Matlab 6.0. This might be caused by its intrinsic progorm. So you may want to avoid using that particular version. In one word, you can use Matlab 5.3.1, Matlab 6.5, or Matlab6.5.1 ... Q: We are expecting to get the upgrade to version 7 (release 14) of Matlab this week. Do you know if there would be any expected problems using v7 for PLS analyses or should we just stick with our 6.5? A: Generally speaking, most software should be backward compatible, since the newer version of the software will just add new features and fix old problems. However, sometimes it is not the case. For example, Matlab will consider some functions obsolete and take them away in the new release. I also remember that Matlab version 6.0 caused some trouble when people run Behavior PLS, but no such problems for version 5.3.1 and version 6.5. Since you have Matlab version 7, I suggest that you should try it. If you encounter problem, you can always go back to version 6.5, because the *result.mat file you saved will be accepted by any versions. Q: We did an analysis for us a few years ago. We used the same subjects and get almost identical maps. However, the coordinate output is quite different. Based on other analyses of this data set and simply looking at the display images, I actually think the old coordinates are correct and the new ones are off. Have you any ideas? A: Go to the first window and uncheck the "Save Display Setting for PET/MRI" under "Tools" menu. Then, go to the fMRI result window, and click "Set Cluster Report Options" submenu from "Report" menu, and make sure the Origin location (in voxels) is set correctly. Change of the origin setting will result in the change of XYZ (mm) value. By default, the origin setting is obtained from the image header. If the image header is not a SPM Competible one or does not provide this information, it will set origin to: [max_x max_y max_z] / 2. However, if this setting is changed, and if the "Save Display Setting for PET/MRI" is "on", the current modified setting will be "remembered". Q: In our lab we use AFNI in the processing of fMRI data but I would like to use the PLS program to analyse an event-related dataset and further progress to conducting a functional connectivity analysis. My problem is that the PLSgui seems to need separate image files for every time volume (a separate image file for every 'scan' in a run), however, using AFNI, the raw 2D timeseries is transformed into a 3D dataset, upon which the motion correction, edge-detection and spatial normalisation processing steps are carried out. Can the PLSgui read in this entire timeseries or must the time volumes be somehow extracted from this file? A: PLSgui program need a separate image file for every 'scan' in a run, and can not read this entire timeseries file. In AFNI, there is a utility to convert its 3D dataset to Analyze Format, which is called: AFNItoANALYZE. Q: After having run a test analysis on just one subject, when i try to look at the first LV, an error message tells me that the threshold or max/min value is invalid. What should I do? A: There are two possibility can cause this. one possibility is caused by a bug in the code, which has now been fixed. Now, the code will handle the meaningless points of the bootstrap ratio, and make it 0. The other possibility is caused by the data itself. So, please check the value range of variable 'brainlv' (and 'boot_result.compare' if you ran bootstrap test). If they are all 0 or NaN or Inf, the result window can not be displayed properly. Q: Can I use Analyze image with different orientation? A: Yes, a new feature has been added to the version of Octobor 29,2004. This allows people to use Analyze images in any orientation for PET, E.R.fMRI and Blocked fMRI. In "Create Datamat" window, a new button named "Check image orientation" is added beside the "Create" button. Once you click this button, the 3-View of one of the subject images will be displayed in the "Change Image Orientation" window, and you can re-orient it by click the "Re-orient" button. Once you click the "Re-orient" button, it will ask you to input the orientation of the CURRENT DISPLAYED image. If you did not get the correct orientation, you can do as many times as you want to make it standard Analyze orientation, i.e. from Left to Right in X orientation, from Back to Front in Y, and from Bottom to Top in Z. If you closed the "Change Image Orientation" window, you can re-open it by click the "Check image orientation" button in "Create Datamat" window again. For people that already generated the result file in wrong orientation but did not correct it during creating datamat, we provided axial view of "Convert Orientation" (under "Image Rotation" menu in the result window) only for PET and Blocked fMRI. However, we do not recommend people to use this limited patch. Instead, we recommend people to use the feature in "Create Datamat" window to correct the orientation during creating datamat.