Skip to content
Merged
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
123 changes: 90 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
[![DOI](https://zenodo.org/badge/657341621.svg)](https://zenodo.org/doi/10.5281/zenodo.10383685)

# CMI-DAIR Template Python Repository

Welcome to the CMI-DAIR Template Python Repository! This template is designed to streamline your project setup and ensure a consistent structure. To get started, follow these steps:

- [x] Run `setup_template.py` to initialize the repository.
- [ ] Replace the content of this `README.md` with details specific to your project.
- [ ] Install the `pre-commit` hooks to ensure code quality on each commit.
- [ ] Revise SECURITY.md to reflect supported versions or remove it if not applicable.
- [ ] Remove the placeholder src and test files, these are there merely to show how the CI works.
- [ ] If it hasn't already been done for your organization/acccount, grant third-party app permissions for CodeCov.
- [ ] To set up an API documentation website, go to the `Settings` tab of your repository, scroll down to the `GitHub Pages` section, and select `GitHub Actions` as the source. This will generate a link to your API docs.
- [ ] Update stability badge in `README.md` to reflect the current state of the project. A list of stability badges to copy can be found [here](https://github.com/orangemug/stability-badges). The [node documentation](https://nodejs.org/docs/latest-v20.x/api/documentation.html#documentation_stability_index) can be used as a reference for the stability levels.

# Project name
# RBC Pipeline

[![Build](https://github.com/childmindresearch/rbc/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/childmindresearch/rbc/actions/workflows/test.yaml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/childmindresearch/rbc/branch/main/graph/badge.svg?token=22HWWFWPW5)](https://codecov.io/gh/childmindresearch/rbc)
Expand All @@ -22,38 +7,110 @@ Welcome to the CMI-DAIR Template Python Repository! This template is designed to
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/childmindresearch/rbc/blob/main/LICENSE)
[![pages](https://img.shields.io/badge/api-docs-blue)](https://childmindresearch.github.io/rbc)

What problem does this tool solve?
Reference implementation of the Reproducible Brain Charts (RBC) preprocessing protocol for anatomical, functional, derivatives, and longitudinal neuroimaging data.

## Overview

This package provides a standalone implementation of the RBC preprocessing pipeline, originally developed in [C-PAC](https://fcp-indi.github.io/). This repository serves as the maintained reference implementation using [NiWrap](https://github.com/styx-api/niwrap) for neuroimaging tool integration.

**Reference:** Shafiei et al. (2024). "Reproducible Brain Charts: An open data resource for mapping brain development and its associations with mental health." *Neuron*, 113(22):3758-3779.

## Features

- A few
- Cool
- Things
- **Anatomical preprocessing**: Brain extraction (ANTs), tissue segmentation (FSL FAST), registration to MNI152
- **Functional preprocessing**: Motion correction, slice timing, coregistration, single-step resampling to template space
- **Nuisance regression**: 36-parameter and aCompCor methods with bandpass filtering
- **Quantitative metrics**: ALFF/fALFF, ReHo, network centrality, atlas-based timeseries extraction
- **Quality control**: XCP-style QC metrics with RBC-recommended thresholds
- **BIDS-compatible**: Follows BIDS conventions for inputs and outputs

## Installation

Install this package via :
```bash
pip install git+https://github.com/childmindresearch/rbc.git
```

### Dependencies

The pipeline requires the following neuroimaging tools:
- **AFNI**: Motion correction, despiking, nuisance regression
- **FSL**: Tissue segmentation, registration, brain masking
- **ANTs**: Brain extraction, registration

## Usage

```python
from rbc.workflows import anatomical, functional

# Anatomical preprocessing
anatomical.single_session(
in_t1w="sub-01_T1w.nii.gz",
output_dir="derivatives/rbc"
)

```sh
pip install APP_NAME
# Functional preprocessing (in development)
functional.single_session(
in_bold="sub-01_task-rest_bold.nii.gz",
in_t1w="sub-01_T1w.nii.gz",
output_dir="derivatives/rbc"
)
```

Or get the newest development version via:
## Documentation

```sh
pip install git+https://github.com/childmindresearch/rbc
- **[API Documentation](https://childmindresearch.github.io/rbc)**: Full API reference

## Contributing

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

## Testing

```bash
# Fast tests only (for development)
pytest -m "not slow"

# All tests including integration tests
pytest

# Full pipeline tests (slow, ~30+ min)
pytest -m "full_pipeline"
```

## Quick start
See [tests/README.md](tests/README.md) for testing strategy and instructions.

Short tutorial, maybe with a
## License

```Python
import APP_NAME
[MIT License](LICENSE)

APP_NAME.short_example()
## Citation

If you use this pipeline, please cite:

```bibtex
@article{shafiei2024reproducible,
title={Reproducible Brain Charts: An open data resource for mapping brain development and its associations with mental health},
author={Shafiei, Golia and Esper, Natasha B and Hoffmann, Madeleine S and Ai, Lei and Chen, Andrew A and Cluce, Julia and Covitz, Sydney and Giavasis, Steven and Lane, Connor and Mehta, Kahini and Moore, Tyler M and Salo, Taylor and Tapera, Tinashe M and Calkins, Monica E and Colcombe, Stanley and Davatzikos, Christos and Gur, Raquel E and Gur, Ruben C and Pan, Pedro M and Jackowski, Andrea P and Rokem, Ariel and Rohde, Luis A and Shinohara, Russell T and Tottenham, Nim and Zuo, Xi-Nian and Cieslak, Matthew and Franco, Alexandre R and Kiar, Gregory and Salum, Giovanni A and Milham, Michael P and Satterthwaite, Theodore D},
journal={Neuron},
volume={113},
number={22},
pages={3758--3779},
year={2024},
publisher={Elsevier},
doi={10.1016/j.neuron.2024.08.026}
}
```

## Links or References
## About RBC

Reproducible Brain Charts (RBC) is an open resource integrating data from 5 large studies of brain development in youth from three continents (N = 6,346). The resource provides:

- Harmonized psychiatric phenotypes using bifactor models
- Quality-assured neuroimaging data processed with consistent pipelines
- All data openly shared via the International Neuroimaging Data-sharing Initiative (INDI)

RBC facilitates large-scale, reproducible, and generalizable research in developmental and psychiatric neuroscience.

## Acknowledgments

- [https://www.wikipedia.de](https://www.wikipedia.de)
This implementation is based on the RBC protocol described in Shafiei et al. (2024) and originally implemented in C-PAC. Development is supported by the Child Mind Institute.
Loading