FSL
- https://github.com/poldrack/fmri-analysis-vm/tree/master/analysis/postFMRIPREPmodelling
- https://github.com/poldracklab/fitlins
- https://mumfordbrainstats.tumblr.com/post/166054797696/feat-registration-workaround
- an example Nipype workflow for post-fMRIPrep first- and second-level models in FSL
Nipype
- Nipype org
- Nipype manual
- NiBabel nii数据读取
Install
- 安装Neurodebian。注意密钥按照官网教程无法安装,使用下列命令可以:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2649A5A9
- 安装conda
- conda install nipype
- 如果遇到permission error,sudo chmod -R 777
1st
- 视频教程
https://youtu.be/Nkt6hsY-T0s https://youtu.be/GncNH7l6OOQ
SPM BIDS APP 测试
之前的aa工具包已经过时了。aa工具包的参数配置没有一个很好的说明文档,配置起来很头疼。 aa的优点就是分离了配置参数和运行命令,而如今基于BIDS的SPM BIDS App也实现了这种功能。 两者的差别在于,aa使用了xml语言来配置参数文件,而SPM BIDS App用的是matlab语言。 相比之下,matlab语言可比xml简单多了。 类似于fmriprep,SPM BIDS App的运行也分为以下几步
- 如果没有安装,docker pull bids/SPM
- usage: run
{participant|group} [--participant_label ] [--freesurfer_license ] [--connection ] [ ] - docker run -ti –rm
-v /tmp:/tmp
-v /var/tmp:/var/tmp
-v /path/to/local/bids/input/dataset/:/data
-v /path/to/local/output/:/output
-v /path/to/local/cfg/:/cfg
bids/spm
/data /output participant
–participant_label 01
–config /cfg/my_pipeline_1st.m - 命令详解: -t: 为容器重新分配一个伪输入终端,通常与 -i 同时使用(默认); -i: 以交互模式运行容器,通常与 -t 同时使用(默认); –rm自动移除已经存在的容器(断开联系而非删除容器本身)(默认); –volume/-v The -v flag mounts the current working directory into the container(需要修改).
- BIDS Tools in SPM
SPM BIDS APP 测试感受 (baybay6)
- The biggest problem is that SPM is not supported of compressed NIfTI files (.nii.gz), thus as well as SPM BIDS APP.
- spm_select函数不支持导入nii.gz格式的4D数据,只支持nii格式;
- Convert nii.gz to nii
gunzip('*.gz')
- if you encounter a problem “could not open file”, try
sudo chmod -R 777 /data/fMRI/fmriprep
References
- https://neurostars.org/t/performing-a-basic-two-sample-t-test-in-spm-using-nipype-interfaces-spm/493
- python script to load confounds