BIDS integration into snakemake workflows
Project description
Snakebids
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:
- Create a Snakefile: Define the steps of your workflow, including input / output files, processing rules, and dependencies
- Create a configuration file: Customize workflow behaviour using a YAML configuration file. Specify input / output directories and custom workflow parameters.
- 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 callpoe [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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snakebids-0.15.0.tar.gz.
File metadata
- Download URL: snakebids-0.15.0.tar.gz
- Upload date:
- Size: 389.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c5d79e87a5a801d2a47209ea66f328084a721fff71d2ac755fa0a52e80246ae
|
|
| MD5 |
e147b7d76500c69096975d42879167e0
|
|
| BLAKE2b-256 |
97555d35f02afa4aaa8bfcaea3b81fd8aecc7f11f70c55ae0a5a6f3cc9055f8b
|
File details
Details for the file snakebids-0.15.0-py3-none-any.whl.
File metadata
- Download URL: snakebids-0.15.0-py3-none-any.whl
- Upload date:
- Size: 108.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc3903bf8f78f226200c87c45e5816f9ced6bcfdd2db82d1a84bd37dbe8bd62a
|
|
| MD5 |
ece9a44b9648dc42f68e8cc520a41f10
|
|
| BLAKE2b-256 |
81b361100d8420bdf49438da3b6da8903146163afb5af20cc11a4244caa19f2e
|