Metadata-Version: 2.1
Name: gene-normalizer
Version: 0.3.1
Summary: VICC normalization routines for genes
Author: Alex Wagner, Kori Kuzma, James Stevenson
License: MIT License
        
        Copyright (c) 2020-2024 VICC
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
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: 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
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic==2.*
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: click
Requires-Dist: boto3
Requires-Dist: ga4gh.vrs~=2.0.0a1
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.1.1; extra == "etl"
Provides-Extra: test
Requires-Dist: pytest>=6.0; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: mock; extra == "test"
Requires-Dist: httpx; extra == "test"
Provides-Extra: dev
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: ruff==0.2.0; 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"

<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,
    "normalized_id": "hgnc:1097",
    "gene": {
        "type": "Gene",
        "id": "normalize.gene.hgnc:1097"
        "label": "BRAF",
        "gene_id": "hgnc:1097",
        "aliases": [
            "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.normalized_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.
