# Data - First Steps

<figure><img src="/files/XRnE7bpMbHkayUpEpg2N" alt="" width="563"><figcaption></figcaption></figure>

[You can read more about this process via the linked PowerPoint made by the CBI](https://medicine.musc.edu/-/sm/medicine/departments/centers/cbi/f/cbimridataflow20210421.pdf).

## 1. Downloading scan data from CBIHome

* Open Filezilla (or the FTP software of your choice)
* Enter the address to CBIHome (sftp\://cbihome.musc.edu), as well as your NetID and password
* Navigate to the top level directory, then to MRData, then to your PI's folder, then to the study folder of your choice
* Download scans of your choice
  * Note that you can set the output destination for your downloads - set this to the folder on your desktop in which you will organize your newly downloaded data

## 2. Unzipping dicom folders

* You can unzip newly downloaded dicom folders in one of two ways:
  * Manually unzip the folders by double clicking (on Mac) or right clicking and extracting (on Windows)
  * Automate the unzipping process with a command line tool such as the bash tool 'unzip'.
    * See <https://bridge-lab.gitbook.io/docs/general/onboarding/research-specialist-training#id-5.-workspace-setup> for more details
    * To use bash unzip, open a Terminal and pass the following commands:

```bash
cd [filezilla download directory]
find . -type f -name '*.zip' -exec unzip {} \;
```

## 3. Sorting dicoms by sequence type

In order to access dicoms in a manageable way, they need to be sorted. This is done by looking at dicom meta data and sorting each dicom file based on a piece of meta data. There are many tools that allow a user to do this, such as simple-dicom-sort ( see <https://bridge-lab.gitbook.io/docs/general/onboarding/research-specialist-training#id-5.-workspace-setup> for more details).&#x20;

Our study dicoms are typically sorted by series/sequence name - the name of the type of scan to which the dicoms belong. Below is the simple-dicom-sort command to sort a set of dicoms. This can be placed into a for-loop in bash to sort many subjects' dicoms at once.

```bash
dicom_sort [input] [output] %SeriesName%
```

## 4. Convert to nifti and BIDS format

See [BIDS Data Organization](/docs/imaging/data-organization/general-documentation/bids-data-organization.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bridge-lab.gitbook.io/docs/imaging/data-organization/general-documentation/data-first-steps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
