Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
379e565
Use hgvs_position_model dataclass for HGVS position results
Feb 19, 2026
bbd38da
Add function to convert from tuple to HGVSPositionModel
Feb 19, 2026
5122c55
Refactor(locus):return dict position model and update test
Feb 20, 2026
836d7d3
Refactor(multi_locus):return dict position model and update test
Feb 20, 2026
89cdba7
Fix typo
Feb 20, 2026
2d4e2eb
Refactor(crossmapper): convert Genomic to dict-based position model
Feb 20, 2026
923cd9f
Refactor(crossmapper): convert NonCoding to dict-based position model
Feb 20, 2026
259481b
Refactor (locus, multi_locus): allow 'u', 'd' for UTR areas in hgvs m…
Feb 20, 2026
55fd346
Refactor test modules for Genomic and NonCoding
Feb 20, 2026
84127e5
Remove 'region' in locus position model
Feb 26, 2026
eb6ce9b
Refactor(multi_locus): replace tuple with dict
Feb 26, 2026
7d7bc9b
Refactor crossmapper and tests, allow ''/*/- in position model for Co…
Feb 26, 2026
0433303
Refactor(multi_locus): degenerate positions for multi_locus and tests
Feb 26, 2026
a583f00
Refactor(crossmapper): implement hgvs position model for protein and …
Feb 27, 2026
a57a3e6
Refactor(crossmapper): discard degenerate option
Mar 5, 2026
d245cd6
Change examples in README.
Mar 5, 2026
89559e4
Discard dataclass object for hgvs position model
Mar 6, 2026
08739ff
Refactor(crossmapper): allow degenerate option for 'u' and 'd' area
Mar 6, 2026
fecf026
Cleanup(locus)
Mar 9, 2026
54746ec
Cleanup(multi_locus)
Mar 9, 2026
5ba6a5a
Cleanup(multi_locus)
Mar 9, 2026
7f32afc
Format(multi locus test)
Mar 9, 2026
e23fe2a
Cleanup(crossmapper): on Genomic and NonCoding
Mar 9, 2026
8f05341
Cleanup
Mar 9, 2026
09f721f
Refactor degenerate tests
Mar 10, 2026
abead48
Add position model description for g.,n.,c.,and p.
Mar 10, 2026
b528f92
Format document
Mar 10, 2026
6c1b52e
Format document
Mar 10, 2026
b871601
Format document
Mar 10, 2026
9e91d1d
Format document in .rst style
Mar 10, 2026
35359b8
Format document in .rst style
Mar 10, 2026
d48f99d
Format and add an example
Mar 10, 2026
d16278b
Add table for Genomic positions and coordinate mapping
Mar 10, 2026
b29309a
Format table
Mar 10, 2026
d1c4c2f
Format table
Mar 10, 2026
7966a14
Format table
Mar 10, 2026
035c479
Add tables
Mar 10, 2026
f116376
Fix table syntax
Mar 10, 2026
89787e6
Fix table syntax
Mar 10, 2026
5e601dc
Fix table syntax
Mar 10, 2026
751bc3b
Fix table syntax
Mar 10, 2026
9d156c8
Fix table indent
Mar 10, 2026
ebbb90a
Update README.rst
XLIU-hub Mar 10, 2026
9ffa9bf
Make scrollable tables in README
XLIU-hub Mar 10, 2026
90f3d71
Update README.rst
XLIU-hub Mar 10, 2026
93f59ca
Update README.rst
XLIU-hub Mar 10, 2026
0ef6003
Format table
Mar 10, 2026
2704e52
Use code block for table
XLIU-hub Mar 10, 2026
78183fd
Update README.rst
XLIU-hub Mar 10, 2026
03309a8
Refactor: crossmapper and tests for degenerate option
Mar 10, 2026
fccc275
Add surpport for degenerate position model as input
Mar 11, 2026
00e98bd
Add degenerate tests
Mar 11, 2026
e281d64
Cleanup
Mar 11, 2026
925cb56
Cleanup
Mar 11, 2026
5f2bef7
Local copy before checkout
Mar 11, 2026
55fe797
Update table for Genomic and NonCoding classes in document
XLIU-hub Mar 11, 2026
a2003b3
Update table for Coding class in document
XLIU-hub Mar 11, 2026
4d9089a
Add HGVS column in coding table
XLIU-hub Mar 11, 2026
1542894
Fix sytax
XLIU-hub Mar 11, 2026
75a5cba
Update protein example in document
XLIU-hub Mar 11, 2026
b0ed66f
Add protein table in document
XLIU-hub Mar 12, 2026
16e9a62
Fix typo
XLIU-hub Mar 12, 2026
d6c868d
Add tests
Mar 13, 2026
9f24c53
Merge branch 'tuple_to_dataclass' of github.com:mutalyzer/crossmapper…
Mar 13, 2026
41bd3d5
Refactor crossmap
Mar 13, 2026
1752363
Cleanup
Mar 13, 2026
31f483a
Cleanup
Mar 13, 2026
eeacf85
Cleanup
Mar 13, 2026
bb8ee66
Cleanup
Mar 13, 2026
87f507d
Add missing tests
Mar 13, 2026
e5d7342
Add missing tests
Mar 13, 2026
53954d3
Refactor
Mar 13, 2026
6cb7d32
Cleanup
Mar 20, 2026
3e32bb9
Cleanup and add tests
Mar 20, 2026
186e2a6
Update tables in documentation
XLIU-hub Mar 20, 2026
617b126
Update README.rst
XLIU-hub Mar 20, 2026
4fddbc3
Use single quate for dictionary
Mar 20, 2026
2c7d005
Merge branch 'tuple_to_dataclass' of github.com:mutalyzer/crossmapper…
Mar 20, 2026
f85b25f
Delete table
XLIU-hub Mar 20, 2026
ca4379e
Update README.rst
XLIU-hub Mar 20, 2026
072719d
Update library, replace tuple with dictionary
Mar 20, 2026
69c81c2
Merge branch 'tuple_to_dataclass' of github.com:mutalyzer/crossmapper…
Mar 20, 2026
fba6b95
Use python code block in library.rst
XLIU-hub Mar 20, 2026
ca45f67
Update library.rst
XLIU-hub Mar 20, 2026
e4e1642
Update library.rst
XLIU-hub Mar 20, 2026
b630851
Update library.rst
XLIU-hub Mar 20, 2026
a0514c8
Update library.rst
XLIU-hub Mar 20, 2026
21ce8dd
Update library.rst
XLIU-hub Mar 20, 2026
6fc7709
Update library.rst
XLIU-hub Mar 20, 2026
1693bab
Update library.rst
XLIU-hub Mar 20, 2026
9bb4501
Add backticks
Mar 20, 2026
9ceea41
Merge branch 'tuple_to_dataclass' of github.com:mutalyzer/crossmapper…
Mar 20, 2026
691ec35
Cleanup
Mar 20, 2026
bcf7bd2
Cleanup, use '' in dictionary
Mar 20, 2026
2f167e0
Cleanup, use typings
Mar 20, 2026
ac0cd16
Cleanup
Mar 23, 2026
2ebf6c9
Cleanup
Mar 23, 2026
f2e8efa
Stop trackinhg local file
Mar 23, 2026
4e6443c
Delete tmp files from branch
Mar 23, 2026
8deedc1
Cleanup
Mar 23, 2026
f5f7a51
Refactor protein conversion
Mar 23, 2026
79cbcc0
Add degenerate tests
Mar 23, 2026
1459451
Add backticks for region in table
Mar 23, 2026
e92c78e
Cleanup
Mar 23, 2026
f810567
Discard normalize position model
Mar 25, 2026
c5d7732
Fix test
Mar 25, 2026
49ecb5f
Add degenerate for NonCoding
Mar 26, 2026
7849195
Add tests for degenerate in NonCoding
Mar 26, 2026
7c3cdde
Update document
Mar 26, 2026
651d170
Formatting
Mar 26, 2026
21f8458
Update library.rst
XLIU-hub Mar 26, 2026
34d0844
Fix typo
Mar 26, 2026
8873a77
Update .gitignore
XLIU-hub Mar 26, 2026
c9e58c6
Set upstream and downstream in multilocus as 0 based
Mar 27, 2026
783223d
Fix typing mistake
Mar 27, 2026
a7196f4
Use importlib instead of pkg_resources
XLIU-hub Mar 27, 2026
88ce74f
Fix typing and single quote
Mar 30, 2026
6d5e282
Fix doc string
Mar 30, 2026
8fba978
Update python version in setup
Mar 30, 2026
2867ea8
Rename multilocus positon model
Mar 30, 2026
12229cd
Remove unneccessary elif
Mar 30, 2026
c6455e9
Fix flake8 whitespace issues
Mar 30, 2026
12e8e1f
Fix whitespaces
Mar 30, 2026
e2f2a43
Add tests for protein positions from the reverse strand
Mar 30, 2026
50d50b5
Rename external (input/output) variable to pos_m and add test for a o…
Mar 31, 2026
73e2965
Fix typo and font
Mar 31, 2026
3ec8ab4
Update degenerate for noncoding and tests
Apr 1, 2026
ba091d5
Update degenerate for noncoding example in documentation
Apr 1, 2026
39d1d6b
Discard unneccessary functions for coding
Apr 1, 2026
915e845
Cleanup
Apr 1, 2026
69eb985
Fix error for inverted coding
Apr 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ 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.
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.
resides on the complement strand. This library provides functions to convert between any HGVS
numbering system to standard (0-based) coordinates and vice versa.

**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.
- Support for genomic (``g.``, ``m.``, ``o.``) positions to standard coordinates and vice versa.
- Support for noncoding (``n.``, ``r.``) positions to standard coordinates and vice versa.
- Support for coding (``c.``, ``r.``) positions to standard coordinates and vice versa.
- Support for protein (``p.``) positions to standard coordinates and vice versa.
- Basic classes that can be used for loci other than genes or transcripts.

Please see ReadTheDocs_ for the latest documentation.


Quick start
-----------

Expand All @@ -53,8 +53,8 @@ positions and coordinates.
>>> from mutalyzer_crossmapper import Genomic
>>> crossmap = Genomic()
>>> crossmap.coordinate_to_genomic(0)
1
>>> crossmap.genomic_to_coordinate(1)
{'position': 1}
>>> crossmap.genomic_to_coordinate({'position': 1})
0

On top of the functionality provided by the ``Genomic`` class, the
Expand All @@ -67,8 +67,8 @@ positions and coordinates.
>>> 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))
{'position': 14, 'offset': 1, 'region': ''}
>>> crossmap.noncoding_to_coordinate({'position': 14, 'offset': 1, 'region': ''})
35

Add the flag ``inverted=True`` to the constructor when the transcript resides
Expand All @@ -84,8 +84,8 @@ coordinates as well as conversions between protein positions and coordinates.
>>> cds = (32, 43)
>>> crossmap = Coding(exons, cds)
>>> crossmap.coordinate_to_coding(31)
(-1, 0, -1, 0)
>>> crossmap.coding_to_coordinate((-1, 0, -1))
{'position': 1, 'offset': 0, 'region': '-'}
>>> crossmap.coding_to_coordinate({'position':1, 'offset':0, 'region':'-'})
31

Again, the flag ``inverted=True`` can be used for transcripts that reside on
Expand All @@ -96,10 +96,11 @@ Conversions between protein positions and coordinates are done as follows.
.. code:: python

>>> crossmap.coordinate_to_protein(41)
(2, 2, 0, 0, 0)
>>> crossmap.protein_to_coordinate((2, 2, 0, 0))
{'position': 2, 'position_in_codon': 2, 'offset': 0, 'region': ''}
>>> crossmap.protein_to_coordinate({'position': 2, 'position_in_codon': 2, 'offset': 0, 'region': ''})
41



.. _numbering: http://varnomen.hgvs.org/bg-material/numbering/
.. _ReadTheDocs: https://mutalyzer-crossmapper.readthedocs.io
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
release = _get_metadata('Version')

autoclass_content = 'both'
extensions = ['sphinx.ext.autodoc']
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx'
]
master_doc = 'index'
Loading
Loading