Skip to main content

GenoTools

Published in G3: https://www.biorxiv.org/content/10.1101/2024.03.26.586362v1.full.pdf

DOI PyPI version PRs Welcome GitHub License Python

Documentation

You can find the full documentation with the following links:

Getting Started

GenoTools is a suite of automated genotype data processing steps written in Python. The core pipeline was built for Quality Control and Ancestry estimation of data in the Global Parkinson's Genetics Program (GP2)

To download the most current version from pip:

pip install the-real-genotools

Alternatively, if you'd like to download from github:

git clone https://github.com/dvitale199/GenoTools.git
cd GenoTools
pip install .

you can pull the most current references by running:

genotools-download

By default, the reference panel will be downloaded to ~/.genotools/ref. but can be download to a location of choice with --destination.

To download specific references/models, you can run the download with the following options:

genotools-download --ref 1kg_30x_hgdp_ashk_ref_panel --model nba_gp2_r12 --destination /path/to/download_directory/

Currently, 1kg_30x_hgdp_ashk_ref_panel is the only available reference panel. Available models, all in GRCh38:

Model Array Format
nba_gp2_r12 (default) NeuroBooster, trained on GP2 release 12 2.x

If using a different array, we would suggest training a new model by running the standard command below. Please ensure the reference panel and your genotypes are in the same build. If you're using our reference panel, your genotypes must be in GRCh38.

The 1.x models are retired. nba_v1, nba_v2 and neurochip_v1 are 1.x-format pickles that GenoTools 2.x rejects by design, so they are no longer served by name — asking for one tells you what to use instead. Use nba_gp2_r12, or train your own with --ref-panel/--ref-labels as in the standard command below.

They are archived rather than deleted, at https://storage.googleapis.com/genotools_refs/models/archive/, so an analysis pinned to GenoTools 1.x stays reproducible.

If you retrain a model, expect ~1.3% of ancestry labels to move. That is a property of retraining rather than of the fixes, and neither labeling is demonstrably more correct — see MIGRATION_2.0.md.

Modify the paths in the following command to run the standard GP2 pipeline:

genotools \
  --pfile /path/to/genotypes/for/qc \
  --out /path/to/qc/output \
  --ancestry \
  --ref-panel /path/to/reference/panel \
  --ref-labels /path/to/reference/ancestry/labels \
  --all-sample \
  --all-variant

This will find common snps between your genotype data and the reference panel, run PCA, UMAP-transform PCs, and train a new XGBoost classifier specific to your data/ref panel.

if you'd like to run the pipeline using an existing model, you can do that like so (take note of the --model option):

genotools \
  --pfile /path/to/genotypes/for/qc \
  --out /path/to/qc/output \
  --ancestry \
  --ref-panel /path/to/reference/panel \
  --ref-labels /path/to/reference/ancestry/labels \
  --all-sample \
  --all-variant \
  --model /path/to/nba_gp2_r12/model

Note: --container, --singularity and --cloud are not supported in 2.0 and exit with an error if passed. Ancestry prediction runs locally, in process. 1.x's containerized prediction relied on a Docker image built around a 1.x model that 2.0 cannot load; --cloud was never implemented in any version. See MIGRATION_2.0.md.

genotools accepts --pfile, --bfile, or --vcf. Any bfile or vcf will be converted to a pfile before running any steps.

Note: multiallelic pfiles will be converted to biallelic format by excluding multiallelic variants before running '--ancestry' steps. If you would prefer to not remove multiallelic snps, please pre-split the SNPs using bcftools prior to running genotools.

Please consult the docs links listed at the top of the README for the full argument guide, function guide, Default pipeline overview, and guide for navigating the output JSON.

Acknowledgements

GenoTools was developed as the core genotype and wgs processing pipeline for the Global Parkinson's Genetics Program (GP2) at the Center for Alzheimer's and Related Dementias (CARD) at the National Institutes of Health.

This tool relies on PLINK, a whole genome association analysis toolset, for various genetic data processing functionalities. We gratefully acknowledge the developers of PLINK for their foundational contributions to the field of genetics. More about PLINK can be found at their website.

Metadata

Release files for the-real-genotools 2.3.2

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

Source distribution (sdist)

Source distribution for the-real-genotools 2.3.2
File Size Uploaded Provenance Actions
the_real_genotools-2.3.2.tar.gz 2.2 MB Without provenance Details for the_real_genotools-2.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for the-real-genotools 2.3.2
File Interpreter ABI Platform Actions
the_real_genotools-2.3.2-py3-none-any.whl Python 3 none any Details for the_real_genotools-2.3.2-py3-none-any.whl

Total release size: 2.5 MB

Release files / the_real_genotools-2.3.2.tar.gz

Download URL the_real_genotools-2.3.2.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
4377262e6429d54ae48477a5c6390088a807985d489d2326fa48c3d4637722ec
BLAKE2b-256 checksum
How to use checksums
b721820de3f0852c8d1ff87553e8ac2fee3e8bd4b45372cab5175c657a6ea2c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Release files / the_real_genotools-2.3.2-py3-none-any.whl

Download URL the_real_genotools-2.3.2-py3-none-any.whl
Size 283.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b92794264005609e11b087b76594e6eee46d4d1031d5be8e8ffa7ebc75d85ab
BLAKE2b-256 checksum
How to use checksums
2c0bb531e0f2043f30be5baa4856d9ff98859d6b494d6159371193094faa87e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Security for the-real-genotools 2.3.2

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.

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