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.8.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.8-cp313-cp313-win_amd64.whl (645.0 kB view details)

Uploaded CPython 3.13Windows x86-64

janusx-1.0.8-cp313-cp313-manylinux_2_28_x86_64.whl (747.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

janusx-1.0.8-cp313-cp313-macosx_11_0_arm64.whl (646.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

janusx-1.0.8-cp312-cp312-win_amd64.whl (645.9 kB view details)

Uploaded CPython 3.12Windows x86-64

janusx-1.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

janusx-1.0.8-cp312-cp312-macosx_11_0_arm64.whl (647.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

janusx-1.0.8-cp311-cp311-win_amd64.whl (645.4 kB view details)

Uploaded CPython 3.11Windows x86-64

janusx-1.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

janusx-1.0.8-cp311-cp311-macosx_11_0_arm64.whl (645.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

janusx-1.0.8-cp310-cp310-win_amd64.whl (645.3 kB view details)

Uploaded CPython 3.10Windows x86-64

janusx-1.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

janusx-1.0.8-cp310-cp310-macosx_11_0_arm64.whl (645.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: janusx-1.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 a9499e71ddfdeccab09da9c39c49b3b1bc88e4d1eeca857de51a17b0a37ef72d
MD5 ebb64c8023c4eb5ce2dc7b27db19a71e
BLAKE2b-256 15df368619eff1d06d933f2a743cdbef11b23551678ae282bc268b8ad127ff99

See more details on using hashes here.

File details

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

File metadata

  • Download URL: janusx-1.0.8-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 645.0 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.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3f9376185078f7ebfd34a9e4d2fee12af72346649fe00871b99394ae13e22aed
MD5 b328150e45bba48b5f3561ecdd8c6703
BLAKE2b-256 84857d5948e09b56509f24cbd7929e34a53533216a885e7ac4d6f1f2fce0d252

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for janusx-1.0.8-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c9e16d5acf439d98e65e5c01bca764a91cf742ab0a928980eea54651734e1d0c
MD5 09bdfeec541f286e39b83ea70550de2c
BLAKE2b-256 51e8462698d24227aff1720f3161f368227789202c4aba3b1f82528fa75cd5e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for janusx-1.0.8-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 88f0e6764d29346b991ff0dc8211c9ba417d25dc28db7d6ba7b1d0ed24a7f0ea
MD5 d26d70ff2d8361ef6fe091126cf82e1a
BLAKE2b-256 27d43afd8a23629dff3ffd5b751aa39aab97783294690882f63c43fd6f14c0cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: janusx-1.0.8-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 645.9 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.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6d0e140d0ce882bd0b149065e69c118993a107757fa38537d87621174a42730e
MD5 2507938b77c99632ffc93daf8245690e
BLAKE2b-256 45b0cfd22414b93fa12d25ce7ae606dea541f31d76d1906fdc18b3d7ad30112f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for janusx-1.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd1c01ac2220d28330eb8a8cc0b55b951e9874b4b0afff159d8aaf82565168fb
MD5 b718792046e7ca3010a28939cecfc212
BLAKE2b-256 1250b2f3cae0f7749b2fd32a4d633bf34ec518ce80e3db4b848057348973f645

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for janusx-1.0.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4523f65f6d44510b37f36d7d1cf3b690a52c1f5b2b891aae1eedc38bf10bbc9d
MD5 96dcfc943c2b905533f971e22867428f
BLAKE2b-256 3b52321eb64fb06a25f366c840f7e2ffec55dd9a2a59015912659d7c23102492

See more details on using hashes here.

File details

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

File metadata

  • Download URL: janusx-1.0.8-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 645.4 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.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ee6b41ef559367847c3ffdde06a8f50cb37e729c6044072597d67ce422231fa3
MD5 30d070b7d16e27596f22c57a4133cc20
BLAKE2b-256 e4d324858dc9507be31d52f99f36aff6a572669b558b54ad2ad8159e8622dafc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for janusx-1.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 66f23ebc18a0c73b8599df5deb3db9f0886f972b8321d097292685e64eb04c2d
MD5 f2aa8bcfdd574a1ba6cbed4ba6c21d69
BLAKE2b-256 0c2a853ade072ccda0e9f559e6f129bc19415719c71860f612350f49bce81247

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for janusx-1.0.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a2987eff6f366fadb09ded061e6e24cc6ad1032c1558587d1ad6022799054bdb
MD5 f14026f4b4139fd4fbd6c1027499c189
BLAKE2b-256 a7d8238502ff4fc4567354497e5981a7ab62b00e8fbc82aaa20df31a193bad91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: janusx-1.0.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 645.3 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.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2a427a906c5e5d92273cc64646728350b62db2c214a8ca7986c313daeba667a1
MD5 f1b112c43817cc9f16884e33371cab2a
BLAKE2b-256 7a5a6e0bfbb68302b68e45edcfe4d33d9e740429ab68fb713fc08eb14edf8330

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for janusx-1.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 19d3fd40a15c8f634a1629357951136919a3bf23175b4c10ebf44563dbf7df41
MD5 e4d79b04a461c90802cd2d53ee8c8852
BLAKE2b-256 58ef2de8ed3bf70ea86f3742b306bd88599eef65f7ee4bd9fbc94ba75dc97bb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for janusx-1.0.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4d2c59c264fd523b5093a01bed3939bf0b06774b9b3610cd8a122ed02a445ae
MD5 3b1a50789d4cf5d519a5b147d423dc37
BLAKE2b-256 76bf976474d72e098b5a1a6f69b42c5e8419ff36c8750c33d1ff0c6fa26b8507

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