Skip to main content

A Suite of Genotyping Tools for Genome-Wide Association Study and Genomic Selection

Project description

JanusX

简体中文(推荐) | English | 算法分享

Project Overview

JanusX is a high-performance, ALL-in-ONE suite for quantitative genetics that unifies genome-wide association studies (GWAS) and genomic selection (GS). It incorporates well-established GWAS methods (LM, LMM, and FarmCPU) and a flexible GS toolkit including GBLUP and various machine learning models. It also combines routine genomic analyses, from data processing to publication-ready visualisation.

It provides significant performance improvements over tools like GEMMA, GCTA, and rMVP, especially in multi-threaded computation.

Installation

PyPI

pip install janusx

From Source

git clone https://github.com/MaizeMan-JxFU/JanusX.git
cd JanusX
pip install .

Building from source requires a Rust toolchain (maturin will compile the native core).

Pre-compiled Releases

We provide pre-compiled binaries on the GitHub Releases page for Windows, Linux, and macOS. Download and extract the archive, then run the executable directly.

Running the CLI

jx -h
jx <module> [options]

Note that running jx -h might take a while at first! This is because the Python interpreter is compiling source code into the pycache directory. Subsequent runs will use the pre-compiled code and load much faster!

Available Modules

Module Description
gwas Unified GWAS wrapper (LM/LMM/fastLMM/FarmCPU)
gs Genomic Selection (GBLUP, rrBLUP)
postGWAS Visualization and annotation
grm Genetic relationship matrix calculation
pca Principal component analysis
sim Genotype and phenotype simulation

Quick Start Examples

GWAS Analysis

# Using unified gwas module (select one or more models)
jx gwas --vcf data.vcf.gz --pheno pheno.txt --lmm -o results

# Run multiple models at once
jx gwas --vcf data.vcf.gz --pheno pheno.txt --lm --lmm --fastlmm --farmcpu -o results

# With PLINK format
jx gwas --bfile genotypes --pheno phenotypes.txt --grm 1 --qcov 3 --thread 8 -o results

# With diagnostic plots (SVG)
jx gwas --vcf data.vcf.gz --pheno pheno.txt --lmm --plot -o results

Genomic Selection

# Run both GS models
jx gs --vcf data.vcf.gz --pheno pheno.txt --GBLUP --rrBLUP -o results

# Specific models
jx gs --vcf data.vcf.gz --pheno pheno.txt --GBLUP -o results

# With PCA-based dimensionality reduction
jx gs --vcf data.vcf.gz --pheno pheno.txt --GBLUP --pcd -o results

Visualization

