Skip to main content

Appendix C — NDA Data Packages

library(tibble)

The starter kits assume that the A2CPS data were downloaded from the NIMH Data Archive (NDA). This page describes what a download contains and where the kits expect to find it.

If you do not yet have access to the NDA and plan to download data from the NDA, please follow the instructions on the A2CPS For Researchers page (Accessing our Data) and the linked tutorials.

C.1 Data Packages

The starter kits assume that the data have been downloaded as a Data Package using nda-tools, and that the package was saved to data/nda inside the project folder. For example, a package that includes the MRI data, the genetic variant data, the demographics, and a few questionnaires looks like this (abridged):

$ tree data/nda
data/nda
├── dataset_collection.txt
├── datastructure_manifest.txt
├── experiments
│   ├── experiment_2652
│   └── experiment_2655
├── fmriresults01
│   ├── corral-secure/projects/A2CPS/products/consortium-data/pre-surgery
│   │   └── mris
│   │       ├── derivatives
│   │       └── idp
│   └── manifest-files
├── fmriresults01.txt
├── genomics_sample03
│   └── submission-85830
├── genomics_sample03.txt
├── genomics_subject02.txt
├── heal_demographics01.txt
├── image03
│   ├── corral-secure/projects/A2CPS/products/consortium-data/pre-surgery
│   │   └── mris
│   │       └── bids
│   └── manifest-files
├── image03.txt
├── md5_values.txt
├── oai_koos_womac01.txt
├── package_file_metadata_1235008.txt.gz
├── package_file_metadata_1235916.txt.gz
├── package_file_metadata_1235927.txt.gz
├── package_file_metadata_1238107.txt.gz
├── package_info.txt
├── prsupport01.txt
└── README.pdf

C.2 Data Structures

A package holds one tab-separated table per NDA data structure, named after the structure (for example, image03.txt or heal_demographics01.txt). Each structure has a data dictionary on the NDA website (for example, heal_demographics01). The first line of every table is the column header, the second line includes a partial data dictionary, and the third line contains the first row of data.

Every table identifies participants by subjectkey (the NDA GUID) and src_subject_id (the A2CPS record ID), so these columns link one structure to another (see Appendix B).

C.3 Files

Some structures also reference files, such as the NIfTI images referenced by image03, the derivatives referenced by fmriresults01, or the genotypes referenced by genomics_sample03. Those files are downloaded into a folder named after the structure. Within that folder, the MRI files keep the path they had when A2CPS uploaded them, corral-secure/projects/A2CPS/products/consortium-data/pre-surgery, while the genotype files are in a folder named after the NDA submission that delivered them, submission-85830. Other structures, such as prsupport01, are only tables.

When a starter kit names a file or runs a shell command, the path starts from the folder that holds the structure’s files. For example, mris/derivatives refers to data/nda/fmriresults01/corral-secure/projects/A2CPS/products/consortium-data/pre-surgery/mris/derivatives. Code chunks spell out the full path from the project folder.

C.4 MRI

C.4.1 Raw Data

Raw imaging data are stored in the image03 Data Structure (link goes to data dictionary). Metadata are stored in image03.txt. This is where you will find information such as participant age, participant sex, and scan acquisition date. The imaging files are underneath image03.

$ ls image03/corral-secure/projects/A2CPS/products/consortium-data/pre-surgery/mris/bids/ | head
dataset_description.json
README
sessions.json
sub-10003
sub-10005
sub-10008
sub-10010
sub-10011
sub-10013

The contents of that folder match the contents described in Chapter 8 (note that the aggregated table participants.tsv is not included in the NDA download, as the information is available in image03.txt).

C.4.2 Derivatives

The MRI derivatives are referenced by the fmriresults01 Data Structure, and so they are underneath fmriresults01/corral-secure/projects/A2CPS/products/consortium-data/pre-surgery/mris/derivatives, in one folder per pipeline. The image-derived phenotypes described in Chapter 7 are underneath fmriresults01/corral-secure/projects/A2CPS/products/consortium-data/pre-surgery/mris/idp.

C.4.3 Experiments

A package with fMRI data includes an “experiments” folder, which provides some information on how the two types of fMRI scans were collected.

Experiment Files
experiment_2652 (rfMRI)
experiment_2655 (tfMRI)

C.5 Genomics

The genetic variant data, including the imputed genotypes, are referenced by the genomics_sample03 Data Structure, and so they are underneath genomics_sample03/submission-85830. Subject-level information about the genotyping is in genomics_subject02.txt. For more on these files, see Chapter 5 and Chapter 6.

C.6 Additional NDA Metadata

The rest of the files are metadata associated with the storage of the dataset in the NDA or information about the Data Package. Most users will not need to interact with these files unless something has gone wrong with the download.

File/Directory Description/Notes

Table with identifiers relating to how the data were uploaded

Table with partial information about how the files are stored on the NDA AWS S3 bucket. This example file contains the first 10 rows.

Table with MD5 File Checksums for each of the files in the image03 folder. This example file contains the first 10 rows.

Additional metadata related to the location of imaging files within the NDA and their S3 bucket

High-level information about the Data Package and Filter Cart at the time of Data Package creation. Note that the counts listed in this file may not relate to the files that were downloaded (e.g., this file refers to 1053 participants in the filter, but 585 participants were downloaded).

Information that pertains to some NDA Data Packages.