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 Python 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_v1 --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
nba_v1, nba_v2 NeuroBooster 1.x only
neurochip_v1 NeuroChip 1.x only

The two formats are mutually incompatible: GenoTools 2.x loads only nba_gp2_r12, and 1.x loads only the other three. genotools-download warns if you ask for a 1.x model. 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.

Upgrading from 1.x? 2.1.0 is the first published 2.x release, so you are coming from 1.3.6. Flags moved from underscore_style to hyphen-style (the old spellings still work but warn), the JSON report gained fields, and several ancestry fixes can move predicted labels. Read MIGRATION_2.0.md before upgrading, and CHANGELOG.md for the summary.

2.x cannot load 1.x ancestry models. nba_v1, nba_v2 and neurochip_v1 were trained by 1.x and are rejected with an explanatory error. Use nba_gp2_r12, the 2.x-format NeuroBooster model and now the genotools-download default, or train your own with --ref-panel/--ref-labels as in the standard command below.

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_v1/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.1.0

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.1.0
File Size Uploaded
the_real_genotools-2.1.0.tar.gz 168.5 kB Details

Built distribution (wheel)

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

Total release size: 376.7 kB

Release files / the_real_genotools-2.1.0.tar.gz

Download URL the_real_genotools-2.1.0.tar.gz
Size 168.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f73fe1cda604f6c620affcdafd8bec3fc2a31813cf8504926de3f080e682aea5
BLAKE2b-256 checksum
How to use checksums
381d102d33e8386481af2b681ec20e1dbfdcb9e3303f466797ebf9ac4f49e3cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

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

Download URL the_real_genotools-2.1.0-py3-none-any.whl
Size 208.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40e2861a3e4953f1bf3694ed3c684038d5258c1c6ffafc0c563e7bdb1103c078
BLAKE2b-256 checksum
How to use checksums
b9527e20dbf633dcf219efd15a87a271388622e5ce058dd5068b3d23483a467f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release history Release notifications | RSS feed

2.2.0

2 release files

2.1.1

2 release files

This release

2.1.0 This release

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

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