# Generate Manhattan and QQ plots
jx postGWAS -f results/*.lmm.tsv --threshold 1e-6

# With SNP annotation
jx postGWAS -f results/*.lmm.tsv --threshold 1e-6 -a annotation.gff --annobroaden 50

manhanden&qq

Test data in example is from genetics-statistics/GEMMA, published in Parker et al, Nature Genetics, 2016

Population Structure

# Compute GRM
jx grm --vcf data.vcf.gz -o results

# PCA analysis
jx pca --vcf data.vcf.gz --dim 5 --plot --plot3D -o results

Input File Formats

Phenotype File

Tab-delimited, first column is sample ID, subsequent columns are phenotypes:

samples trait1 trait2
indv1 10.5 0.85
indv2 12.3 0.92

Genotype Files

  • VCF: .vcf or .vcf.gz
  • PLINK: .bed/.bim/.fam (use prefix)

Architecture

Core Libraries

  • python/janusx/pyBLUP - Core statistical engine

    • GWAS implementations (LM, LMM, FarmCPU)
    • QK matrix calculation with memory-optimized chunking
    • PCA computation with randomized SVD
    • Cross-validation utilities
  • python/janusx/gfreader - Genotype file I/O

    • VCF reader
    • PLINK binary reader (.bed/.bim/.fam)
    • NumPy format support
  • python/janusx/bioplotkit - Visualization

    • Manhattan and QQ plots
    • PCA visualization (2D and 3D GIF)
    • LD block visualization

Native Core (src/)

Rust kernels for fast linear algebra and association testing.

CLI Entry Points (python/janusx/script/)

Each module corresponds to a CLI command. The launcher script (jx) dispatches to script/<name>.py.

Key Features

  • Two Core Functions: Unified GWAS and GS workflows in one tool
  • Easy to Use: Simple CLI interface, minimal configuration required
  • High Performance: Optimized LMM computation with multi-threading

Key Algorithms

GWAS Methods

Method Description Best For
Linear Model (LM) Standard GLM for association testing Large datasets without population structure
Linear Mixed Model (LMM) Incorporates kinship matrix to control population structure Most GWAS scenarios
fastLMM Fixed-lambda mixed model for speed Fast approximate screening
FarmCPU Iterative fixed/random effect alternation High power with strict false positive control

GS Methods

Method Description Best For
GBLUP Genomic Best Linear Unbiased Prediction Baseline prediction
rrBLUP Ridge Regression BLUP Additive genetic value estimation

Kinship Methods

  • Method 1 (VanRaden): Centered GRM (default)
  • Method 2 (Yang): Standardized/weighted GRM

Python Version

Requires Python 3.10+

Test Data

Example data in example/ directory from Parker et al, Nature Genetics, 2016 (via GEMMA project)

Citation

@software{JanusX,
  title = {JanusX: High-performance GWAS and Genomic Selection Suite},
  author = {Jingxian FU},
  url = {https://github.com/MaizeMan-JxFU/JanusX}
}

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

janusx-1.0.9.tar.gz (2.9 MB view details)

Uploaded Source

Built Distributions

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

janusx-1.0.9-cp313-cp313-win_amd64.whl (508.8 kB view details)

Uploaded CPython 3.13Windows x86-64

janusx-1.0.9-cp313-cp313-manylinux_2_28_x86_64.whl (614.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

janusx-1.0.9-cp313-cp313-macosx_11_0_arm64.whl (537.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

janusx-1.0.9-cp312-cp312-win_amd64.whl (509.8 kB view details)

Uploaded CPython 3.12Windows x86-64

janusx-1.0.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (615.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

janusx-1.0.9-cp312-cp312-macosx_11_0_arm64.whl (537.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

janusx-1.0.9-cp311-cp311-win_amd64.whl (509.9 kB view details)

Uploaded CPython 3.11Windows x86-64

janusx-1.0.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (617.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

janusx-1.0.9-cp311-cp311-macosx_11_0_arm64.whl (537.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

janusx-1.0.9-cp310-cp310-win_amd64.whl (508.9 kB view details)

Uploaded CPython 3.10Windows x86-64

janusx-1.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (617.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

janusx-1.0.9-cp310-cp310-macosx_11_0_arm64.whl (537.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file janusx-1.0.9.tar.gz.

File metadata

  • Download URL: janusx-1.0.9.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for janusx-1.0.9.tar.gz
Algorithm Hash digest
SHA256 19728aac745c4582652dc66dd4da264bfd0a5cc9cc1a3d650cf1e5542edc088b
MD5 f99e4f2fbd0955faa9fa03f829c63add
BLAKE2b-256 1494e6cb80a8c67065723ca8eab11cebb5592b272cb2a3d067b0aaef79322b50

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: janusx-1.0.9-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 508.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for janusx-1.0.9-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a53ebfde7350b3c77cf2e8a8a33a1cb8264f3cf5d53c0dff44f498e83a173090
MD5 137932f736c7c190e34b4ec0ece7d47e
BLAKE2b-256 517a85c3bbca647201c9cc98052ea88bfff4e057bd6875dcadd33e6a3a6b74fc

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for janusx-1.0.9-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22d5762f6870b3dfdda9047b9e47dcf772935fae9200056aa34cbbb81c32f0a7
MD5 086f3d4d9f842f88d38c9d58c8f3a2e4
BLAKE2b-256 233d8615e24af4639f0a57e5e3a32a4bcfbfaf57fe7a0fe0e1118e43c1e17cf5

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for janusx-1.0.9-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5a52be0843947eb5aabe8bb014f836970c7e2c0cf687c3f3091ee4fe6fc9679d
MD5 244a442fa31a8b9da8dc0da0bfc50538
BLAKE2b-256 0c5bbf1ec400020d267a98cae38962636445412461b28cb024532bdbeb7dbcb6

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: janusx-1.0.9-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 509.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for janusx-1.0.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 725f9e3dc3532b915f58ac0d7cce2e85568e3162cd4f35b9fe4eb1e2ab5427a9
MD5 0cb435173a41f0328c665113bdf4cedb
BLAKE2b-256 4260713821214b15c1fe4cbb0eb5a90b9cae332a1aec92dd8b1899f58a208190

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for janusx-1.0.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af553b07b98825a7acac84c5e64bd33eaaff5763cf72ed793c8be15314119c94
MD5 eb7202527e45206611a43ddc80e31295
BLAKE2b-256 6282d041542fbc40cd2b260eb482556fd78c75cb593b7a1476ca4964a1131b4d

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for janusx-1.0.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9aac7c821dab53c2975c11c578c650eb0d96d2b7d25081985c50b705d4e924c2
MD5 aa16681ab9df12bf149cf142c316f929
BLAKE2b-256 010600935edbe34be7bf5cc1099d0001e2257e83880383cfe5ec7d12f9f5b3b7

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: janusx-1.0.9-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 509.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for janusx-1.0.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6635970efa45918a9d3423ff7e7d37f097de4e98e2ce98e9cec0327f484946bd
MD5 e7c252f7db6d02b9a656c387548ef89a
BLAKE2b-256 60249eab92ba7c8b02220cc538377e34d48dcc14cebf4a92a280bfb1fe36e69e

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for janusx-1.0.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8e3d778b3d83d02786cc7edfa3f72b8c90019b6b4acb3e33bb23ab73957e12a
MD5 a7523bebd4513dc539d89e0b699724d7
BLAKE2b-256 f1eb07f9bd0bf52726ca04e16ea5de594590305aa700e37de8ac807e7d3119b1

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for janusx-1.0.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99f5d53a11487796bde948b264c849c2115d696d836585d3fa5a5dc0f0b448dc
MD5 7c39bf3be6854a6e3fb72a06efef1e72
BLAKE2b-256 783c57588b20e5a9dfb9c8b01b8522be208afb130c8ccf0c78dccac79de1ce72

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: janusx-1.0.9-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 508.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for janusx-1.0.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eeaba49b33300e46d3715fda0c1e45126da0b15644c63b480c3781f7744de79e
MD5 efe09682ab6b95dd8a363ccd148d7ace
BLAKE2b-256 75c1d875940618c24d7002f2105aab25ba7a14ad74757fe53a3dd5ede67ade88

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for janusx-1.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a17620afd45215d3481758968dc55ba5dbcac4201de71fd3893390ee0223e18b
MD5 482c897d6008b6b27616a525e3f651f8
BLAKE2b-256 4662580600a1dfc62624d159e1c801a40d44f89a9bc5badfe700166dc4dd099e

See more details on using hashes here.

File details

Details for the file janusx-1.0.9-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for janusx-1.0.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9935986eb5d13578962f11c4491c7e7b9e614574421d2228c6dc7ff647fc3f9e
MD5 3940548692490af2fbc27550bf0d0474
BLAKE2b-256 9ca196f8ee0b9fd3cfc9cf82bd07133362c48c214b8328614e74f9141f2d9e8a

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