Skip to main content

A Boolean Algebra for Genetic Variants

Project description

mutalyzer-algebra

A Boolean Algebra for Genetic Variants

A set of Boolean relations: equivalence; containment, i.e., either a variant is fully contained in another or a variant fully contains another; overlap, i.e., two variants have (at least) one common element; and disjoint, i.e., no common elements that allows for a comprehensive classification of the relation for every pair of variants by taking all minimal Longest Common Subsequence (LCS) alignments into account.

Jonathan K. Vis, Mark Santcroos, Walter A. Kosters and Jeroen F.J. Laros. "A Boolean Algebra for Genetic Variants." (2021)

Installation

Use pip to install from the Python Package Index (PyPI).

python -m pip install mutalyzer-algebra

Or directly from GitHub for development (after cloning in an active virtual environment).

python -m pip install --upgrade --editable .[dev]

Testing

Run the tests.

python -m coverage run -m pytest

Usage

Use the command-line interface.

algebra --reference "AAAAA" compare --lhs-hgvs "1_2insTA" --rhs-hgvs "2_3insT"

Or as a Python package.

from algebra import compare
from algebra.variants import Parser, patch

reference = "AAAAA"
lhs = patch(reference, Parser("1_2insTA").hgvs())
rhs = patch(reference, Parser("2_3insT").hgvs())

# returns: Relation.DISJOINT
compare(reference, lhs, rhs)

See Also

A web interface with integration with Mutalyzer.

Mutalyzer Algebra

Mutalyzer Algebra on PyPI

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

mutalyzer-algebra-1.0.4.tar.gz (13.8 kB view details)

Uploaded Source

File details

Details for the file mutalyzer-algebra-1.0.4.tar.gz.

File metadata

  • Download URL: mutalyzer-algebra-1.0.4.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for mutalyzer-algebra-1.0.4.tar.gz
Algorithm Hash digest
SHA256 c2fad5f6a1d1322920ba2f519ce12a9cab3c1afa2796ddd7fe9517c9a093a423
MD5 bb4ab26a850d4b5ae0b09fab666e4a8b
BLAKE2b-256 0a145813b2519ac8ece1a051be9678a8d4446c0359599f9b0bd06b9ce1ac5f12

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