Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated setup.md #18

Merged
merged 1 commit into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ The primary goals of this workshop are:
||Setup|Download files required for the lesson|
| 00:00 | 1. sMRI modalities | How is MR image acquired? What anatomical features do different modalities capture? |
| 00:45 | 2. sMRI preprocessing (Part 1: image clean-up) | How do we clean-up MR images and extract brains? |
| 01:30 | 3. sMRI preprocessing (Part 2: image registration) | What are "templates", "spaces", "atlases"? What is spatial normalization? |
| 01:30 | 3. sMRI preprocessing (Part 2: spatial normalization) | What are "coordinate spaces", "templates", "atlases"? What is image registration? |
| 02:00 | 4. sMRI quantification | How do we delineate brain anatomy and quantify phenotypes? |
| 02:30 | 5. sMRI quality-control | How do we identify image preprocessing failures? |
| 03:00 | 6. Statistical analysis (Part 1: ROIs) | How to look at group differences in regional anatomical features? |
| 03:00 | 6. Statistical analysis | How to compare regional anatomical differences in case-control groups? |
| 04:00 | 7. Reproducibility considerations | How sensitive are the findings to your MR pipeline parameters? |
| 04:30 | Finish | |

Expand Down
3 changes: 2 additions & 1 deletion _episodes/03-Image_Preproc_Part2.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ print("Subject space to refernce space mapping:\n {} --> {}".format(cut_coords,c
{: .language-python}

~~~
Text(0.5, 1.0, 'fsaverage reference space')
Subject space to refernce space mapping:
(-40, 10, 0) --> (47,-2,11)
~~~
{: .output}

Expand Down
89 changes: 88 additions & 1 deletion setup.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,94 @@
---
title: Setup
---
FIXME
## Setting up the tutorial environment

### Getting workshop material

#### Method 1: Downloading directly from the repository

On the GitHub repo (this page), click the green button that says "Clone or download", then click **Download ZIP**. Once downloaded, extract the ZIP file.

#### Method 2: Using Git

Using this method requires a (very) useful piece of software called <code>git</code>. The process of installing git depends heavily on whether you're using MacOS, Windows or Linux. Follow the instructions in the link below to set up <code>git</code> on your PC:

[Installing Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

Once you've installed <code>git</code>, open up your terminal and do the following:

```
git clone https://github.com/carpentries-incubator/SDC-BIDS-sMRI.git
```

This will download the repository directly into your current directory.

### Setting up Python environment
We use python version 3.6.0, but any newer version should also work (Python 2 versions haven't been tested). There are many methods to setting up a python environment but we'd recommend using some sort of virtual environment as to not break your system python install. Two methods (of many) are listed below:

#### Method 1: Setting up conda environment (easiest) [Windows, Linux, MacOS]
For easy set-up we recommend [Anaconda](https://www.anaconda.com/download/) to manage python packages for scientific computing. Once installed, setting up the python environment can be done quite easily:

##### Windows
1. Install Anaconda Python version 3.7
2. Open **Anaconda Navigator**
3. Click on **Environments** on the left pane
4. Click **Create** then type in <code>SDC-BIDS-sMRI</code>
5. In the <code>SDC-BIDS-sMRI</code> entry click the play button then click **Open Terminal**
6. In terminal type:
```
conda install -y numpy pandas scipy scikit-learn matplotlib jupyter ipykernel nb_conda
conda install -y -c conda-forge awscli
pip install nilearn nibabel
```
7. Close the terminal, click on the play button again and open **Jupyter Notebook**
8. Navigate to <code>SDC-BIDS-sMRI</code> folder you downloaded earlier.
9. Done!

##### Linux and MacOS

After installing Anaconda, open terminal and type:

```
cd SDC-BIDS-sMRI
conda create -p ./SDC_sMRI_workshop_2021
source activate $(pwd)/SDC_sMRI_workshop_2021
conda install numpy pandas scipy scikit-learn matplotlib jupyter ipykernel nb_conda
conda install -c conda-forge awscli
pip install nilearn nibabel

```
#### Method 2: Using pyenv (my favourite) [Linux, MacOS]
An alternative method uses [pyenv](https://github.com/pyenv/pyenv) with [pyenv virtualenv](https://github.com/pyenv/pyenv-virtualenv). This is a favourite because it seamlessly integrates multiple python versions and environments into your system while maintaining use of pip (instead of conda).
```
cd SDC-BIDS-sMRI
pyenv virtualenv 3.6.0 SDC_sMRI_workshop_2021
echo SDC_sMRI_workshop_2021 > .python-version
pip install --requirement requirements.txt
```

## Acquiring the data
Most data (small files) are in the ./local_data dir
#TODO: Add download snippets for openneuro and aws

```
Finally open up the jupyter notebook to explore the tutorials:
```
cd SDC-BIDS-sMRI

#Include below line if using anaconda environment
source activate $(pwd)/SDC_sMRI_workshop_2021

jupyter notebook
```

**Reference**

[1] Gorgolewski KJ, Durnez J and Poldrack RA. Preprocessed Consortium for Neuropsychiatric Phenomics dataset [version 2; referees: 2 approved]. F1000Research 2017, 6:1262
(https://doi.org/10.12688/f1000research.11964.2)

{% include links.md %}



{% include links.md %}