Skip to content

kattasa/srndna

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decision Neuroscience and Aging

This repository contains code related to our SRNDNA grant [Subaward of NIH R24-AG054355 (PI Samanez-Larkin)]. All hypotheses and analysis plans were pre-registered on AsPredicted on 7/26/2018 and data collection commenced on 7/31/2018. We will share all of the resulting imaging data via OpenNeuro at the conclusion of our study (projected for summer 2019). More details about code can be found on the wiki associated with this repository.

Notes on repository organization and files

Some of the contents of this repository are not tracked (.gitignore) because the files are large. These files/folders specifically include our dicom images, converted images in bids format, fsl output, and derivatives from bids (e.g., mriqc and fmriprep). All scripts will reference these directories, which are only visible on our the primary linux workstation in Smith Lab.

The psychopy folder contains all of the code for stimulus delivery. Input files for psychopy were generated with Matlab (e.g., gen*.m files). We covert the output from psychopy to BIDS events format using Matlab (e.g., convert*BIDS.m).

Basic steps for experimenters

Here are the basic steps for transferring and processing data. Note that when you see $sub, it should be replaced with your subject number (e.g., 102). Remember, always check your input and output for each step. If the input/output isn't clear, look through the scripts and talk to someone. In many scripts and wrappers, the $nruns argument is necessary because some subjects will not have the full set of five runs for the trust task. If you are processing more than 1 subject at a time, consider using the runall_* script.

  1. Transfer data from XNAT to dicoms folder (e.g., /data/projects/srndna/dicoms/SMITH-AgingDM-102). Be sure to save a backup on the S: drive.
  2. Convert data to BIDS, preprocess, and run QA using the wrapper bash run_prestats.sh $sub $nruns. This wrapper will do the following:
    • Run heudiconv to convert dicoms to BIDS using bash run_heudiconv.sh $sub $nruns.
    • Run PyDeface to remove the face from the anats. This is done using bash run_pydeface.sh $sub.
    • Run mriqc and fmriprep using bash run_mriqc.sh $sub and bash run_fmriprep.sh $sub, respectively.
  3. Open Matlab and Run pay_subject(subnum), making sure to replace with the appropriate subject number in the (). This will run all three convert*BIDS.m scripts to place events files in bids folder. Note, this is a Matlab script. If you run into issues opening Matlab in your terminal, see the steps outlined on the Wiki https://smithlabinternal.cla.temple.edu/computing/labcomputers
  4. Convert *_events.tsv files to 3-column files (compatible with FSL) using Tom Nichols' BIDSto3col.sh script. This script is wrapped into our pipeline using bash gen_3col_files.sh $sub $nruns
  5. Run analyses in FSL. Analyses in FSL consist of two stages, which we call "Level 1" (L1) and "Level 2" (L2). For L1, we have a wrapper that runs all tasks simultaneously bash run_L1stats.sh $sub $nruns $ppi $sm. Enter '5' for number of trust runs (unless otherwise), enter '0' for ppi to indicate run activation analyses and enter '4' for sm (smoothing) which refers to a 4 mm smoothing kernel. This wrapper will do the following:
    • Run L1_task-trust_model-01.sh on all runs.
    • Run L1_task-sharedreward_model-01.sh on all runs.
    • Run L1_task-ultimatum_model-01.sh on all runs.
  6. Display the runall_L2stats.sh script and edit the two for subrun in lines to include the appropriate subject numbers and trust runs they had

About

Code related to our SRNDNA grant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 45.5%
  • Python 38.3%
  • Shell 9.2%
  • MATLAB 6.7%
  • R 0.3%