We use the familiar combination of a python, bash, and matlab script for running subjects through PPI analysis.
Script Locations The user can copy the bash and python scripts to his or her head node, and the matlab template script to somewhere accessible on the running cluster.
The user must simply fill in all user variables in the python script, including the experiment name, subject IDs, task name, roi name, and output folder name. Depending on the task design, the script may or may not require an order number. Below is a general overview of the PPI Pipeline that can be applied to multiple tasks.
PPI Python This script takes all of the input variables from the user. This script will submit one iteration of the bash script template for each subject. Since we run the scripts on the cluster, this means that we can process up to 200 subjects at the same time.
PPI SHELL TEMPLATE is the bash template script for which one is run for each subject. It does the following:
condition#1 1 weight; condition#2 1 weight
. For example, if we wanted to model “One > Two” and One was the 3rd condition in the SPM.mat, and Two was the first, we could use the matrix [1 1 -1; 3 1 1]
. The original pipelines that I created fed in the matrix from the python script, but since this makes running complicated and increases the chance of user error, these matrices are now hard coded into the matlab scripts. For tasks that have one order OR the matrix is the same for all subjects regardless of order, the python script does not require an order number. For tasks with specific orders, it does. Look at the matlab templates for a full overview of the matrices used.PPI ALLFACES 3 Regressors matlab template does the PPI analysis followed by a single subject analysis including the three regressors produced by the PPI analysis. The PPI ALLFACES Python and PPI ALLFACES Bash should be used to run it. If you are ONLY interested in Faces > Shapes you should use this script! If you are interested in another contrast, use PPI FACES 11 regressor (below). This 3 regressor model script does the following:
NOTE that this script works well for input matrices that include all blocks of the task. If you want to model individual contrasts and use include multiple regressors (one for each condition) then you should look at:
PPI FACES 11 Regressors Matlab template run with PPI FACES Python and PPI FACES Bash, and works similarly, except it takes in an order number variable, creates the VOI, and then a PPI analysis is done for each condition of the task, and 30 contrasts are created for various combinations. Please see the matlab template script for these contrasts and the matrices. Although this script creates a Faces contrast, the 3 regressor model (outlined above) should be used if you are only interested in Faces > Shapes PPI. You should use this script to run PPI analysis for any contrast other than Faces > Shapes.
PPI CARDS 7 Regressors Matlab template run with [PPI CARDS Python and PPI CARDS Bash, and works similarly by creating a VOI, and then a PPI analysis is done for each condition of the task (control, positive, and negative feedback), and 14 contrasts are created for various combinations. Please see the matlab template script for these contrasts and the matrices.