Skip to main content

Reproducible processing pipelines and uniform loaders for brain imaging datasets.

Reason this release was yanked:

missing matplotlib dependancy

Project description

brainjar

Reproducible processing pipelines and uniform loaders for brain imaging datasets.

Data access

brainjar ships code, not data. For most datasets you must obtain the raw data yourself under the dataset's own Data Use Agreement; redistribution is not permitted and process() cannot download anything — you point at your own copy:

process(download=False, raw_dir='/data/hcp_ya_open/raw')   # pipeline runs locally

The exceptions, where the processed derivative is openly redistributable and process(download=True) will fetch it from Zenodo:

  • HCP-YA Open (HCP Consortium Open Access Data Use Terms)

Install

pip install brainjar

That gives you every dataset loader. To re-run a pipeline, install its extra into a dedicated venv:

python -m venv .venv && source .venv/bin/activate
pip install "brainjar[hcp_ya_open-pipeline]"

Pipeline extras install the exact pins recorded in each dataset's manifest.yaml. Different datasets may have conflicting pins — install one at a time.

Use

from brainjar.hcp_ya_open import process, get_df_image, get_df_xfeat, LABELS

process()                      # ensures the processed derivative exists
                               # (prompts: download the deposited derivative
                               # from Zenodo, or run the pipeline locally)
df_image = get_df_image()      # index: subject_id; cols: fa, md -> absolute Paths
df_xfeat = get_df_xfeat()      # index: subject_id; cols: age, sex,
                               # Release, ... (~580 columns from ConnectomeDB)

LABELS['age']                  # 'Age (years, 5-yr bucket)'
LABELS['fa']                   # 'Fractional Anisotropy'

process() is the entry point that gets data into place. Pass download=True / False to skip the prompt, or raw_dir=... to point at raw data when running locally.

Every dataset module exposes the same names: process, get_df_image, get_df_xfeat, LABELS.

Datasets

Access procedure, DUA, provenance, and pipeline extra for each are in the subpackage README:

Cache

Default: platformdirs.user_data_dir('brainjar') / <dataset>. Override per call (process(dest=...)) or globally (BRAINJAR_<DATASET>_PATH). A .complete sentinel marks a finished run.

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

brainjar-0.1.0.tar.gz (51.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brainjar-0.1.0-py3-none-any.whl (63.4 kB view details)

Uploaded Python 3

File details

Details for the file brainjar-0.1.0.tar.gz.

File metadata

  • Download URL: brainjar-0.1.0.tar.gz
  • Upload date:
  • Size: 51.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for brainjar-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f2c462d5c546dbd4bce41e56ae558ec46f022660cb1c7bfb1d2c866d42241c5
MD5 858b99a6aaeb3a7025a247d68df9b196
BLAKE2b-256 d344489df82a0ddc9501f827184ec8729d21441136d5d72ecdad4407472af44d

See more details on using hashes here.

File details

Details for the file brainjar-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: brainjar-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 63.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for brainjar-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ddcf99ecdac4047cedd3c888ea005b8701cedca17668de0050562843deda0dd
MD5 2497805f5d09a9f31d06ca1bac9fbee2
BLAKE2b-256 cb53f7b48ba2548415ee562b66e4f2d47ad1735dda2c8d7a9a04dbddd93bddd1

See more details on using hashes here.

Supported by

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