Reproducible processing pipelines and uniform loaders for brain imaging datasets.
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:
brainjar.hcp_ya_openbrainjar.oasis3brainjar.camcanbrainjar.hcp_ya_restrictedbrainjar.hcp_agingbrainjar.hcp_development
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
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 brainjar-0.1.1.tar.gz.
File metadata
- Download URL: brainjar-0.1.1.tar.gz
- Upload date:
- Size: 51.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b77c0d9f39b0ab48cfdd3417f5133dd3c12d97d0236e1692a4c351251ef367b
|
|
| MD5 |
7938d01798ec327a12280e4261ca85a1
|
|
| BLAKE2b-256 |
43784af68f1cb7d18051b3178668b369c0f68bee31546f6027338d22472eb2ea
|
File details
Details for the file brainjar-0.1.1-py3-none-any.whl.
File metadata
- Download URL: brainjar-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
096aefba9e786de041c7350da0f87a39bd3bd054272aeb7e4d6b895b143dbbd0
|
|
| MD5 |
69c01590ad999417d73d1c7a7884f050
|
|
| BLAKE2b-256 |
de0751a0edea3e1f9bbbc0fdf80741331b9c2513a0023852a410f250049eb612
|