Skip to main content

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.

Metadata

Release files for brainjar 0.1.1

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

Source distribution (sdist)

Source distribution for brainjar 0.1.1
File Size Uploaded Provenance Actions
brainjar-0.1.1.tar.gz 51.2 kB Without provenance Details for brainjar-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 114.6 kB

Release files / brainjar-0.1.1.tar.gz

Download URL brainjar-0.1.1.tar.gz
Size 51.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1b77c0d9f39b0ab48cfdd3417f5133dd3c12d97d0236e1692a4c351251ef367b
BLAKE2b-256 checksum
How to use checksums
43784af68f1cb7d18051b3178668b369c0f68bee31546f6027338d22472eb2ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / brainjar-0.1.1-py3-none-any.whl

Download URL brainjar-0.1.1-py3-none-any.whl
Size 63.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
096aefba9e786de041c7350da0f87a39bd3bd054272aeb7e4d6b895b143dbbd0
BLAKE2b-256 checksum
How to use checksums
de0751a0edea3e1f9bbbc0fdf80741331b9c2513a0023852a410f250049eb612
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for brainjar 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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