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

NARPS summary #139

Merged
merged 43 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
6986e90
[BUG] inside unit_tests workflow
bclenet Aug 31, 2023
d6e67f3
Merge branch 'Inria-Empenn:main' into main
bclenet Aug 31, 2023
c3bfc53
Merge branch 'Inria-Empenn:main' into main
bclenet Sep 4, 2023
4b30504
Merge branch 'Inria-Empenn:main' into main
bclenet Sep 19, 2023
fd15ffc
Merge branch 'Inria-Empenn:main' into main
bclenet Sep 21, 2023
6715950
[DOC] fix some broken links
bclenet Sep 22, 2023
57b8c86
[DOC] adding template for pipeline testing
bclenet Sep 22, 2023
2c891c2
[DOC] adding template for pipeline testing
bclenet Sep 22, 2023
552e18c
About implemented_pipelines
bclenet Sep 25, 2023
b6f21f4
Deal with test template
bclenet Sep 25, 2023
6ebe5d2
Merge branch 'Inria-Empenn:main' into main
bclenet Sep 29, 2023
0a584dd
Merge branch 'Inria-Empenn:main' into main
bclenet Sep 29, 2023
e284b80
Merge branch 'Inria-Empenn:main' into main
bclenet Sep 29, 2023
5774813
Merge branch 'Inria-Empenn:main' into main
bclenet Oct 5, 2023
8f12d3d
Merge branch 'Inria-Empenn:main' into main
bclenet Oct 5, 2023
7c3b6df
Merge branch 'main' into documentation
bclenet Oct 5, 2023
91dc744
Merge branch 'Inria-Empenn:main' into main
bclenet Oct 10, 2023
c10e3a4
Merge branch 'main' into documentation
bclenet Oct 13, 2023
0436fe4
[DOC] new readme for the doc
bclenet Oct 13, 2023
bfcf3dd
Changes in README.md
bclenet Oct 13, 2023
d212e1d
[DOC] slight changes to docs/README.md
bclenet Oct 13, 2023
c03e9d1
Merge branch 'Inria-Empenn:main' into main
bclenet Nov 20, 2023
fe0d25b
Merge branch 'Inria-Empenn:main' into main
bclenet Nov 22, 2023
04d5ff2
Merge branch 'Inria-Empenn:main' into main
bclenet Nov 22, 2023
6466b29
Merge branch 'main' into documentation
bclenet Nov 30, 2023
29870d5
Add links to past events
bclenet Nov 30, 2023
e4f369d
Changes in readme.md
bclenet Nov 30, 2023
142f89c
fMRI trail
bclenet Nov 30, 2023
7b7fb89
Adding trail description in contribution guide
bclenet Dec 6, 2023
23b93f6
Separate trails in contribution guide
bclenet Dec 6, 2023
6f3dd73
[TEST] Solving pytest issues with template test
bclenet Dec 6, 2023
c9ee889
Merge branch 'Inria-Empenn:main' into main
bclenet Jan 5, 2024
933e87f
Merge branch 'main' into documentation
bclenet Jan 9, 2024
5803501
Changing docker image in use
bclenet Jan 9, 2024
e297685
FSL template correction
bclenet Jan 10, 2024
9213dc4
[DOC] writing test files
bclenet Jan 10, 2024
9bfc89c
Merge branch 'Inria-Empenn:main' into main
bclenet Jan 10, 2024
d2b8452
Merge branch 'main' into documentation
bclenet Jan 10, 2024
7d5fa82
Codespell
bclenet Jan 10, 2024
11736e6
First step in writing documentation about NARPS
bclenet Jan 10, 2024
c5fd548
[DOC] completing doc about narps
bclenet Jan 11, 2024
6c9d7a3
[DOC] completing doc about narps
bclenet Jan 11, 2024
a016bdd
[DOC] completing doc about narps
bclenet Jan 11, 2024
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
10 changes: 5 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ datalad get data/original/ds001734/derivatives/fmriprep/sub-00[1-4] -J 12

## 4 - Set up the environment

