Skip to main content

A command-line tool for sex inference from genomic data using zygosity distributions

Project description

Zigo: Sex Checking by Zigosity Distributions

A command-line tool for sex inference from genomic data. This tool uses a distilled polynomial equation to predict genetic sex from SNP zygosity distributions and can compare predictions with provided PED files.

Installation

We are working on publishing this package to PyPI. In the meantime, you can install the latest version directly from the repository using pip:

pip install git+https://github.com/AI-sandbox/zigo.git

Key Features

  • Genetic Sex Prediction: Accurately predicts genetic sex from genomic data using a machine learning model
  • PED File Integration: Optional comparison with provided sex information from PED files (requires "Individual ID" and "Gender" columns)
  • Comprehensive Logging: Detailed logs of the analysis process

Usage

zigo -i INPUT_FILE -o OUTPUT_DIR [--ped PED_FILE]

Arguments

  • -i, --input: Path to the genomic input file (.vcf, .vcf.gz, .bed, .pgen)
  • -o, --output: Directory for saving results
  • --ped: (Optional) Path to the PED file containing 'Individual ID' and 'Gender' columns

Input Format Requirements

  • Genomic Data: Supports .bed, .pgen, and includes a high-performance C-based reader for .vcf and .vcf.gz.
  • PED File: Tab-separated file with at least two columns:
    • 'Individual ID': Sample identifiers matching those in the genomic data
    • 'Gender': Sex information coded as 1 (male) or 2 (female)

Output Files

  • results.sexcheck: Main results file with sex predictions, containing the following columns:

    • FID: Family ID (same as IID in this implementation)
    • IID: Individual ID
    • SID: Sample ID (same as IID in this implementation)
    • PEDSEX: Sex as provided in the PED file (1=male, 2=female, NA=not available)
    • SNPSEX: Predicted sex from SNP data (1=male, 2=female)
    • STATUS: Comparison result ("OK" if PEDSEX matches SNPSEX, "PROBLEM" if they differ)
    • F: Probability score for the predicted sex label

    Columns related to Y chromosome have been skipped.

  • results.nosex: List of samples with no sex information

  • sexcheck.log: Detailed log of the analysis process

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Cite

If you use Zigo in your research, please cite the source code.

📝 Note: Preprint will be published soon! Once published, we will update this section with the official citation.

In the meantime, please cite the repository as follows:

BibTeX:

@misc{zigo_2026,
  author = {Oscar Molina-Sedano, Daniel Mas Montserrat and Alexander Ioannidis},
  title = {Zigo: Sex Checking by Zigosity Distributions},
  year = {2026},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{[https://github.com/AI-sandbox/sex-check](https://github.com/AI-sandbox/sex-check)}}
}

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

zigo-0.1.1.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

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

zigo-0.1.1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file zigo-0.1.1.tar.gz.

File metadata

  • Download URL: zigo-0.1.1.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for zigo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 779f5e5660cea300b013ef4a472f24e3d66f193deb5edfe429f23caf5b2edb56
MD5 9410e98fdfec39796fd2f9b2f5907e89
BLAKE2b-256 e08a6fcf966b8c900046f824bf82d6f49a1842db18185e1654334af54c842a58

See more details on using hashes here.

File details

Details for the file zigo-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zigo-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for zigo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd8cbfd6a78a518505165122075c30bc5bf4232c6492769c152a02e60c10c31e
MD5 d8265b141ad9776fd1e0005ecf6b2443
BLAKE2b-256 9e205be2aa38b2467c18fa2e5c83d277954432d89e2ce89f770bf05b1c15da93

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