This model was developed using Nilearn (https://nilearn.github.io) and Sklearn (https://scikit-learn.org/)
- Install conda: https://www.anaconda.com/
- Download Cognitive_Function_Prediction code and unzip if necessary.
- Download the models folder here: https://office365stanford-my.sharepoint.com/:f:/g/personal/kenweber_stanford_edu/Ekhu_md4SBFEhov3ssODvyQB44wmznIyGcN1Gk6l8U4Skg?e=AB0u8s
- File is >100 MB and too big for GitHub
- Untar models.tar.gz and move the models folder into ./Cognitive_Function_Prediction/
- In the command line, navigate to the Cognitive_Function_Prediction folder
- Create a conda environment:
- conda env create -f environment.yml
- Activate the conda environment:
- conda activate Cognitive_Function_Prediction
- Run predict_cognitive_function.py specifying the path to the files for the respective features
- For the gray matter features, the Freesurfer gray matter features (aseg.stats, lh.aparc.stats, and rh.aparc.stats) need to be in single csv file. Use convert_freesurfer_stats_to_csv.py to convert these files to the correct format.
- For the white matter features, the fractional anisotropy 3D image should be in FMRIB58 1 mm3 space.
- For the resting state functional connectivity features, the preprocessed resting state timeseries 4D images should be in MNI152 2 mm3 space.
- For the resting state frequency domain and graph measures features, the 3D images should be in MNI152 2 mm3 space.
- These images were created using functions available in AFNI (https://afni.nimh.nih.gov/)
- For the task-evoked features (Working Memory, Category-Specific Representations, Gambling, Language Processing, Social Cognition, Relational Processing, and Emotion Processing), the images (3D) should be in MNI152 2 mm3 space.
FMRIB58 1 mm3 space and MNI152 2 mm3 space template images availabled in FSL (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/)
If you use this model in your work, please cite:
- K. A. Weber II, T.D. Wager, A. Rosen, Y. K. Ashar, C. S. W. Law, G. Gilam, P. A. Upadhyayula, S. Zhu, S. Banerjee, G. H. Glover, T. J. Hastie, and S. Mackey. Predicting Cognitive Function with Multimodal Brain MRI. (In Review).