Skip to main content

Snakebids

Tests codecov Documentation Status Version Python versions DOI License: MIT

Snakebids is a Python package that extends Snakemake, enabling users to create reproducible, scalable pipelines for processing neuroimaging data in the BIDS format. Snakebids workflows expose a CLI that conforms to the BIDS App guidelines.

Features

Snakebids includes all of the features of Snakemake, including flexible configuration, parallel execution, and Docker/Singularity support, plus:

  • Built-in support for BIDS datasets: Seamless workflow functionality with a wide range of BIDS datasets, accommodating various levels of complexity.
  • BIDS App Creation: Provide command-line invocations of your workflow following BIDS App guidelines, ensuring reproducibility and enhancing accessibility of your workflow.
  • BIDS Path Construction: Easy, flexible construction of valid BIDS paths following BIDS guiding principles, promoting data organization and sharing.
  • Plugin System: Extend the functionality of Snakebids by creating and using plugins to meet your workflow's needs.
  • Pybids Querying: Leverages Pybids to efficiently retrieve specific data required.

Installation

Snakebids can be installed using pip:

pip install snakebids

Usage

To create and run a Snakebids workflow, you need to:

  1. Create a Snakefile: Define the steps of your workflow, including input / output files, processing rules, and dependencies
  2. Create a configuration file: Customize workflow behaviour using a YAML configuration file. Specify input / output directories and custom workflow parameters.
  3. Run the pipeline: Execute the Snakebids pipeline by invoking the BIDS App CLI or via Snakemake executable.

For detailed instructions and examples, please refer to the documentation.

Contributing

Snakebids is an open-source project, and contributions are welcome! If you have any bug reports, feature requests, or improvements, please submit them to the issues page.

To contribute, first clone the Github repository.

git clone https://github.com/khanlab/snakebids
cd snakebids

Snakebids dependencies are managed with uv. This can be installed with their standalone installer:

curl -LsSf https://astral.sh/uv/install.sh | sh

[!TIP] Please refer to the uv website for detailed installation instructions and usage information.

Before coding, run the following command to setup our pre-commit hooks:

uv run poe setup

These check the code against ruff and pyright. Be sure they both pass before making a PR.

[!TIP] Snakebids uses poethepoet as a task runner. If this tool is installed globally, it will automatically detect the snakebids environment when directly called. So, instead of uv run poe [COMMAND], you can call poe [COMMAND]. It can be installed with:

uv tool poethepoet

To check code quality, use:

uv run poe quality

Tests are done with pytest and can be run via:

uv run poe test

License

Snakebids is distributed under the MIT License.

Acknowledgements

Snakebids extends the Snakemake workflow management system and follows the guidelines outlined by the BIDS specification.

Relevant papers

  • Mölder F, Jablonski KP, Letcher B et al. Sustainable data analysis with Snakemake [version 2; peer review: 2 approved]. F1000Research. 2021. doi: 10.12688/f1000research.29032.2

Release files for snakebids 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snakebids 0.15.0
File Size Uploaded
snakebids-0.15.0.tar.gz 389.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snakebids 0.15.0
File Interpreter ABI Platform
snakebids-0.15.0-py3-none-any.whl Python 3 none any Details

Total release size: 497.8 kB

Release files / snakebids-0.15.0.tar.gz

Download URL snakebids-0.15.0.tar.gz
Size 389.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4c5d79e87a5a801d2a47209ea66f328084a721fff71d2ac755fa0a52e80246ae
BLAKE2b-256 checksum
How to use checksums
97555d35f02afa4aaa8bfcaea3b81fd8aecc7f11f70c55ae0a5a6f3cc9055f8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.8

Release files / snakebids-0.15.0-py3-none-any.whl

Download URL snakebids-0.15.0-py3-none-any.whl
Size 108.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc3903bf8f78f226200c87c45e5816f9ced6bcfdd2db82d1a84bd37dbe8bd62a
BLAKE2b-256 checksum
How to use checksums
81b361100d8420bdf49438da3b6da8903146163afb5af20cc11a4244caa19f2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.8

Release history Release notifications | RSS feed

This release

0.15.0 This release

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.16

2 release files

0.3.14

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.7

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page