I wrote some batch scripts for NIRS-SPM. They, together with NIRS-SPM and xTopo, are called “super” package (I apparently run out of names). The “super” package are located in directory:
/fs/quarry/cuixu/NIRS/super
Please don’t modify the files inside.
“super” contains the following scripts:
- mes2NIRSSPM, which converts Hitachi measurement data (in csv format) to NIRS-SPM recognized format (.mat file). Note: this script allows you to convert one or two files (for bilateral 3×5 and 4×4 configurations, you have 2 csv files) into one mat files. NIRS-SPM itself only convert 1 (I already contacted NIRS SPM developers to add this functionality.).
- spec, which specify your general linear model (design matrix), including data file, where to save spm files, either HbR or HbO, onset timing, duration etc.
- estimate_indiv, do estimation
- cuixu_nirsContrast, do contrast. Here you specify contrast vector etc
- estimate_group, do group estimation
All of these scripts can run alone — you don’t need to click button etc. To get more information of how to use these scripts, you may type help <script name>
.
Here is instructions:
- Log in to server (e.g. ssh fmri@scuttlebutt -Y)
- Start matlab with SPM5 in the path (e.g. ml7spm5 -jvm)
- add the path of super
addpath(genpath('/fs/quarry/cuixu/NIRS/super'))
- Enter a directory where you prefer to work (e.g. your data’s directory).
- Use mes2NIRSSPM to convert csv to mat file. e.g.
mes2NIRSSPM(nirsfile, [‘converted_NIRS_’ subject_name])
Note: nirsfile is a cell array. Each element is a file name. For 4×4 and 3×5 configurations, you have 2 files; for 3×11, you have only one. - You need to configure your channel positions and get a channel position mat file. You can use the default files provided in super/templateFile/.
- use spec to specify design matrix. e.g.
spec(‘converted_NIRS_c.mat’, ‘./newspmdir’,1, {‘trial1′,’t2′},{[1:1:100]’,[2:2:200]’},{ones(100,1),ones(100,1)*2});
Type help spec for more info. - use estimate_indiv to begin estimation. e.g.
estimate_indiv(spmfile) - use cuixu_nirsContrast to do contrast.
- Repeat step 5-9 for other subjects
- use estimate_group to do group analysis
- To view result, launch nirs spm, click button “Results NIRS”. There you input the individual (or group)’s spm file, and channel location mat file (not required for group), and click button “Contrast”.
Leave a comment here if you have a question. To obtain a copy of super package, please fill the form below.
Hi Xu,
thank you very much for writing the “super” package. In your discription are some batches I need for my analysis with NIRS_SPM but I have not found the download here for your package.
If it´s no more online available, please can you send it to my private emailadress?
Thank you very much!
kind regards,
Susanne
Would you send me the code as well please? I have about 90 files I need to convert for individual and group analysis. Automating the contrast and group analysis would be very helpful.
Thanks,
Matthew
Also, could you send me your “super” package? Thank you very much! If you come back to Beijing, I’ll treat you to a big meal:)
[email protected]
Is this code still available? I just started with NIRS and am a bit lost as to coding around NIRS_SPM. Let me know if you could share, thanks!
soupblolwall@gmail
Hi Xu
Hereby I would like to ask whether you still have the code for the batch processing using NIRS-SPM. I would be very grateful if you could share it with me, your ‘super’ package?
Thank you in advcance,
Lisa Holper
@Lisa Holper
Lisa, please fill the form at the bottom of this article and a download link will be sent to you.
Xu, many thanks!
lisa
Hi Xu,
Thanks again for your hint, I downloaded the package.
I know it is a long time ago you wrote that code. But would it be possible for you to adapt the code in order to process all subjects in one run?
I have hundreds of subjects -)
best
Lisa
@Xu Cui
@Lisa Holper
Lisa,
Unfortunately I don’t have time to do this.
Xu, ok, no problem.
Lisa
Thank you
Dear Xu Cui,
I would be very pleased if you can give me access to your files. We are currently trying to process fNIRS data and I hope I can get some help here.
Thank you,
Johanna
@Johanna Alexopoulos
Johanna, did you fill the form and download the scripts?
Hi, Can I please download the scripts?
Thanks,
Jeff
@Jeff Eilbott
Yes. Do you have issue in downloading it?
Hi,Xu, I would be very honored if you share your “super” codes with me.Thanks!
[email protected]
hi Xu:
please send me link to your script.
thanks!
Xian from Yale
@xian zhang
Xian, when you filled the form and clicked ‘submit’ button, did you get an email with the download link?
Dear Dr.Cui:
There may be something wrong with the download link.It’s possible and convenient for you sent me the package ? E-mail address: [email protected].
Thanks a lot
hi Xu:
please send me link to your script.
thanks!
@seapsy
Please check email
Hi,Xu, I would really appreciate if you share your “super” codes with me.Thanks!
Hi Xu:
Thanks for sharing your super package!
Hi Xu,
thank you very much for writing the “super” package. In your discription are some batches I need for my analysis with NIRS_SPM but I have not found the download here for your package.
please send me link to your super script.
Thank you very much!
kind regards,
Cui Jie
Hi Xu,
thank you very much for writing the “super” package. I have filled the form and clicked ’submit’ button, but I did not get an email with the download link. [email protected] please send me your “super” scripts. Thank you very much!
kind regards,
Cui Jie
We fixed the super package download link. Now it can download successfully.
Hi Xu
Thanks for your sharing.Can I get the link to download “super”package?My email address:[email protected] you!
Huang Zhi
Please fill the form above to download it