Skip to main content

lshmm

lshmm is a Python library for prototyping, experimenting, and testing implementations of algorithms using the Li & Stephens (2003) Hidden Markov Model.

Usage

Inputs

Data

  • Sample and/or ancestral haplotypes comprising a reference panel.
  • Query haplotypes.

In the haploid mode, the alleles in haplotypes can be represented by any integer value (besides -1 and -2, which are special values). In the diploid mode, the genotypes (encoded as allele dosages) can be 0 (homozygous for the reference allele), 1 (heterozygous for the alternative allele), or 2 (homozygous for the alternative allele). Currently, multiallelic sites are supported in the haploid mode, but not the diploid mode.

Note that there are two special values NONCOPY and MISSING. NONCOPY (or -2) represent non-copiable states, and can only be found in partial ancestral haplotypes in the reference panel. MISSING (or -1) representing missing data, and can be found only in query haplotypes.

Parameters

  • Recombination probabilities.
  • Mutation probabilities.

Models and algorithms

  • Haploid LS HMM
    • Forward-backward algorithm
    • Viterbi algorithm
  • Diploid LS HMM
    • Forward-backward algorithm
    • Viterbi algorithm

Features

  • Scaling of mutation rate by the number of distinct alleles per site.
  • Non-copiable state in the reference panel (NONCOPY).
  • Missing state in the query (MISSING).
  • Multiallelic sites (haploid only).

Metadata

Release files for lshmm 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lshmm 0.0.8
File Size Uploaded
lshmm-0.0.8.tar.gz 26.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lshmm 0.0.8
File Interpreter ABI Platform
lshmm-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 44.1 kB

Release files / lshmm-0.0.8.tar.gz

Download URL lshmm-0.0.8.tar.gz
Size 26.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0d24eb5ad0a79e17532b85e9971d684ec8895828ca26b450cf63f1627ba7645f
BLAKE2b-256 checksum
How to use checksums
bcd1627b2dd2572e4ccc615b015121b89993fd9b57948ad5c8b185465f59a856
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.5

Release files / lshmm-0.0.8-py3-none-any.whl

Download URL lshmm-0.0.8-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74bac9e8abb71dfa7d9b26bc88bca09397d92e3baa045b134ddf3d814c469bc3
BLAKE2b-256 checksum
How to use checksums
ef036f0eb918cf7f5367b06554847f3174373e3e8d5582b2b2049172c8aacb24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page