UW Center for Human Neuroscience

CHN-STF Collective Manual

Getting help

You can book Zoom time with Ione Fine here.

To book time with Oliver Wu email dw67

Getting onto the STF computer

  1. Use “Remote Desktop Connection” to login to the computer
    IP 10.159.241.74

Login name is: STF-Collective

Password is: imaging!

You may want to select Show Options at the bottom right.

Then select the upper tab Display and change Colors to High Color (16 bit) if you are struggling with speed a little.

Orienting yourself on the STF computer

  • Ignore the CHF-STF Admin folder
  • The CHN-STF folder contains 3 subfolders

Members

This folder should contain your own personal folder. Inside it you should have two copies of gather_data.R. One is called gather_data.R and the other is called gather_data_example.R. The idea is that you don’t change gather_data_example.R.

That means you have one working copy that you don’t change, and one you can mess around with. 

Code examples

This is where you collect examples of R code. NEVER ALTER CODE IN THIS FOLDER. You shouldn’t need to go into this folder unless you’ve made a mistake in your old folder and need to replace your code example. If you need to do that COPY the code from this folder into your own folder.

Data

Inside this directory are two subfolders: MRI and surveys

MRI/derivatives/freesurfer 

This folder contains the data from each participant. Inside the folder recon-all you will find excel spreadsheets describing the volume, area, and cortical thickness of various areas. (Remember aparc refers to parcellation of the cortical sheet, aseg refers to segmentation of subcortical areas). A list of what’s in these excel spreadsheets is coming soon.

Surveys 

Contains all the current survey questions. Each csf file of data has an associated pdf which contains the codebook (basically an explanation of each variable in the excel spreadsheet). Questions include the following. Every MR participant should have a survey and the subject_id (e.g. STFC022) is the way of linking the two. Some people filled out the survey, but didn’t do the MR scan.

The questions cover a really broad range of topics.

  • Demographics (Age, SES)
  • Videogame Use
  • Attitudes to Learning
  • Fatigue
  • Religion/Spirituality
  • Meditation
  • Physical Activity
  • Memory
  • Sleep
  • Audio Device Use
  • Family (Siblings)
  • Concussion/TBI
  • Emotional Expression and Regulation
  • Social Anxiety
  • Hormones
  • Reality TV
  • Depression
  • Autism Spectrum Disorder (ASD)
  • ADHD
  • ASL
  • Bilingualism
  • Collectivism/Individualism
  • Rumination
  • Self-Reflection and Insight
  • Decision Making
  • Positive Psychology
  • Resistance to Change
  • Self-Identity
  • Watts Connectedness Scale
  • Neuroticism
  • Openness
  • Self-Assessment
  • Warwick-Edinburgh Mental Well-being Scale (WEMWBS)
  • Depression Anxiety and Stress Scale (DASS)
  • Nature Connectedness
  • Living Condition/Community

Working Locally

Downloading the data to work locally

  1. IMPORTANT. If you’ve done work in your local member folder then it will be overwritten! Save it somewhere safe and pop it back into the correct location once you’ve downloaded the remote folder
  2. You should be able to copy the zipped local_download.zip folder from the Remote Desktop onto your own computer.

Unzip it. Pull the CHN-STF folder out of the local_download folder and put it somewhere on your computer. Find the path (right click for properties). So, for example the path should look something like this:

C:\Users\Ione Fine\Documents\code\CHN-STF

  1. Inside CHN-STF/members either 
  1. create a folder with your name in it (make it exactly the same as the remote directory) 
  2. copy over your folder from the remote STF-CHN machine 
  3. move your local folder that you saved in step 1 into CHN-STF/members. 

Creating a New Excel Spreadsheet

Now you are oriented, you are ready to roll!

Double click gather_data.R. It should open R.

You will need to change the following lines:

Lines 7-10: The first path is correct for the CHN-STF computer. Replace this with your computer path if you are running locally

Line 14: memberDir: Replace with the name of your folder. 

Line 15: outFileName: Select an output filename for the csv file that will be created

Line 17: subjectName: STFC will create a spreadsheet for all participants with both survey and MR data. Or you can focus on one participant using STFC014

Line 21: surveyFileName: Make sure you are pulling in the correct survey (double check the last four digits!)

Line 23: surveyFields: Choose which survey fields you are interested in (pick some fun ones from the pdf codebook)

Line 26: MRFileName: Choose which MR excel sheet you want to pull data from

Line 27: MRFields: Choose which MR variables you are interested in

Run the program

Click source in the upper right. 

If it runs correctly it will generate you an excel output file! 

How to fix common errors

>cannot open file ‘C:/Users/STF-Collective/Documents/CHN-STF/data/surveys/greenspace_personality/STFCHNSurvey_DATA_2024-04-02_1217.csv’: No such file or directory

 This means you have the wrong survey name. Usually this means (1) the survey has been updated and the four-digit identifier at the end has changed, (2) you have your slashes the wrong way around (they should be this way ‘/’ or you have the wrong number of slashes.