GenoTools
Published in G3: https://www.biorxiv.org/content/10.1101/2024.03.26.586362v1.full.pdf
Documentation
You can find the full documentation with the following links:
- GenoTools Command Line Arguments
- Default Pipeline Overview
- Package Function Guide (for developers)
- JSON output guide
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.
2.x cannot load 1.x ancestry models.
nba_v1,nba_v2andneurochip_v1were trained by 1.x and are rejected with an explanatory error. Usenba_gp2_r12, the 2.x-format NeuroBooster model and now thegenotools-downloaddefault, or train your own with--ref-panel/--ref-labelsas in the standard command below.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_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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| the_real_genotools-2.2.0.tar.gz | 171.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| the_real_genotools-2.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 382.0 kB
Release files / the_real_genotools-2.2.0.tar.gz
| Download URL | the_real_genotools-2.2.0.tar.gz |
|---|---|
| Size | 171.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee8a39c59204c43d22144dd3439d16688352dbfa40a19528f5bf0dbc58ddf564
|
|
BLAKE2b-256 checksum How to use checksums |
a17235a57d83159ff25d9bc307c3f0b32e3bb36cbbc2c590363f972bce8a89dc
|
| 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.2.0-py3-none-any.whl
| Download URL | the_real_genotools-2.2.0-py3-none-any.whl |
|---|---|
| Size | 210.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19d652ae8785b844517c9f8832f49d985faaf1987b6ad657ac64676ed33eae3e
|
|
BLAKE2b-256 checksum How to use checksums |
4cdf4ef2e65f27c807c25ca2076b2106c1dd0b61fe23817d2e73fe4a4d9ee701
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|