Skip to main content

Mutalyzer HGVS Parser

.. image:: https://img.shields.io/github/last-commit/mutalyzer/spdi-parser.svg :target: https://github.com/mutalyzer/spdi-parser/graphs/commit-activity .. image:: https://readthedocs.org/projects/mutalyzer-spdi-parser/badge/?version=latest :target: https://mutalyzer-spdi-parser.readthedocs.io/en/latest .. image:: https://img.shields.io/github/release-date/mutalyzer/spdi-parser.svg :target: https://github.com/mutalyzer/spdi-parser/releases .. image:: https://img.shields.io/github/release/mutalyzer/spdi-parser.svg :target: https://github.com/mutalyzer/spdi-parser/releases .. image:: https://img.shields.io/pypi/v/mutalyzer-spdi-parser.svg :target: https://pypi.org/project/mutalyzer-spdi-parser/ .. image:: https://img.shields.io/github/languages/code-size/mutalyzer/spdi-parser.svg :target: https://github.com/mutalyzer/spdi-parser .. image:: https://img.shields.io/github/languages/count/mutalyzer/spdi-parser.svg :target: https://github.com/mutalyzer/spdi-parser .. image:: https://img.shields.io/github/languages/top/mutalyzer/spdi-parser.svg :target: https://github.com/mutalyzer/spdi-parser .. image:: https://img.shields.io/github/license/mutalyzer/spdi-parser.svg :target: https://raw.githubusercontent.com/mutalyzer/spdi-parser/master/LICENSE.md


Package to syntax check and convert SPDI descriptions into a dictionary model.

Quick start

Parse and convert a description from the command line:

.. code-block:: console

$ mutalyzer_spdi_parser -cs "NG_012337.3:10:C:T"
{
  "seq_id": "NG_012337.3",
  "position": 10,
  "deleted_sequence": "C",
  "inserted_sequence": "T"
}

$ mutalyzer_spdi_parser -ch "NG_012337.3:10:C:T"
{
  "type": "description_dna",
  "reference": {
    "id": "NG_012337.3"
  },
  "variants": [
    {
      "type": "deletion_insertion",
      "location": {
        "type": "range",
        "start": {
          "type": "point",
          "position": 10
        },
        "end": {
          "type": "point",
          "position": 11
        }
      },
      "deleted": [
        {
          "sequence": "C",
          "source": "description"
        }
      ],
      "inserted": [
        {
          "sequence": "T",
          "source": "description"
        }
      ]
    }
  ]
}

The to_hgvs_internal_model() function can be used to obtain the equivalent HGVS dictionary model (deletion insertion variants with internal locations and indexing):

.. code:: python

>>> from mutalyzer_spdi_parser import to_hgvs_internal_model
>>> model = to_hgvs_internal_model("NG_012337.3:10:C:T")
>>> model['reference']
{'id': 'NG_012337.3'}

Metadata

Release files for mutalyzer-spdi-parser 0.3.1

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

Source distribution (sdist)

Source distribution for mutalyzer-spdi-parser 0.3.1
File Size Uploaded
mutalyzer_spdi_parser-0.3.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mutalyzer-spdi-parser 0.3.1
File Interpreter ABI Platform
mutalyzer_spdi_parser-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / mutalyzer_spdi_parser-0.3.1.tar.gz

Download URL mutalyzer_spdi_parser-0.3.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6211cf4feb548298a8227709511e983621928e0442af4f96d27a8d2a5d3b6af7
BLAKE2b-256 checksum
How to use checksums
9f70f05095de552332a40e8403b08c392a6c558287d836b1001ceaad443876bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.8.5

Release files / mutalyzer_spdi_parser-0.3.1-py3-none-any.whl

Download URL mutalyzer_spdi_parser-0.3.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07ac3ebf8b3b2cbfcbd1a8d80ec404b74454e59642a79000fdfd174f7b2891e7
BLAKE2b-256 checksum
How to use checksums
e615627fbc7d918c8ae278ac8ad01691fd5fd49bb5cd96517da7fa01937af1ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

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