Metadata-Version: 2.4
Name: gene-normalizer
Version: 0.11.1
Summary: VICC normalization routines for genes
Author: Alex Wagner, Kori Kuzma, James Stevenson
License-Expression: MIT
Project-URL: Homepage, https://github.com/cancervariants/gene-normalization
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: Bug Tracker, https://github.com/cancervariants/gene-normalization/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Framework :: Pydantic
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic==2.*
Requires-Dist: pydantic-settings
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: click
Requires-Dist: boto3
Requires-Dist: ga4gh.vrs<3.0,>=2.2.0
Provides-Extra: pg
Requires-Dist: psycopg[binary]; extra == "pg"
Provides-Extra: etl
Requires-Dist: gffutils; extra == "etl"
Requires-Dist: biocommons.seqrepo; extra == "etl"
Requires-Dist: wags-tails~=0.4.0; extra == "etl"
Requires-Dist: setuptools; extra == "etl"
Provides-Extra: tests
Requires-Dist: pytest>=6.0; extra == "tests"
Requires-Dist: pytest-cov; extra == "tests"
Requires-Dist: mock; extra == "tests"
Requires-Dist: httpx; extra == "tests"
Requires-Dist: pyyaml; extra == "tests"
Requires-Dist: jsonschema; extra == "tests"
Requires-Dist: jsonschema~=4.24; extra == "tests"
Requires-Dist: deepdiff; extra == "tests"
Provides-Extra: dev
Requires-Dist: prek>=0.2.23; extra == "dev"
Requires-Dist: fastapi[standard]; extra == "dev"
Requires-Dist: ruff==0.14.10; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx==6.1.3; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints==1.22.0; extra == "docs"
Requires-Dist: sphinx-autobuild==2021.3.14; extra == "docs"
Requires-Dist: sphinx-copybutton==0.5.2; extra == "docs"
Requires-Dist: sphinxext-opengraph==0.8.2; extra == "docs"
Requires-Dist: furo==2023.3.27; extra == "docs"
Requires-Dist: gravis==0.1.0; extra == "docs"
Requires-Dist: sphinx-github-changelog==1.2.1; extra == "docs"
Requires-Dist: sphinx-click==5.0.1; extra == "docs"
Dynamic: license-file

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

[![image](https://img.shields.io/pypi/v/gene-normalizer.svg)](https://pypi.python.org/pypi/gene-normalizer) [![image](https://img.shields.io/pypi/l/gene-normalizer.svg)](https://pypi.python.org/pypi/gene-normalizer) [![image](https://img.shields.io/pypi/pyversions/gene-normalizer.svg)](https://pypi.python.org/pypi/gene-normalizer) [![Actions status](https://github.com/cancervariants/gene-normalization/actions/workflows/checks.yaml/badge.svg)](https://github.com/cancervariants/gene-normalization/actions/workflows/checks.yaml) [![DOI](https://zenodo.org/badge/309797998.svg)](https://zenodo.org/badge/latestdoi/309797998)

## Overview
<!-- description -->
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.
<!-- /description -->
---

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

**[Documentation](https://gene-normalizer.readthedocs.io/latest/)** · [Installation](https://gene-normalizer.readthedocs.io/latest/install.html) · [Usage](https://gene-normalizer.readthedocs.io/latest/usage.html) · [API reference](https://gene-normalizer.readthedocs.io/latest/api/index.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/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": {
        "conceptType": "Gene",
        "id": "normalize.gene.hgnc:1097"
        "primaryCoding": {
            "id": "hgnc:1097",
            "code": "HGNC:1097",
            "system": "https://www.genenames.org/data/gene-symbol-report/#!/hgnc_id/",
        },
        "name": "BRAF",
        "extensions": [
            {
                "name": "aliases",
                "value": [
                    "BRAF1",
                    "B-RAF1",
                    "NS7",
                    "RAFB1",
                    "B-raf",
                    "BRAF-1"
                ]
            }
        ]
    }
    # ...
}
```

Or utilize the [Python API](https://gene-normalizer.readthedocs.io/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")
>>> result.gene.primaryCoding.id
'hgnc:6407'
```

See the [usage](https://gene-normalizer.readthedocs.io/latest/usage.html) and [normalization](https://gene-normalizer.readthedocs.io/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/latest/contributing.html) contains guidance for submitting feedback and contributing new code.
