Skip to main content

BIDS integration into snakemake workflows

Project description

Snakebids

Tests Version Python versions DOI License: MIT

This repository implements the Snakebids builder function for Bids Paths. You can install this library as a stand-alone package via pip (see below), however, its contents are repackaged in the main snakebids repository.

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

The bids() function is a flexible, unopinionated tool to build valid bids paths in a clean, pythonic syntax. It tries to support all the official bids tags, but allows any arbitrary custom tags as well. Entities are automatically ordered according to the bids spec.

Installation

Snakebids can be installed using pip:

pip install bids_path

Usage

To use, just import the bids() function:

from bids_path import bids

Note that bids() is just one piece of the broader snakebids. If snakebids is installed, bids() can be imported directly from the snakebids namespace:

from snakebids import bids

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. bids_path dependencies are managed with Poetry (version 1.2 or higher). Please refer to the poetry website for installation instructions.

Note: bids_path makes use of Poetry's dynamic versioning. To see a version number on locally installed Snakebids versions, you will have to also install poetry-dynamic-versioning plugin to your poetry installation (`poetry self add "poetry-dynamic-versioning[plugin]"). This is not required for contribution.

Following installation of Poetry, the development can be set up by running the following commands:

poetry install
poetry run poe setup

bids_path uses poethepoet as a task runner. You can see what commands are available by running:

poetry run poe

Tests are done with pytest and can be run via:

poetry run poe test

Additionally, bids_path uses pre-commit hooks (installed via the poe setup command above) to lint and format code (we use black, isort and ruff). By default, these hooks are run on every commit. Please be sure they all pass before making a PR.

License

bids_path is distributed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bids_path-0.0.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

bids_path-0.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file bids_path-0.0.1.tar.gz.

File metadata

  • Download URL: bids_path-0.0.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.0 Linux/5.15.90.1-microsoft-standard-WSL2

File hashes

Hashes for bids_path-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a78aa709a9fcfdc0e9f6eb2eafc67584911c3c8bd53221079ba1cfbbd196b557
MD5 29c7c38a4a4c95141de444f0e3a66c3c
BLAKE2b-256 8856c97e2b470b209e89953a0029abd81144b23dfd823fd60b1c6d7b719a6790

See more details on using hashes here.

File details

Details for the file bids_path-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: bids_path-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.0 Linux/5.15.90.1-microsoft-standard-WSL2

File hashes

Hashes for bids_path-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d34e054a9aed3f8be4deda4dc6d4871560301ee0272ae7fb3fea2f82dfd6d9c6
MD5 5dcd866f34804d47de91b1fe0fe86ab0
BLAKE2b-256 0b94a75bf3c842f623fb908cfefd116c4547f4bca2817ea5b2926f553fc54369

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page