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.
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
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 parse_hgvs
reference = "AAAAA"
lhs = parse_hgvs("1_2insTA")
rhs = parse_hgvs("2_3insT")
# returns: Relation.DISJOINT
compare(reference, lhs, rhs)
reference = "CATATATC"
lhs = parse_hgvs("2_7AT[4]") # observed: CATATATATC
rhs = parse_hgvs("5_6insT") # observed: CATATTATC
# returns: Relation.CONTAINS
compare(reference, lhs, rhs)
Extracting variants from sequences.
from algebra.extractor import extract_sequence, to_hgvs
reference = "CATATATC"
observed = "CATATATATC"
canonical, _ = extract_sequence(reference, observed)
# returns: 2_7AT[4]
to_hgvs(canonical, reference)
Variant normalization.
from algebra.extractor import extract, to_hgvs
from algebra.variants import parse_hgvs
reference = "CATATATC"
variant = parse_hgvs("6_7dupAT")
canonical, _ = extract(reference, variant)
# returns: 2_7AT[4]
to_hgvs(canonical, reference)
See Also
A web interface with integration with Mutalyzer: Mutalyzer Algebra
Metadata
Release files for mutalyzer-algebra 1.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mutalyzer_algebra-1.5.2.tar.gz | 20.6 kB | Without provenance | Details for mutalyzer_algebra-1.5.2.tar.gz |
Release files / mutalyzer_algebra-1.5.2.tar.gz
| Download URL | mutalyzer_algebra-1.5.2.tar.gz |
|---|---|
| Size | 20.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7f5d6c1ee65a86dcc3042b6dc6e125a52cee507e9e265cdf630c2441a6f2b02
|
|
BLAKE2b-256 checksum How to use checksums |
83a72a08553bb877ee527d99db123967e461a273b75f2941a489a238a7a856fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|
Security for mutalyzer-algebra 1.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.