# The Stockholm SleepyBrain Project #

## Background and Aim ## 

Sleepiness is a brain state with pervasive effects on cognitive and
affective functioning. However, little is known about the functional
mechanisms and correlates of sleepiness in the awake brain. This project
aimed to investigate overall effects of sleepiness on brain function 
with particular regard to emotional processing.

## Method and Design ##  

We investigated the effects of sleep deprivation using a randomized
cross-over design. Resting state functional connectivity was 
investigated using functional magnetic resonance imaging (fMRI). 
Emotional contagion was studied using concurrent fMRI and 
electromyography (EMG) of facial muscles in response to emotional 
expressions and empathy for pain was investigated using pictures 
of others receiving pain stimuli. To study emotional reappraisal, 
participants were instructed to actively up-regulate or 
down-regulate their emotional responses to picture stimuli. 
The participants were characterized using several rating scales, 
biometric information, and blood sampling.

## Specific Notes ##

### participants.tsv File ###
Subject ID list and subject-level variables. Please refer to the
participants.json for guidance on how to interpret specific 
columns in the participants.tsv file.

### BIDS dataset ###
Data were converted from DICOM source files using dcm2niix. The
parameters were further extracted from the DICOM files using pydicom
and converted to .json format. SeriesDates were anonymized and
shifted to pre-1900's years and a subject-based offset added to
the month/year that preserves time difference between initial
and follow-up visit.

T1w and FLAIR anatomical scans were defaced using the pydeface.py software: 
  https://github.com/poldracklab/pydeface (c1ceeb2)

### derivatives Folder ###
This folder contains the processed output from the MRIQC protocol.
MRIQC is an automated processing pipeline designed to compute many
image quality metrics for T1 weighted anatomical and T2* weighted
functional scans. For more information please see:

  https://github.com/poldracklab/mriqc (a5f68f5)

Please note that the FLAIR images were incorrectly named with a T2w 
suffix at the time of the MRIQC run and thus are improperly named in
the MRIQC results.

This folder also contains the output from the fMRIPrep protocol.
fMRIPrep is a functional magnetic resonance imaging (fMRI) data 
preprocessing pipeline that is designed to provide an easily accessible,
state-of-the-art interface that is robust to variations in scan acquisition
protocols and that requires minimal user input, while providing easily
interpretable and comprehensive error and output reporting. For more information
please see: 

  https://github.com/nipreps/fmriprep

Additional derivatives include:

  - Plots of the fMRI event logs
  - thumbnail mosaics of the high-resolution T1w and FLAIR scans used
    to confirm defacing process.
  - Preprocessed EMG data
  - Voxel displacement map generated by the FieldMap toolbox in SPM12
  - Voxel-based morphometry data contributed by Dr. Zhiliang Long, 
    please refer to https://dx.doi.org/10.1371%2Fjournal.pone.0228473
  - Time-series data contributed by Dr. Govinda Poudel, please refer to
    the directory-level README and https://doi.org/10.1101/2020.06.04.133603

### sourcedata Folder ###
This folder contains the as-provided source files used to create the
BIDS dataset files. The only changes made to these source files were
to remove any information that could potentially be used to identify
the study participants. Specifically:

  - EyeTrackingLogFiles: Files renamed, "TimeValues" and "TimeStamp" 
    entries changed to "REMOVED" within each file.
  - PresentationLogFiles: Files renamed, scrubbed of Dates, Subject
    IDs. These files were used to create the
       sub-9XXX_ses-{1,2}_task-<taskname>_events.tsv
    files.
  - PulseGatingFiles: Files renamed to remove original IDs.
  - WorkingMemoryTestResults: Files renamed to remove original IDs.,
    subject IDs altered to 9XXX series randomized IDs. Dates removed.
    Times-of-day left intact.
  - AdditionalSubjectLevelRatings: Item-level data for self-rated 
    measures; genetic data; results of subjective quality inspection
    of T1 images.
  - adult_head_MRC303_Gustav_Nilsonne_20131025095652486_4.pdf: 
    Scanning parameters
  - participants_extra.tsv: metadata pertaining to excluded participants
  - Fieldmap_RealImaginary
Other data that could not be included in raw form due to its binary nature:

  - Physiological recordings (EMG): Converted from raw Acknowledge format
    to compressed .tsv files using the "convert_physio_files.py" script
    located in the code/ directory within the dataset. The output data are 
    located within the dataset as *recording-EMG_physio.tsv.gz and 
    *recording-EMG_physio.json pairs.

### Diffusion Imaging - use these data with caution ###
Diffusion imaging from the following subjects should be used with
caution due to suspicious bval/bvecs tables extracted from the source
DICOM files:

    sub-9019  sub-9070  sub-9057  sub-9091  sub-9090  sub-9013  sub-9044
    sub-9050  sub-9067  sub-9035  sub-9035  sub-9073  sub-9083  sub-9037
    sub-9007  sub-9053  sub-9066  sub-9012  sub-9082  sub-9077  sub-9076
    sub-9099  sub-9001

### Raw Polysomnography Data ###
Raw polysomnography data is available upon request. Please contact Gustav Nilsonne at 
gustav.nilsonne@ki.se to request this data.

### Known Issues ###
 - sub-9066/ses-1/func/sub-9066_ses-1_task-hands_events.tsv does not have all of the columns present in 
the other events files. It only has 'onset', 'duration' and 'condition'.
 - sub-9070/ses-1/fmap is missing magnitude2 and phase2 files
 - sub-9078 has no functional images, resulting in fMRIPrep failure