Skip to main content

Biobanking data processing, annotation, and association workflows

Project description

Biobanking

Systematic collection, processing, storage, and analysis of biological samples and associated health records for medical research.

Supported pipelines

Preprocess

Contains biobank-specific modules for EHR data collection, cleaning, and processing.

QC (Under construction)

Will contain biobank-specific modules for variant quality control and filtering.

Annotation (Under construction)

Will contain biobank-specific modules for variant annotation.

Association

Contains biobank-specific modules for genotype-phenotype association tests.

Plotting

Contains forest plot helpers for burden and interaction association results.

Interaction forest plots can include marginal burden rows for the anchor and target genes by passing the corresponding burden result files to plot_interaction_forest(..., burden_data=[anchor_file, target_file]). These rows appear as Burden :: <gene> before the interaction-model main effect, interaction effect, and joint effect rows.

More plotting examples are in docs/plotting.md.

Supported biobanks

All of Us

The All of Us biobank consists of coupled whole genome sequencing and electronic health record data of more than 400k individuals, with continued expansion.

UK Biobank (Under construction)

The UK Biobank consists of coupled whole genome sequencing and electronic health record data of ~500k participants.

AoU REGENIE workflow

The All of Us association utilities currently support a packaged regenie workflow with four Step 2 categories:

  • Burden association testing
  • SKAT-O association testing
  • Mask-only runs for writing burden-mask PLINK datasets
  • Interaction testing using precomputed burden-mask PLINK datasets

The workflow implementation lives in src/biobanking/workflows/regenie.wdl, and the Python utilities live in src/biobanking/association/aou.py.

The Step 2 tracking model separates statistical test, variant-mask family, and concrete run identity:

  • step2_category: burden, skato, mask, or interaction
  • step2_mode: the variant/mask family, such as plof, missense, or plof_missense
  • run_label: the concrete run, such as default, INHBE_vs_LDLR, or INHBE_vs_chr1

This keeps LOCO and prediction reuse aligned with the phenotype definition, lets pLoF and missense mask families share the same workflow machinery, and avoids encoding interaction labels into step2_mode.

Recommended usage pattern

  • Run or reuse Step 1 once per phenotype prefix.
  • Use burden runs for standard gene-based mask tests.
  • Use SKAT-O runs when you want the REGENIE --vc-tests skato gene-based test for the same mask family.
  • Use mask runs to materialize chromosome-wide burden-mask PLINK files from a universal dummy phenotype stored at data/associations/masks/<burden_type>/dummy.tsv.gz, without phenotype covariates.
  • Use interaction runs only after Step 1 exists for the phenotype prefix you are testing.

Burden input files are generated from annotation files at data/exome/annot/chr<chrom>_<burden_type>.tsv.gz. The default pLoF call uses built-in pLoF_strict and pLoF_lenient mask definitions; custom mask families can pass mask_definitions directly to create_regenie_burden_files(...).

More detailed usage examples are in docs/workflows.md.

Validate WDL

Before submitting workflows through Cromwell, validate the WDL locally with womtool. A simple setup is:

java -jar .\data\tools\womtool.jar validate .\src\biobanking\workflows\regenie.wdl

If womtool.jar is not present yet, place it under data/tools/ in the repository and rerun the validation command before submitting updated workflow code.

Internal use

python -m pip install -U pip build
pip install twine
# linux
rm -rf dist build *.egg-info src/*.egg-info
# windows
Remove-Item -Recurse -Force dist, *.egg-info, src\*.egg-info
python -m build
pip install dist/biobanking-0.0.17-py3-none-any.whl
java -jar .\data\tools\womtool.jar validate .\src\biobanking\workflows\regenie.wdl
python -c "from biobanking.association.aou import REGENIE; regenie = REGENIE(); from biobanking.preprocess.aou.measurements import save_measurements_in_wide_format; print('import ok')"
twine upload dist/*

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

biobanking-0.0.18.tar.gz (305.1 kB view details)

Uploaded Source

Built Distribution

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

biobanking-0.0.18-py3-none-any.whl (346.4 kB view details)

Uploaded Python 3

File details

Details for the file biobanking-0.0.18.tar.gz.

File metadata

  • Download URL: biobanking-0.0.18.tar.gz
  • Upload date:
  • Size: 305.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for biobanking-0.0.18.tar.gz
Algorithm Hash digest
SHA256 59bdb5e8fcca4c7bf2e54971194408b17eb12703692146fc00f4f49e4071f94d
MD5 9cae574e749ea04b40050fb1a3bb265c
BLAKE2b-256 2c0f332adbddb8e33d0a515b74aa88c6fabc5df0ac49acd599244d0aa58c94e5

See more details on using hashes here.

File details

Details for the file biobanking-0.0.18-py3-none-any.whl.

File metadata

  • Download URL: biobanking-0.0.18-py3-none-any.whl
  • Upload date:
  • Size: 346.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for biobanking-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 6cd5ff0141624c2975eec02bdac0b9fc7def6000715977e40020b8ae51b56433
MD5 1ea5f9d9d799e3e072f05d19b041589b
BLAKE2b-256 51dcd78fb50e429ce6b15057d337c414f949d636506ac338da6cbfa0b3a0153f

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