[Install Docker](https://docs.docker.com/engine/install/) then pull the Docker image :
[Install Docker](https://docs.docker.com/engine/install/) then pull the nipype Docker image :

```bash
docker pull elodiegermani/open_pipeline:latest
docker pull nipype/nipype
```

Once it's done you can check the image is available on your system :

```bash
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/elodiegermani/open_pipeline latest 0f3c74d28406 9 months ago 22.7 GB
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/nipype/nipype latest 0f3c74d28406 9 months ago 22.7 GB
```

> [!NOTE]
Expand All @@ -63,7 +63,7 @@ Start a Docker container from the Docker image :

```bash
# Replace PATH_TO_THE_REPOSITORY in the following command (e.g.: with /home/user/dev/narps_open_pipelines/)
docker run -it -v PATH_TO_THE_REPOSITORY:/home/neuro/code/ elodiegermani/open_pipeline
docker run -it -v PATH_TO_THE_REPOSITORY:/home/neuro/code/ nipype/nipype
```

Install NARPS Open Pipelines inside the container :
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@

**The goal of the NARPS Open Pipelines project is to create a codebase reproducing the 70 pipelines of the NARPS study (Botvinik-Nezer et al., 2020) and share this as an open resource for the community**.

We base our reproductions on the [original descriptions provided by the teams](https://github.com/poldrack/narps/blob/1.0.1/ImageAnalyses/metadata_files/analysis_pipelines_for_analysis.xlsx) and test the quality of the reproductions by comparing our results with the original results published on NeuroVault.
We base our reproductions on the original descriptions provided by the teams and test the quality of the reproductions by comparing our results with the original results published on NeuroVault.

:vertical_traffic_light: See [the pipeline dashboard](https://github.com/Inria-Empenn/narps_open_pipelines/wiki/pipeline_status) to view our current progress at a glance.
Find more information about the NARPS study [here](docs/narps.md).

:vertical_traffic_light: See [the pipeline dashboard](https://github.com/Inria-Empenn/narps_open_pipelines/wiki/pipeline_status) to view our current progress at a glance !

## Contributing

Expand Down
10 changes: 5 additions & 5 deletions docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## The Docker container :whale:

The NARPS Open Pipelines project is build upon several dependencies, such as [Nipype](https://nipype.readthedocs.io/en/latest/) but also the original software packages used by the pipelines (SPM, FSL, AFNI...). Therefore, we created a Docker container based on [Neurodocker](https://github.com/ReproNim/neurodocker) that contains software dependencies.
The NARPS Open Pipelines project is build upon several dependencies, such as [Nipype](https://nipype.readthedocs.io/en/latest/) but also the original software packages used by the pipelines (SPM, FSL, AFNI...). Therefore we recommend to use the [`nipype/nipype` Docker image](https://hub.docker.com/r/nipype/nipype/) that contains all the required software dependencies.

The simplest way to start the container using the command below :
The simplest way to start the container is by using the command below :

```bash
docker run -it elodiegermani/open_pipeline
docker run -it nipype/nipype
```

From this command line, you need to add volumes to be able to link with your local files (code repository).
Expand All @@ -16,7 +16,7 @@ From this command line, you need to add volumes to be able to link with your loc
# Replace PATH_TO_THE_REPOSITORY in the following command (e.g.: with /home/user/dev/narps_open_pipelines/)
docker run -it \
-v PATH_TO_THE_REPOSITORY:/home/neuro/code/ \
elodiegermani/open_pipeline
nipype/nipype
```

## Use Jupyter with the container
Expand All @@ -27,7 +27,7 @@ If you wish to use [Jupyter](https://jupyter.org/) to run the code, a port forwa
docker run -it \
-v PATH_TO_THE_REPOSITORY:/home/neuro/code/ \
-p 8888:8888 \
elodiegermani/open_pipeline
nipype/nipype
```

Then, from inside the container :
Expand Down
93 changes: 93 additions & 0 deletions docs/narps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# More information about the NARPS study

This page aims at summarizing the NARPS study [(Botvinik-Nezer et al., 2020)](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7771346/) for the future contributors of NARPS Open Pipelines.

In the following, the citations come from the associated data article : [Botvinik-Nezer, R. et al. (2019), 'fMRI data of mixed gambles from the Neuroimaging Analysis Replication and Prediction Study', Scientific Data](https://www.nature.com/articles/s41597-019-0113-7).

## Context

> In the Neuroimaging Analysis Replication and Prediction Study (NARPS), we aim to provide the first scientific evidence on the variability of results across analysis teams in neuroscience.

From this starting point, 70 teams were asked to analyse the same dataset, providing their methods and results to be later analysed and compared. Nine hypotheses where to be tested and a binary decision for each one had to be reported, whether it was significantly supported based on a whole-brain analysis.

## The data

NARPS is based on a dataset of task-fMRI with 108 participants, 4 runs for each.

> For each participant, the dataset includes an anatomical (T1 weighted) scan and fMRI as well as behavioral data from four runs of the task. The dataset is shared through OpenNeuro and is formatted according to the Brain Imaging Data Structure (BIDS) standard. Data pre-processed with fMRIprep and quality control reports are also publicly shared.

### Raw functional volumes

> Each run consists of 64 trials performed during an fMRI scanning run lasting 453 seconds and comprising 453 volumes (given the repetition time of one second).

For each participant, the associated data (4D volumes) is :
* `data/original/ds001734/sub-*/func/sub-*_task-MGT_run-01_bold.nii.gz`
* `data/original/ds001734/sub-*/func/sub-*_task-MGT_run-02_bold.nii.gz`
* `data/original/ds001734/sub-*/func/sub-*_task-MGT_run-03_bold.nii.gz`
* `data/original/ds001734/sub-*/func/sub-*_task-MGT_run-04_bold.nii.gz`

### Event data

> On each trial, participants were presented with a mixed gamble entailing an equal 50% chance of gaining one amount of money or losing another amount.

For each participant, the associated data (events files) is :
* `data/original/ds001734/sub-*/func/sub-*_task-MGT_run-01_events.tsv`
* `data/original/ds001734/sub-*/func/sub-*_task-MGT_run-02_events.tsv`
* `data/original/ds001734/sub-*/func/sub-*_task-MGT_run-03_events.tsv`
* `data/original/ds001734/sub-*/func/sub-*_task-MGT_run-04_events.tsv`

This file contains the onsets, response time, and response of the participant, as well as the amount of money proposed (gain and loss) for each trial.

### Preprocessed data

> The pre-processed data included in this dataset were preprocessed using fMRIprep version 1.1.4, which is based on Nipype 1.1.1

For each participant, the associated data (preprocessed volumes, confounds, brain masks, ...) is under :
* `data/original/ds001734/derivatives/fmriprep/sub-*/func/`

Some teams chose to use this pre-processed data directly as inputs for the statistical analysis, while other performed their own method of pre-processing.

### Task-related data

The associated data (task and dataset description) is :
* `data/original/ds001734/T1w.json`
* `data/original/ds001734/task-MGT_bold.json`
* `data/original/ds001734/task-MGT_sbref.json`
* `data/original/ds001734/dataset_description.json`

> [!TIP]
> The `narps_open.data.task` module helps parsing this data.

Furthermore, the participants were assigned to a condition, either *equalRange* or *equalIndifference* :

> Possible gains ranged between 10 and 40 ILS (in increments of 2 ILS) in the equal indifference condition or 5–20 ILS (in increments of 1 ILS) in the equal range condition, while possible losses ranged from 5–20 ILS (in increments of 1 ILS) in both conditions.

The repartition is stored in :
* `data/original/ds001734/participants.tsv`

> [!TIP]
> The `narps_open.data.participants` module helps parsing this data.

## The outputs

Each of the team participating in NARPS had to provide a COBIDS-compliant *textual description* of its analysis of the dataset, as well as the results from it.

All the descriptions are gathered in the [analysis_pipelines_for_analysis.xlsx](https://github.com/poldrack/narps/blob/1.0.1/ImageAnalyses/metadata_files/analysis_pipelines_for_analysis.xlsx) in the NARPS repository on GitHub.

> [!TIP]
> We developed a tool to easily parse this file, see [docs/description.md](docs/description.md) for more details on how to use it.

Results data submitted by all the teams is available [on Zenodo](https://zenodo.org/records/3528329#.Y7_H1bTMKBT)

> [!TIP]
> This data is included in the NARPS Open Pipelines repository under [data/results](data/results), and we developed a tool to access it easily : see the dedicated section in [docs/data.md](docs/data.md#results-from-narps-teams) for more details.

## Useful resources

* The website dedicated to the study - [www.narps.info](https://www.narps.info/)
* The article - [Botvinik-Nezer, R. et al. (2020), 'Variability in the analysis of a single neuroimaging dataset by many teams', Nature](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7771346/)
* The associated data article - [Botvinik-Nezer, R. et al. (2019), 'fMRI data of mixed gambles from the Neuroimaging Analysis Replication and Prediction Study', Scientific Data](https://www.nature.com/articles/s41597-019-0113-7)
* The GitHub page for the NARPS repository. This code was used to generate the published results - [github.com/poldrack/narps](https://github.com/poldrack/narps)
* The snapshot of this code base [on Zenodo](https://zenodo.org/records/3709273#.Y2jVkCPMIz4)
* The dataset [on OpenNeuro](https://openneuro.org/datasets/ds001734/versions/1.0.5)
* Results data submitted by all the teams [on Zenodo](https://zenodo.org/records/3528329#.Y7_H1bTMKBT)
11 changes: 10 additions & 1 deletion docs/pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,13 @@ First have a look at the [testing page of the documentation](/docs/testing.md).
All tests must be contained in a single file named `tests/pipelines/test_team_<team_id>.py`. You can start by copy-pasting the template file : [tests/pipelines/templates/template_test.py](/tests/pipelines/templates/template_test.py) inside the `tests/pipelines/` directory, renaming it accordingly. Then, follow the instructions and tips inside the template and don't forget to replace `XXXX` with the actual team id, inside the document.

> [!NOTE]
> Feel free to have a look at [tests/pipelines/test_team_2T6S.py](/tests/pipelines/test_team_2T6S.py), which is the file containing all the automatic tests for the 2T6S pipeline : it gives an example.
> Feel free to have a look at [tests/pipelines/test_team_C88N.py](/tests/pipelines/test_team_C88N.py), which is the file containing all the automatic tests for the C88N pipeline : it gives an example.

Your test file must contain the following methods:
* one testing the execution of the pipeline and comparing the results with the original ones. This can be simply achieved with this line :
```python
helpers.test_pipeline_evaluation('C88N')
```
* one for each method you declared in the pipeline class (e.g.: testing the `get_subject_information` method)
* one testing the instantiation of your pipeline (see `test_create` in `test_team_C88N.py`)
* one testing the `get_*_outputs` methods of your pipeline (see `test_outputs` in `test_team_C88N.py`)
Loading