Skip to main content

Mutalyzer SPDI variant description parser.

Project description

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'}

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_spdi_parser-0.2.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

mutalyzer_spdi_parser-0.2.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file mutalyzer_spdi_parser-0.2.0.tar.gz.

File metadata

  • Download URL: mutalyzer_spdi_parser-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for mutalyzer_spdi_parser-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e4ac0037470e93b0de348703df9c5000ea19fd91621cadae390fd530a36af42b
MD5 b91b70aa4655f57a66785c83035c5f04
BLAKE2b-256 0288cf0c1c1e5d52ea7399c25618ffedf5e56d56276f1d09785a0ddfc87214da

See more details on using hashes here.

Provenance

File details

Details for the file mutalyzer_spdi_parser-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mutalyzer_spdi_parser-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for mutalyzer_spdi_parser-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25acc79dae1d7031e0629956cad3cd9d0bce408caaf489aa19eab3a1dee84395
MD5 b4d7274dd05de1dcce6ee339ea1d7334
BLAKE2b-256 3eb032d9913eb244ac920e2029e9505d890c1918ea1ca6fef31afa2cf6655b27

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page