Skip to main content

No project description provided

Project description

TinkerHap - Read-Based Phasing Algorithm with Integrated Multi-Method Support for Enhanced Accuracy

Overview

TinkerHap is an accurate read-based phasing tool that integrates multiple methodologies to enhance phasing accuracy. It is designed to efficiently phase genomic data by linking sequencing reads across heterozygous sites, extending haplotype blocks, and incorporating pre-phased data when available.

The full paper detailing the methodology and validation of TinkerHap is available at bioRxiv DOI: https://doi.org/10.1101/2025.02.16.638517.

Key Features:

  • Hybrid Phasing Approach: Combines read-based phasing with statistical or pedigree-based methods for increased accuracy.
  • Broad Compatibility: Works with both short-read and long-read sequencing data.
  • High Accuracy: Achieves superior phasing accuracy for both SNPs and indels.
  • Customizable Outputs: Generates phased VCF, annotated BAM, and haplotype BED files.

Requirements

  • Python: >= 3.8.10
  • Dependencies:
    • pysam==0.22.1

Install dependencies using:

pip install pysam==0.22.1

Installation

TinkerHap can be installed either by using pip or directly by cloning the repo and running the python script.

  1. Using pip:
pip install tinkerhap
tinkerhap --help
  1. Using git: Clone the repository and navigate to the project directory:
git clone https://github.com/DZeevi-Lab/TinkerHap.git
cd TinkerHap
python ./tinkerhap.py --help

Usage

TinkerHap is executed via command-line arguments. Below are the available options:

Required Arguments:

  • -vi or --vcf-in: Input VCF file.
  • -bi or --bam-in: Input BAM file.

Optional Arguments:

  • -s or --sample: Sample ID to phase.
  • -vs or --vcf-scaffold: Input phased VCF file for scaffold-based phasing.
  • -vo or --vcf-out: Output phased VCF file.
  • -bo or --bam-out: Output BAM file (annotated with phasing information).
  • -ei or --bed-in: Input BED file defining regions to phase.
  • -eo or --bed-out: Output BED file with haplotype blocks.
  • -r or --region: Specific region to phase in the format RNAME[:STARTPOS[-ENDPOS]].
  • -fmq or --filter-map-quality: Minimum mapping quality (default: 20).
  • -md or --max-depth: Maximum read depth to examine (default: 100).
  • -l or --log-file: Log file path for execution logs.
  • -q or --quiet: Quiet mode (suppress console output).

Example Command:

python tinkerhap.py -vi input.vcf -bi input.bam -vo phased_output.vcf -bo phased_output.bam -r chr1:100000-200000

Outputs

  1. Phased VCF: Contains phased variants annotated with phase set (PS) and haplotype information.
  2. Annotated BAM: Includes phasing information (HP and HT tags).
  3. Split BAM Files: Separate BAM files for each haplotype.
  4. Haplotype BED File: Defines haplotype block boundaries for visualization.

Evaluation

TinkerHap demonstrates high accuracy in phasing both short-read and long-read sequencing data:

  • Short-Read Accuracy: Up to 96.3% (with hybrid approach).
  • Long-Read Accuracy: 97.5%.
  • Extended Haplotype Blocks: Median size of 79,449 base pairs with long-reads.

License

TinkerHap is distributed under the MIT License. See LICENSE for details.

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

tinkerhap-1.0.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

TinkerHap-1.0.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file tinkerhap-1.0.0.tar.gz.

File metadata

  • Download URL: tinkerhap-1.0.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for tinkerhap-1.0.0.tar.gz
Algorithm Hash digest
SHA256 785604ffc40019f8739a4bdd21d59b72aa65cf95384cd649bf3dea10a95ffe13
MD5 666fa3641a925ebccc2604700236b089
BLAKE2b-256 0d46fff5e2248f47d35fa905c5330de23dec42eaf43745319e3f8a6dbe7a5e75

See more details on using hashes here.

File details

Details for the file TinkerHap-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: TinkerHap-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for TinkerHap-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3857dac3e7465dae406ecfc2d23ff27fd605f6c8f9f284f95da539c91c83a442
MD5 da7aef3791fa66f25e6ca501d8c981aa
BLAKE2b-256 c8188f9286574c9f0fb66e73e6a19140c6a8b33e4204d19bda85e36c1c4644a0

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