PAM

From Pheno Wiki
Revision as of 11:39, 13 July 2011 by Katie (Talk | contribs) (Creating Onset Files (EVs))

Jump to: navigation, search

Background

This task was run as a part of the Consortium for Neuropsychiatric Phenomics (CNP) project. It was designed in collaboration with Russ Poldrack, Theo van Erp, and Becca Schwarzlose. It is an associative memory task in which subjects view pairs of objects and must remember not only whether they have seen them before but how they were originally paired.

Task Design

PAM Encoding (PAMenc)

For all encoding trials, one figure is in black and white, and one is in color (orange). The subject must indicate by button press which side the colored object is on (this is the same as the RK encoding paradigm, but different from the NAPLS PAM encoding). Subjects are instructed to remember the objects and the relationship between the objects. The ITI is jittered.

The encoding task consists of 64 trials:

  • 24 control trials- pairs of scrambled stimuli
  • 40 memory trials- pairs of line drawings of objects
  • Control trials last 2 seconds
  • Encoding trials last 4 seconds (1 with just words, and then 3 for words + pictures
  • All time that is not accounted for in between trials is “null”

PAMenc is 242 TRs long, with a TR of 2000ms.

PAM Retrieval (PAMret)

The retrieval task requires the subjects to rate their confidence in their memory of the pairing. There are 4 possible response options ranging from "Sure correct" to "Sure incorrect". These can be analyzed later as a spectrum, or binarized into yes/no type responses.

The retrieval task consists of 104 trials

  • 24 control trials- on one side of the screen is one of the 4 retrieval confidence response options "Sure correct", "maybe correct", "maybe incorrect", or "sure incorrect". On the other side of the screen is "xxxx". Subjects are asked to press the button (1-4) that corresponds to the response option displayed
  • 40 correct trials- items are shown paired as they were at encoding
  • 40 incorrect trials- items are shown paired differently than they were at encoding (some objects are the same, j ust paired incorrectly)

PAMret is 268 TRs long, with a TR of 2000ms.

Design Documentation

These files were created by Theo, to show the trial-by-trial information including onsets and delays. The layout is meant to be compatible with E-Prime. They open in Excel.
Media:PAMenc_trialinfo.xlsx
Media:PAMret_trialinfo.xlsx

These files were created by Theo to show the stimuli pairing and presentation order. They open in excel.
Media:PAMenc_stims.xlsx‎
Media:PAMret_stims.xlsx

These files were created by Eric Miller, the CNP RA and are designed so that the trial information is easier to interpret in relation to the matlab output.
Media:Pamenc_actualtrialinfo.xlsx‎
Media:Pamrec_actualtrialinfo.xlsx‎

Analysis

The PAM is divided into two sections, PAMENC and PAMRET for the encoding and retrieval phases. In the subjects directory, these are separate, but in the scripts directory they are not. The tasks are linked together for scoring by two files, rectrialcodes_during enc and enctrialcodes_duringrec to keep track of how the trials in each section correspond to each other.

IMPORTANT: Partway into the study, the PAM underwent a substantial change. We are only concerned with data after this change. The first subject on the new version is 10506. All files that related to the new version are labeled with _fixed.

Scoring Behavioral Data

/space/raid2/data/poldrack/CNP/scripts/behav_analyze/PAM

All scripts pull up the file ‘sublist_pamenc’ and “sublist_pamrec”to determine which subjects to run. Before you run a new batch, edit that file using emacs (emacs sublist_pamenc). IDs are in the format of CNP_12345A. It is just a transient file, so you can delete what is in there. If you’d like to save the old version, just save it as sublist with the date appended. The script will only recognize the plain ‘sublist; files.

PAMENC

  • in matlab, run score_pamenc_behavior.m
  • this should create something called summaryscore_PAMENC_fixed.txt in everybodies behav/PAMENC folders; You can check who has these files (and therefore who needs to be run) by typing

ls /space/raid2/data/poldrack/CNP/CONTROLS/*A/behav/PAMENC/*fixed*

to summarize the data, edit make_big_pamenc_fixed_score_log.sh with the appropriate group and date. Then run, it will create a summaryscore_output and summaryscore_subjlist file.

PAMRET

  • in matlab run score_pamrec_behavior.m
  • this should create something called summaryscore_PAMRET_fixed.txt in everybodies behav/PAMENC folders; You can check who has these files (and therefore who needs to be run) by typing

ls /space/raid2/data/poldrack/CNP/CONTROLS/*A/behav/PAMRET/*fixed*

to summarize the data, edit make_big_pamret_fixed_score_log.sh with the appropriate group and date. Then run, it will create a summaryscore_output and summaryscore_subjlist file.

You can now copy these into excel, although you might need to use the ‘text to columns’ tool to get each number to go into its own cell.

Creating Onset Files (EVs)

/space/raid2/data/poldrack/CNP/scripts/behav_analyze/PAM

These scripts also uses the sublist files- so, you can easily run the behavioral scoring and these scripts on the same list of new people. Update sublist_pamenc and sublist_pamrec as described above.

PAMENC
in matlab, run make_pamenc_model1_onsets_function.m

running this will create a series of files in each persons own behav/PAMENC. After both scripts have been run, the folder should look like this:

PAMenc_fixed_10638.mat
pamenc_onsets_model1_hiconf_miss.txt
pamenc_onsets_model1_loconf_miss.txt
pamenc_onsets_model1_control.txt
pamenc_onsets_model1_junk.txt
summaryscore_PAMENC_fixed.txt
pamenc_onsets_model1_hiconf_hit.txt
pamenc_onsets_model1_loconf_hit.txt

The onset files will have contents that look something like this:
22.0397 4 1
92.5125 4 1
135.0052 4 1
155.5230 4 1
220.5196 4 1
226.0131 4 1
226.0132 4 1
240.0118 4 1
261.5227 4 1
292.0186 4 1
324.0038 4 1
347.0201 4 1
347.0205 4 1
347.0205 4 1
376.5071 4 1
412.0166 4 1
412.0167 4 1
443.5219 4 1
443.5219 4 1
448.0226 4 1
448.0227 4 1
448.0227 4 1
473.5214 4 1
473.5215 4 1

Encoding onsets are:
control -- scrambled trials hiconf_hit -- responded to correctly at retrieval with high confidence hiconf_miss -- responded to incorrectly at retrieval with high confidence junk -- missed trials, motion, etc loconf_hit -- responded to correctly at retrieval with low confidence loconf_miss -- responded to incorrectly at retrieval with low confidence


PAMRET
in matlab, run make_pamrec_model1_onsets_function.m

running this will create a series of files in each persons own behav/PAMRET. After both scripts have been run, the folder should look like this:

pamrec_onsets_model1_hiconfno_corr.txt pamrec_onsets_model1_hiconfyes_incorr.txt pamrec_onsets_model1_lowconfyes_incorr.txt
pamrec_onsets_model1_hiconfno_incorr.txt pamrec_onsets_model1_lowconfno_corr.txt PAMret_fixed_10775.mat
pamrec_onsets_model1_hiconfyes_corr.txt pamrec_onsets_model1_lowconfyes_corr.txt summaryscore_PAMRET_fixed.txt

The onset files will look similar to those from encoding.

Retrieval onsets are:
hiconfno_corr -- items which got a "sure incorrect" response that were indeed incorrectly paired
hiconfno_incorr -- items which got a "sure incorrect" response that were actually correctly paired
hiconfyes_corr -- items which got a "sure correct" response that were indeed correctly paired
hiconfyes_incorr -- items which got a "sure correct" response that were actually incorrectly paired
lowconfno_corr -- items which got a "maybe incorrect response that were indeed incorrectly paired
lowconfno_incorr -- items which got a "maybe incorrect" response that were actually correctly paired
lowconfyes_corr -- items which got a "maybe correct" response that were indeed correctly paired
lowconfyes_incorr -- items which got a "maybe correct" response that were actually incorrectly paired

Running First Levels

/space/raid2/data/poldrack/CNP/scripts/run_level1_scripts

The primary scripts for running first levels are:
/space/raid2/data/poldrack/CNP/scripts/run_level1_scripts/PAMENC/PAMENC_firstlevel_model1.sh
/space/raid2/data/poldrack/CNP/scripts/run_level1_scripts/PAMRET/PAMRET_firstlevel_model1.sh

These do the first phase of PAMENC and PAMRET fMRI processing. They check for the relevant files, create an individualized .fsf file for each subject, run pre- and post stats.

Each script takes 4 arguments:
1 group vs subject analysis,
2. population (CONTROL, SCHZ, etc)
3. which subject to run
4. whether to run FSL or just create the fsf file (run or norun)

There are a few ways you can run it:
a. to run on one person (here, CNP_10159A) and run FSL, go to the appropriate directory,
./PAMENC_firstlevel_model1.sh subject CONTROLS 10159 run

b. to run on an entire group (all controls, all patients, etc)
./PAMRET_firstlevel_model1.sh group CONTROLS all run

c. to run a specific group of people, you can use a second script that calls this one, run_multiple_scap.sh. for this script, you have to edit it first using emacs, and basically fill in the people you want to run in the for-loop at the top, for instance
for id in 10523 10501 10159; do

you also need to edit the other relevant options, such as population and whether to run all the way through. It’ll automatically run in single-subject mode, and just loop through these people.

This can also be submitted to the grid, after it is edited, by typing
sge qsub run_multiple_pamenc.sh

Checking Data

Data for this paradigm are logged on the HTAC data base. To get access contact Stone Shih or Fred Sabb.

Publications


Link back to LA5C page.