HGVS position crossmapper
This library provides an interface to convert (cross map) between different HGVS numbering systems.
Converting between the transcript oriented c. or n. and the genomic oriented g. numbering systems can be difficult, especially when the transcript in question resides on the complement strand.
Features:
Support for genomic positions to standard coordinates and vice versa.
Support for noncoding positions to standard coordinates and vice versa.
Support for coding positions to standard coordinates and vice versa.
Support for protein positions to standard coordinates and vice versa.
Basic classes for loci that can be used for genomic loci other than genes.
Please see ReadTheDocs for the latest documentation.
Quick start
The Genomic class provides an interface to conversions between genomic positions and coordinates.
>>> from mutalyzer_crossmapper import Genomic
>>> crossmap = Genomic()
>>> crossmap.coordinate_to_genomic(0)
1
>>> crossmap.genomic_to_coordinate(1)
0
On top of the functionality provided by the Genomic class, the NonCoding class provides an interface to conversions between noncoding positions and coordinates.
>>> from mutalyzer_crossmapper import NonCoding
>>> exons = [(5, 8), (14, 20), (30, 35), (40, 44), (50, 52), (70, 72)]
>>> crossmap = NonCoding(exons)
>>> crossmap.coordinate_to_noncoding(35)
(14, 1, 0)
>>> crossmap.noncoding_to_coordinate((14, 1))
35
Add the flag inverted=True to the constructor when the transcript resides on the reverse complement strand.
On top of the functionality provided by the NonCoding class, the Coding class provides an interface to conversions between coding positions and coordinates as well as conversions between protein positions and coordinates.
>>> from mutalyzer_crossmapper import Coding
>>> cds = (32, 43)
>>> crossmap = Coding(exons, cds)
>>> crossmap.coordinate_to_coding(31)
(-1, 0, -1, 0)
>>> crossmap.coding_to_coordinate((-1, 0, -1))
31
Again, the flag inverted=True can be used for transcripts that reside on the reverse complement strand.
Conversions between protein positions and coordinates are done as follows.
>>> crossmap.coordinate_to_protein(41)
(2, 2, 0, 0, 0)
>>> crossmap.protein_to_coordinate((2, 2, 0, 0))
41
Metadata
Release files for mutalyzer-crossmapper 2.0.1
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_crossmapper-2.0.1.tar.gz | 6.1 kB | Without provenance | Details for mutalyzer_crossmapper-2.0.1.tar.gz |
Release files / mutalyzer_crossmapper-2.0.1.tar.gz
| Download URL | mutalyzer_crossmapper-2.0.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eba307fce968649bf16c0ed7a4d2de162371f4ae209226637680efc8dd8ed8f3
|
|
BLAKE2b-256 checksum How to use checksums |
5d14932320a45a7bbbc2cff83c39418586daa224c976cc425d20524896e23238
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.4.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.7
|
Security for mutalyzer-crossmapper 2.0.1
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.