Metadata-Version: 2.1
Name: gene-normalizer
Version: 0.1.40.dev0
Summary: VICC normalization routine for genes
Home-page: https://github.com/cancervariants/gene-normalization
Author: VICC
Author-email: help@cancervariants.org
License: MIT
Project-URL: Documentation, https://gene-normalizer.readthedocs.io/en/latest/
Project-URL: Changelog, https://github.com/cancervariants/gene-normalization/releases
Project-URL: Source, https://github.com/cancervariants/gene-normalization
Project-URL: Tracker, https://github.com/cancervariants/gene-normalization/issues
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: boto3
Requires-Dist: click
Requires-Dist: fastapi
Requires-Dist: ga4gh.vrsatile.pydantic (~=0.0.12)
Requires-Dist: ga4gh.vrs (~=0.8.1)
Requires-Dist: pydantic
Requires-Dist: uvicorn
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: ipykernel ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: ruff ; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo (==2023.3.27) ; extra == 'docs'
Requires-Dist: gravis (==0.1.0) ; extra == 'docs'
Requires-Dist: sphinx-autobuild (==2021.3.14) ; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints (==1.22.0) ; extra == 'docs'
Requires-Dist: sphinx-copybutton (==0.5.2) ; extra == 'docs'
Requires-Dist: sphinx (==6.1.3) ; extra == 'docs'
Requires-Dist: sphinxext-opengraph (==0.8.2) ; extra == 'docs'
Provides-Extra: etl
Requires-Dist: biocommons.seqrepo ; extra == 'etl'
Requires-Dist: gffutils ; extra == 'etl'
Provides-Extra: pg
Requires-Dist: psycopg[binary] ; extra == 'pg'
Provides-Extra: test
Requires-Dist: mock ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'

<h1 align="center">
Gene Normalizer
</h1>

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gene-normalizer?color=gr) [![tests](https://github.com/cancervariants/gene-normalization/actions/workflows/github-actions.yml/badge.svg)](https://github.com/cancervariants/gene-normalization/actions/workflows/github-actions.yml) [![DOI](https://zenodo.org/badge/309797998.svg)](https://zenodo.org/badge/latestdoi/309797998)

## Overview

The Gene Normalizer provides tools for resolving ambiguous human gene references to consistently-structured, normalized terms. For gene concepts extracted from [NCBI Gene](https://www.ncbi.nlm.nih.gov/gene/), [Ensembl](https://useast.ensembl.org/index.html), and [HGNC](https://www.genenames.org/), it designates a [CURIE](https://en.wikipedia.org/wiki/CURIE), and provides additional metadata like current and previously-used symbols, aliases, database cross-references and associations, and coordinates.

---

**[Live service](https://normalize.cancervariants.org/gene)**

**[Documentation](https://gene-normalizer.readthedocs.io/en/latest/.html)** · [Installation](https://gene-normalizer.readthedocs.io/en/latest/install.html) · [Usage](https://gene-normalizer.readthedocs.io/en/latest/usage.html) · [API reference](https://gene-normalizer.readthedocs.io/en/latest/api/api.html)

---

## Install

The Gene Normalizer is available on [PyPI](https://pypi.org/project/gene-normalizer/):

```shell
python3 -m pip install gene-normalizer
```

See [installation instruction](https://gene-normalizer.readthedocs.io/en/latest/install.html) in the documentation for a description of installation options and data setup requirements.

## Examples

Use the [live service](https://normalize.cancervariants.org/gene) to programmatically normalize gene terms, as in the following truncated example:

```shell
$ curl 'https://normalize.cancervariants.org/gene/normalize?q=BRAF' | python -m json.tool
{
    "query": "BRAF",
    "match_type": 100,
    "gene_descriptor": {
        "label": "BRAF",
        "gene_id": "hgnc:1097",
        "xrefs": [
            "ensembl:ENSG00000157764",
            "ncbigene:673"
        ],
        "alternate_labels": [
            "BRAF1",
            "B-RAF1",
            "NS7",
            "RAFB1",
            "B-raf",
            "BRAF-1"
        ]
    }
    # ...
}
```

Or utilize the [Python API](https://gene-normalizer.readthedocs.io/en/latest/api/query_api.html) for fast access:

```python
>>> from gene.database import create_db
>>> from gene.query import QueryHandler
>>> q = QueryHandler(create_db())
>>> result = q.normalize("KRAS")
>>> print(result.gene_descriptor.gene_id)
"hgnc:6407"
```

See the [usage](https://gene-normalizer.readthedocs.io/en/latest/usage.html) and [normalization](https://gene-normalizer.readthedocs.io/en/latest/normalizing_data/normalization.html) entries in the documentation for more.

---

## Feedback and contributing

We welcome bug reports, feature requests, and code contributions from users and interested collaborators. The [documentation](https://gene-normalizer.readthedocs.io/en/latest/contributing.html) contains guidance for submitting feedback and contributing new code.


