In [1]:
%matplotlib inline
In [2]:
from nipype.interfaces import afni as afni
import numpy as np
import pandas as pd
import os as os
import re as re
import glob as glob
import nibabel as nibabel
from mvpa2.tutorial_suite import *
In [3]:
### SET Working directory
% cd /Volumes/group/iang/biac3/gotlib7/data/PARC/testingGround/PARC_mvpa/
/Volumes/group/iang/biac3/gotlib7/data/PARC/testingGround/PARC_mvpa
In [4]:
BADALIGN_PARC_sub_2736.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2874_fs_brain.subj.nii.gz*
PARC_sub_2699.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2874_study_timingdata.csv*
PARC_sub_2699.LSSbetas.GAM.test.uber.nii* PARC_sub_2874_test_timingdata.csv*
PARC_sub_2699.labelVolume.nii.gz* PARC_sub_2879.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2699.mean_func.r02.nii.gz* PARC_sub_2879.LSSbetas.GAM.test.uber.nii*
PARC_sub_2699.parafusi.nii* PARC_sub_2879.labelVolume.nii.gz*
PARC_sub_2699_FSPGR_1.nii.gz* PARC_sub_2879.mean_func.r02.nii.gz*
PARC_sub_2699_fs_brain.subj.nii.gz* PARC_sub_2879.parafusi.nii*
PARC_sub_2699_test_timingdata.csv* PARC_sub_2879_fs_brain.subj.nii.gz*
PARC_sub_2718.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2879_study_timingdata.csv*
PARC_sub_2718.LSSbetas.GAM.test.uber.nii* PARC_sub_2879_test_timingdata.csv*
PARC_sub_2718.labelVolume.nii.gz* PARC_sub_2885.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2718.mean_func.r02.nii.gz* PARC_sub_2885.LSSbetas.GAM.test.uber.nii*
PARC_sub_2718.parafusi.nii* PARC_sub_2885.labelVolume.nii.gz*
PARC_sub_2718_FSPGR_1.nii.gz* PARC_sub_2885.mean_func.r02.nii.gz*
PARC_sub_2718_fs_brain.subj.nii.gz* PARC_sub_2885.parafusi.nii*
PARC_sub_2718_study_timingdata.csv* PARC_sub_2885_FSPGR_1.nii.gz*
PARC_sub_2718_test_timingdata.csv* PARC_sub_2885_fs_brain.subj.nii.gz*
PARC_sub_2726.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2885_study_timingdata.csv*
PARC_sub_2726.LSSbetas.GAM.test.uber.nii* PARC_sub_2885_test_timingdata.csv*
PARC_sub_2726.labelVolume.nii.gz* PARC_sub_2903.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2726.mean_func.r02.nii.gz* PARC_sub_2903.LSSbetas.GAM.test.uber.nii*
PARC_sub_2726.parafusi.nii* PARC_sub_2903.labelVolume.nii.gz*
PARC_sub_2726_FSPGR_1.nii.gz* PARC_sub_2903.mean_func.r02.nii.gz*
PARC_sub_2726_fs_brain.subj.nii.gz* PARC_sub_2903.parafusi.nii*
PARC_sub_2726_study_timingdata.csv* PARC_sub_2903_FSPGR_1.nii.gz*
PARC_sub_2726_test_timingdata.csv* PARC_sub_2903_fs_brain.subj.nii.gz*
PARC_sub_2736.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2903_study_timingdata.csv*
PARC_sub_2736.LSSbetas.GAM.test.uber.nii* PARC_sub_2903_test_timingdata.csv*
PARC_sub_2736.labelVolume.nii.gz* PARC_sub_2908_FSPGR_1.nii.gz*
PARC_sub_2736.mean_func.r02.nii.gz* PARC_sub_2908_study_timingdata.csv*
PARC_sub_2736.parafusi.nii* PARC_sub_2908_test_timingdata.csv*
PARC_sub_2736_FSPGR_1.nii.gz* PARC_sub_2917.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2736_fs_brain.subj.nii.gz* PARC_sub_2917.LSSbetas.GAM.test.uber.nii*
PARC_sub_2736_study_timingdata.csv* PARC_sub_2917.labelVolume.nii.gz*
PARC_sub_2736_test_timingdata.csv* PARC_sub_2917.mean_func.r02.nii.gz*
PARC_sub_2747.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2917.parafusi.nii*
PARC_sub_2747.LSSbetas.GAM.test.uber.nii* PARC_sub_2917_FSPGR_1.nii.gz*
PARC_sub_2747.labelVolume.nii.gz* PARC_sub_2917_fs_brain.subj.nii.gz*
PARC_sub_2747.mean_func.r02.nii.gz* PARC_sub_2917_study_timingdata.csv*
PARC_sub_2747.parafusi.nii* PARC_sub_2917_test_timingdata.csv*
PARC_sub_2747_FSPGR_1.nii.gz* PARC_sub_2927.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2747_fs_brain.subj.nii.gz* PARC_sub_2927.LSSbetas.GAM.test.uber.nii*
PARC_sub_2747_study_timingdata.csv* PARC_sub_2927.labelVolume.nii.gz*
PARC_sub_2747_test_timingdata.csv* PARC_sub_2927.mean_func.r02.nii.gz*
PARC_sub_2754.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2927.parafusi.nii*
PARC_sub_2754.LSSbetas.GAM.test.uber.nii* PARC_sub_2927_FSPGR_1.nii.gz*
PARC_sub_2754.labelVolume.nii.gz* PARC_sub_2927_fs_brain.subj.nii.gz*
PARC_sub_2754.mean_func.r02.nii.gz* PARC_sub_2927_study_timingdata.csv*
PARC_sub_2754.parafusi.nii* PARC_sub_2927_test_timingdata.csv*
PARC_sub_2754_FSPGR_1.nii.gz* PARC_sub_2938.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2754_fs_brain.subj.nii.gz* PARC_sub_2938.LSSbetas.GAM.test.uber.nii*
PARC_sub_2754_study_timingdata.csv* PARC_sub_2938.labelVolume.nii.gz*
PARC_sub_2754_test_timingdata.csv* PARC_sub_2938.mean_func.r02.nii.gz*
PARC_sub_2759.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2938.parafusi.nii*
PARC_sub_2759.LSSbetas.GAM.test.uber.nii* PARC_sub_2938_FSPGR_1.nii.gz*
PARC_sub_2759.labelVolume.nii.gz* PARC_sub_2938_fs_brain.subj.nii.gz*
PARC_sub_2759.mean_func.r02.nii.gz* PARC_sub_2938_study_timingdata.csv*
PARC_sub_2759.parafusi.nii* PARC_sub_2938_test_timingdata.csv*
PARC_sub_2759_FSPGR_1.nii.gz* PARC_sub_2939.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2759_fs_brain.subj.nii.gz* PARC_sub_2939.LSSbetas.GAM.test.uber.nii*
PARC_sub_2759_study_timingdata.csv* PARC_sub_2939.labelVolume.nii.gz*
PARC_sub_2759_test_timingdata.csv* PARC_sub_2939.mean_func.r02.nii.gz*
PARC_sub_2761.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2939.parafusi.nii*
PARC_sub_2761.LSSbetas.GAM.test.uber.nii* PARC_sub_2939_FSPGR_1.nii.gz*
PARC_sub_2761.labelVolume.nii.gz* PARC_sub_2939_fs_brain.subj.nii.gz*
PARC_sub_2761.mean_func.r02.nii.gz* PARC_sub_2939_study_timingdata.csv*
PARC_sub_2761.parafusi.nii* PARC_sub_2939_test_timingdata.csv*
PARC_sub_2761_FSPGR_1.nii.gz* PARC_sub_2945.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2761_fs_brain.subj.nii.gz* PARC_sub_2945.LSSbetas.GAM.test.uber.nii*
PARC_sub_2761_study_timingdata.csv* PARC_sub_2945.labelVolume.nii.gz*
PARC_sub_2761_test_timingdata.csv* PARC_sub_2945.mean_func.r02.nii.gz*
PARC_sub_2778.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2945.parafusi.nii*
PARC_sub_2778.LSSbetas.GAM.test.uber.nii* PARC_sub_2945_FSPGR_1.nii.gz*
PARC_sub_2778.labelVolume.nii.gz* PARC_sub_2945_fs_brain.subj.nii.gz*
PARC_sub_2778.mean_func.r02.nii.gz* PARC_sub_2945_study_timingdata.csv*
PARC_sub_2778.parafusi.nii* PARC_sub_2945_test_timingdata.csv*
PARC_sub_2778_FSPGR_1.nii.gz* PARC_sub_2955.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2778_fs_brain.subj.nii.gz* PARC_sub_2955.LSSbetas.GAM.test.uber.nii*
PARC_sub_2778_study_timingdata.csv* PARC_sub_2955.labelVolume.nii.gz*
PARC_sub_2778_test_timingdata.csv* PARC_sub_2955.mean_func.r02.nii.gz*
PARC_sub_2784.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2955.parafusi.nii*
PARC_sub_2784.LSSbetas.GAM.test.uber.nii* PARC_sub_2955_FSPGR_1.nii.gz*
PARC_sub_2784.labelVolume.nii.gz* PARC_sub_2955_fs_brain.subj.nii.gz*
PARC_sub_2784.mean_func.r02.nii.gz* PARC_sub_2955_study_timingdata.csv*
PARC_sub_2784.parafusi.nii* PARC_sub_2955_test_timingdata.csv*
PARC_sub_2784_FSPGR_1.nii.gz* PARC_sub_2956.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2784_fs_brain.subj.nii.gz* PARC_sub_2956.LSSbetas.GAM.test.uber.nii*
PARC_sub_2784_study_timingdata.csv* PARC_sub_2956.labelVolume.nii.gz*
PARC_sub_2784_test_timingdata.csv* PARC_sub_2956.mean_func.r02.nii.gz*
PARC_sub_2786.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2956.parafusi.nii*
PARC_sub_2786.LSSbetas.GAM.test.uber.nii* PARC_sub_2956_FSPGR_1.nii.gz*
PARC_sub_2786.labelVolume.nii.gz* PARC_sub_2956_fs_brain.subj.nii.gz*
PARC_sub_2786.mean_func.r02.nii.gz* PARC_sub_2956_study_timingdata.csv*
PARC_sub_2786.parafusi.nii* PARC_sub_2956_test_timingdata.csv*
PARC_sub_2786_FSPGR_1.nii.gz* PARC_sub_2958.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2786_fs_brain.subj.nii.gz* PARC_sub_2958.LSSbetas.GAM.test.uber.nii*
PARC_sub_2786_study_timingdata.csv* PARC_sub_2958.labelVolume.nii.gz*
PARC_sub_2786_test_timingdata.csv* PARC_sub_2958.mean_func.r02.nii.gz*
PARC_sub_2787.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2958.parafusi.nii*
PARC_sub_2787.LSSbetas.GAM.test.uber.nii* PARC_sub_2958_FSPGR_1.nii.gz*
PARC_sub_2787.labelVolume.nii.gz* PARC_sub_2958_fs_brain.subj.nii.gz*
PARC_sub_2787.mean_func.r02.nii.gz* PARC_sub_2958_study_timingdata.csv*
PARC_sub_2787.parafusi.nii* PARC_sub_2958_test_timingdata.csv*
PARC_sub_2787_FSPGR_1.nii.gz* PARC_sub_2967.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2787_fs_brain.subj.nii.gz* PARC_sub_2967.LSSbetas.GAM.test.uber.nii*
PARC_sub_2787_study_timingdata.csv* PARC_sub_2967.labelVolume.nii.gz*
PARC_sub_2787_test_timingdata.csv* PARC_sub_2967.mean_func.r02.nii.gz*
PARC_sub_2788.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2967.parafusi.nii*
PARC_sub_2788.LSSbetas.GAM.test.uber.nii* PARC_sub_2967_FSPGR_1.nii.gz*
PARC_sub_2788.labelVolume.nii.gz* PARC_sub_2967_fs_brain.subj.nii.gz*
PARC_sub_2788.mean_func.r02.nii.gz* PARC_sub_2967_study_timingdata.csv*
PARC_sub_2788.parafusi.nii* PARC_sub_2967_test_timingdata.csv*
PARC_sub_2788_FSPGR_1.nii.gz* PARC_sub_2987.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2788_fs_brain.subj.nii.gz* PARC_sub_2987.LSSbetas.GAM.test.uber.nii*
PARC_sub_2788_study_timingdata.csv* PARC_sub_2987.labelVolume.nii.gz*
PARC_sub_2788_test_timingdata.csv* PARC_sub_2987.mean_func.r02.nii.gz*
PARC_sub_2792.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2987.parafusi.nii*
PARC_sub_2792.LSSbetas.GAM.test.uber.nii* PARC_sub_2987_FSPGR_1.nii.gz*
PARC_sub_2792.labelVolume.nii.gz* PARC_sub_2987_fs_brain.subj.nii.gz*
PARC_sub_2792.mean_func.r02.nii.gz* PARC_sub_2987_study_timingdata.csv*
PARC_sub_2792.parafusi.nii* PARC_sub_2987_test_timingdata.csv*
PARC_sub_2792_FSPGR_1.nii.gz* PARC_sub_2993.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2792_fs_brain.subj.nii.gz* PARC_sub_2993.LSSbetas.GAM.test.uber.nii*
PARC_sub_2792_study_timingdata.csv* PARC_sub_2993.labelVolume.nii.gz*
PARC_sub_2792_test_timingdata.csv* PARC_sub_2993.mean_func.r02.nii.gz*
PARC_sub_2796.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_2993.parafusi.nii*
PARC_sub_2796.LSSbetas.GAM.test.uber.nii* PARC_sub_2993_FSPGR_1.nii.gz*
PARC_sub_2796.labelVolume.nii.gz* PARC_sub_2993_fs_brain.subj.nii.gz*
PARC_sub_2796.mean_func.r02.nii.gz* PARC_sub_2993_study_timingdata.csv*
PARC_sub_2796.parafusi.nii* PARC_sub_2993_test_timingdata.csv*
PARC_sub_2796_FSPGR_1.nii.gz* PARC_sub_3010.LSSbetas.BLOCK6.study.uber.nii*
PARC_sub_2796_fs_brain.subj.nii.gz* PARC_sub_3010.LSSbetas.GAM.test.uber.nii*
PARC_sub_2796_study_timingdata.csv* PARC_sub_3010.labelVolume.nii.gz*
PARC_sub_2796_test_timingdata.csv* PARC_sub_3010.mean_func.r02.nii.gz*
PARC_sub_2799.LSSbetas.BLOCK6.study.uber.nii* PARC_sub_3010.parafusi.nii*
PARC_sub_2799.LSSbetas.GAM.test.uber.nii* PARC_sub_3010_FSPGR_1.nii.gz*
PARC_sub_2799.labelVolume.nii.gz* PARC_sub_3010_fs_brain.subj.nii.gz*
PARC_sub_2799.mean_func.r02.nii.gz* PARC_sub_3010_study_timingdata.csv*
PARC_sub_2799.parafusi.nii* PARC_sub_3010_test_timingdata.csv*
PARC_sub_2799_FSPGR_1.nii.gz* pb02.PARC_sub_2699.r02.volreg+orig.BRIK*
PARC_sub_2799_fs_brain.subj.nii.gz* pb02.PARC_sub_2699.r02.volreg+orig.HEAD*
PARC_sub_2799_study_timingdata.csv* pb02.PARC_sub_2718.r02.volreg+orig.BRIK*
PARC_sub_2799_test_timingdata.csv* pb02.PARC_sub_2718.r02.volreg+orig.HEAD*
PARC_sub_2825.LSSbetas.BLOCK6.study.uber.nii* pb02.PARC_sub_2726.r02.volreg+orig.BRIK*
PARC_sub_2825.LSSbetas.GAM.test.uber.nii* pb02.PARC_sub_2726.r02.volreg+orig.HEAD*
PARC_sub_2825.labelVolume.nii.gz* pb02.PARC_sub_2736.r02.volreg+orig.BRIK*
PARC_sub_2825.mean_func.r02.nii.gz* pb02.PARC_sub_2736.r02.volreg+orig.HEAD*
PARC_sub_2825.parafusi.nii* pb02.PARC_sub_2747.r02.volreg+orig.BRIK*
PARC_sub_2825_FSPGR_1.nii.gz* pb02.PARC_sub_2747.r02.volreg+orig.HEAD*
PARC_sub_2825_fs_brain.subj.nii.gz* pb02.PARC_sub_2754.r02.volreg+orig.BRIK*
PARC_sub_2825_study_timingdata.csv* pb02.PARC_sub_2754.r02.volreg+orig.HEAD*
PARC_sub_2825_test_timingdata.csv* pb02.PARC_sub_2759.r02.volreg+orig.BRIK*
PARC_sub_2829.LSSbetas.BLOCK6.study.uber.nii* pb02.PARC_sub_2759.r02.volreg+orig.HEAD*
PARC_sub_2829.labelVolume.nii.gz* pb02.PARC_sub_2761.r02.volreg+orig.BRIK*
PARC_sub_2829.mean_func.r02.nii.gz* pb02.PARC_sub_2761.r02.volreg+orig.HEAD*
PARC_sub_2829.parafusi.nii* pb02.PARC_sub_2778.r02.volreg+orig.BRIK*
PARC_sub_2829_FSPGR_1.nii.gz* pb02.PARC_sub_2778.r02.volreg+orig.HEAD*
PARC_sub_2829_fs_brain.subj.nii.gz* pb02.PARC_sub_2784.r02.volreg+orig.BRIK*
PARC_sub_2829_study_timingdata.csv* pb02.PARC_sub_2784.r02.volreg+orig.HEAD*
PARC_sub_2829_test_timingdata.csv* pb02.PARC_sub_2786.r02.volreg+orig.BRIK*
PARC_sub_2834.LSSbetas.BLOCK6.study.uber.nii* pb02.PARC_sub_2786.r02.volreg+orig.HEAD*
PARC_sub_2834.LSSbetas.GAM.test.uber.nii* pb02.PARC_sub_2787.r02.volreg+orig.BRIK*
PARC_sub_2834.labelVolume.nii.gz* pb02.PARC_sub_2787.r02.volreg+orig.HEAD*
PARC_sub_2834.mean_func.r02.nii.gz* pb02.PARC_sub_2788.r02.volreg+orig.BRIK*
PARC_sub_2834.parafusi.nii* pb02.PARC_sub_2788.r02.volreg+orig.HEAD*
PARC_sub_2834_FSPGR_1.nii.gz* pb02.PARC_sub_2792.r02.volreg+orig.BRIK*
PARC_sub_2834_fs_brain.subj.nii.gz* pb02.PARC_sub_2792.r02.volreg+orig.HEAD*
PARC_sub_2834_study_timingdata.csv* pb02.PARC_sub_2796.r02.volreg+orig.BRIK*
PARC_sub_2834_test_timingdata.csv* pb02.PARC_sub_2796.r02.volreg+orig.HEAD*
PARC_sub_2838.LSSbetas.BLOCK6.study.uber.nii* pb02.PARC_sub_2799.r02.volreg+orig.BRIK*
PARC_sub_2838.LSSbetas.GAM.test.uber.nii* pb02.PARC_sub_2799.r02.volreg+orig.HEAD*
PARC_sub_2838.labelVolume.nii.gz* pb02.PARC_sub_2825.r02.volreg+orig.BRIK*
PARC_sub_2838.mean_func.r02.nii.gz* pb02.PARC_sub_2825.r02.volreg+orig.HEAD*
PARC_sub_2838.parafusi.nii* pb02.PARC_sub_2829.r02.volreg+orig.BRIK*
PARC_sub_2838_FSPGR_1.nii.gz* pb02.PARC_sub_2829.r02.volreg+orig.HEAD*
PARC_sub_2838_fs_brain.subj.nii.gz* pb02.PARC_sub_2834.r02.volreg+orig.BRIK*
PARC_sub_2838_study_timingdata.csv* pb02.PARC_sub_2834.r02.volreg+orig.HEAD*
PARC_sub_2838_test_timingdata.csv* pb02.PARC_sub_2838.r02.volreg+orig.BRIK*
PARC_sub_2841.LSSbetas.BLOCK6.study.uber.nii* pb02.PARC_sub_2838.r02.volreg+orig.HEAD*
PARC_sub_2841.LSSbetas.GAM.test.uber.nii* pb02.PARC_sub_2841.r02.volreg+orig.BRIK*
PARC_sub_2841.labelVolume.nii.gz* pb02.PARC_sub_2841.r02.volreg+orig.HEAD*
PARC_sub_2841.mean_func.r02.nii.gz* pb02.PARC_sub_2848.r02.volreg+orig.BRIK*
PARC_sub_2841.parafusi.nii* pb02.PARC_sub_2848.r02.volreg+orig.HEAD*
PARC_sub_2841_FSPGR_1.nii.gz* pb02.PARC_sub_2853.r02.volreg+orig.BRIK*
PARC_sub_2841_fs_brain.subj.nii.gz* pb02.PARC_sub_2853.r02.volreg+orig.HEAD*
PARC_sub_2841_study_timingdata.csv* pb02.PARC_sub_2865.r02.volreg+orig.BRIK*
PARC_sub_2841_test_timingdata.csv* pb02.PARC_sub_2865.r02.volreg+orig.HEAD*
PARC_sub_2848.LSSbetas.BLOCK6.study.uber.nii* pb02.PARC_sub_2874.r02.volreg+orig.BRIK*
PARC_sub_2848.LSSbetas.GAM.test.uber.nii* pb02.PARC_sub_2874.r02.volreg+orig.HEAD*
PARC_sub_2848.labelVolume.nii.gz* pb02.PARC_sub_2879.r02.volreg+orig.BRIK*
PARC_sub_2848.mean_func.r02.nii.gz* pb02.PARC_sub_2879.r02.volreg+orig.HEAD*
PARC_sub_2848.parafusi.nii* pb02.PARC_sub_2885.r02.volreg+orig.BRIK*
PARC_sub_2848_FSPGR_1.nii.gz* pb02.PARC_sub_2885.r02.volreg+orig.HEAD*
PARC_sub_2848_fs_brain.subj.nii.gz* pb02.PARC_sub_2903.r02.volreg+orig.BRIK*
PARC_sub_2848_study_timingdata.csv* pb02.PARC_sub_2903.r02.volreg+orig.HEAD*
PARC_sub_2848_test_timingdata.csv* pb02.PARC_sub_2917.r02.volreg+orig.BRIK*
PARC_sub_2853.LSSbetas.BLOCK6.study.uber.nii* pb02.PARC_sub_2917.r02.volreg+orig.HEAD*
PARC_sub_2853.LSSbetas.GAM.test.uber.nii* pb02.PARC_sub_2927.r02.volreg+orig.BRIK*
PARC_sub_2853.labelVolume.nii.gz* pb02.PARC_sub_2927.r02.volreg+orig.HEAD*
PARC_sub_2853.mean_func.r02.nii.gz* pb02.PARC_sub_2938.r02.volreg+orig.BRIK*
PARC_sub_2853.parafusi.nii* pb02.PARC_sub_2938.r02.volreg+orig.HEAD*
PARC_sub_2853_FSPGR_1.nii.gz* pb02.PARC_sub_2939.r02.volreg+orig.BRIK*
PARC_sub_2853_fs_brain.subj.nii.gz* pb02.PARC_sub_2939.r02.volreg+orig.HEAD*
PARC_sub_2853_study_timingdata.csv* pb02.PARC_sub_2945.r02.volreg+orig.BRIK*
PARC_sub_2853_test_timingdata.csv* pb02.PARC_sub_2945.r02.volreg+orig.HEAD*
PARC_sub_2865.LSSbetas.BLOCK6.study.uber.nii* pb02.PARC_sub_2955.r02.volreg+orig.BRIK*
PARC_sub_2865.LSSbetas.GAM.test.uber.nii* pb02.PARC_sub_2955.r02.volreg+orig.HEAD*
PARC_sub_2865.labelVolume.nii.gz* pb02.PARC_sub_2956.r02.volreg+orig.BRIK*
PARC_sub_2865.mean_func.r02.nii.gz* pb02.PARC_sub_2956.r02.volreg+orig.HEAD*
PARC_sub_2865.parafusi.nii* pb02.PARC_sub_2958.r02.volreg+orig.BRIK*
PARC_sub_2865_FSPGR_1.nii.gz* pb02.PARC_sub_2958.r02.volreg+orig.HEAD*
PARC_sub_2865_fs_brain.subj.nii.gz* pb02.PARC_sub_2967.r02.volreg+orig.BRIK*
PARC_sub_2865_study_timingdata.csv* pb02.PARC_sub_2967.r02.volreg+orig.HEAD*
PARC_sub_2865_test_timingdata.csv* pb02.PARC_sub_2987.r02.volreg+orig.BRIK*
PARC_sub_2874.LSSbetas.BLOCK6.study.uber.nii* pb02.PARC_sub_2987.r02.volreg+orig.HEAD*
PARC_sub_2874.LSSbetas.GAM.test.uber.nii* pb02.PARC_sub_2993.r02.volreg+orig.BRIK*
PARC_sub_2874.labelVolume.nii.gz* pb02.PARC_sub_2993.r02.volreg+orig.HEAD*
PARC_sub_2874.mean_func.r02.nii.gz* pb02.PARC_sub_3010.r02.volreg+orig.BRIK*
PARC_sub_2874.parafusi.nii* pb02.PARC_sub_3010.r02.volreg+orig.HEAD*
PARC_sub_2874_FSPGR_1.nii.gz*
In [29]:
study_beta_prefix = 'LSSbetas.BLOCK6.study.uber'
test_beta_prefix = 'LSSbetas.GAM.test.uber'
mask_prefix = 'parafusi'
mask_labels = [1007, 2007, 1016, 2016]
subj = 'PARC_sub_2848'
predDf = pd.DataFrame()
# load behavioral data
study_csv_name = subj + '_study_timingdata.csv'
test_csv_name = subj + '_test_timingdata.csv'
study_data = pd.read_csv(study_csv_name, sep=',')
test_data = pd.read_csv(test_csv_name, sep=',')
# make variables to load neural data
study_labels = list(study_data.imgType)
test_labels = list(test_data.imgType)
trials = np.array(range(1,97))
runs = np.repeat(range(1,7),16, axis= 0)
# load neural data
print 'loading neural data...'
study_beta_name = subj + '.' + study_beta_prefix + '.nii'
# mask_name = subj + '.' + mask_prefix + '.nii'
mask_name = 'PARC_sub_2848_wholeMask.nii.gz'
test_beta_name = subj + '.' + test_beta_prefix + '.nii'
ds_study = fmri_dataset(samples = study_beta_name, mask = mask_name, chunks= runs, targets=study_labels)
ds_test = fmri_dataset(samples = test_beta_name, mask = mask_name, chunks= runs, targets=test_labels)
zscore(ds_study)
zscore(ds_test)
loading neural data...
In [30]:
### CV TEST
clf = LinearCSVMC(C=-1)
cv = CrossValidation(clf, NFoldPartitioner())
In [33]:
sl = sphere_searchlight(cv, radius=12, postproc=mean_sample())
In [ ]:
res = sl(ds_study)
In [15]:
sphere_errors = res.samples[0]
res_mean = np.mean(res)
res_std = np.std(res)
chance_level = 1.0 - (1.0 / len(ds_study.uniquetargets))
frac_lower = np.round(np.mean(sphere_errors < chance_level - 2 * res_std), 3)
In [16]:
frac_lower
Out[16]:
0.81499999999999995
In [24]:
hist(sphere_errors, bins=np.linspace(0, 1, 18))
Out[24]:
[<matplotlib.axes._subplots.AxesSubplot at 0x10d684ad0>]
In [27]:
map2nifti(ds_study, 1.0 - sphere_errors).to_filename('PARC_sub_2848_wholeBrain_Searchlight.nii.gz')
In [26]:
In [28]:
Out[28]:
u'/Users/Jim/PARC_data_special/mvpa_files'
In [ ]:
Content source: sorensje/dissertation
Similar notebooks: