Associations between aversive learning processes and transdiagnostic psychiatric symptoms revealed by large-scale phenotyping
https://www.nature.com/articles/s41467-020-17977-w
Toby Wise & Raymond J. Dolan
Nature Communications, 2020
Analyses for this project are contained within Jupyter notebooks (in the /notebooks
directory). Python 2.7 was used for all these analysese, and the code will most likely not run smoothly with Python 3.
All the main analyis is run in Jupyter notebooks, and these notebooks make use of scripts located in the /code
directory along with standard Python packages (e.g. numpy, pandas, matplotlib etc).
In addition, they require a package called DMPy (this package is half-written and doesn't have much functionality beyond that required for this project).
The majority of the analysis reported in the paper is run in a series of Jupyter notebooks, which are located in the /notebooks
directory. The only exception is the fitting of behavioural models, which was run on a HPC cluster for speed (code for this model fitting is provided in the /code
directory).
There are 4 notebooks, each of which runs a specific section of the analysis pipeline and produces all the figures etc. associated with it.
preprocessing.ipynb
This data takes the raw data from the task and extracts the behavioural variables of interest. This notebook is parameterised through Papermill and is run for each subject individually. The script to run this is in the code
directory, and the output notebooks for every subject are provided in the /notebooks/preprocessing
directory.
questionnaire_analysis.ipynb
This notebook processes our questionnaire measures, and calculates scores on three transdiagnostic factors.
behavioural_analysis.ipynb
This notebooks performs analyses looking at how attention affects learning.
psychopathology_analysis.ipynb
This notebook runs regression analyses examining relationships between questionnaire measures and behavioural variables.
The game used to examine aversive learning processes online
Code for the task is provided in /firebase/public/
. The task is coded in JavaScript, mainly using the Phaser 3 game development framework.
A demo of the task can be found here.
All data is available on the Open Science Framework here.