Skip to main content

Gene Locator

This library allows the user to annotate a list of genetic variants given chromosome/position as coordinates.

Usage

This library can be used via command line script, or called from within Python. Currently only Python versions >=3.5 are supported.

$ pip3 install genelocator
$ gene-locator GRCh37 chr19 234523 --coding-only --version gencode32
# => 19	281040	291403	ENSG00000141934.10_5	PLPP2
from genelocator import get_genelocator
# By default, it will only perform the lookup if cached data is available.
#  A new lookup can be automatically generated for a different build/ gene list, by specifying auto_fetch=True
gl = get_genelocator('GRCh38', gencode_version=31, coding_only=True, auto_fetch=True)
gene = gl.at('chr19', 101000)
# => [{'chrom': '19', 'start': 107104, 'end': 117102, 'ensg': 'ENSG00000176695.8', 'symbol': 'OR4F17'}]

The python package comes bundled with data from GENCODE version 32, for builds GRCh37 and GRCh38.

Rules

It works as follows:

  1. If a SNP falls within at least one gene, return a list of gene information for each gene 1a. If a SNP falls within multiple genes, return a list of information about all overlapping genes.
  2. If a SNP does not fall within any genes, return information for the gene whose start or end is closest to the specified coordinates.
  3. If the requested chromosome has no data, throw an error.

Development

To install dependencies and run in development mode:

pip install -e .

Linting rules: flake8

Unit tests: pytest tests/

Metadata

Release files for GeneLocator 1.1.2

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

Source distribution (sdist)

Source distribution for GeneLocator 1.1.2
File Size Uploaded Provenance
GeneLocator-1.1.2.tar.gz 5.9 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for GeneLocator 1.1.2
File Interpreter ABI Platform
GeneLocator-1.1.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 11.9 MB

Release files / GeneLocator-1.1.2.tar.gz

Download URL GeneLocator-1.1.2.tar.gz
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
7f7c2f6a65885b748294edfce42bcffac12d6324cf7f1a8d1a3ceca7209c862e
BLAKE2b-256 checksum
How to use checksums
1b2e861b68be7fc7aeb059e9e2669aed1ed3d97716044ad1038be8b32001e639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.5

Release files / GeneLocator-1.1.2-py2.py3-none-any.whl

Download URL GeneLocator-1.1.2-py2.py3-none-any.whl
Size 5.9 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f98db19fad1215fa7c733c0e04a1dc50f1316655927bc9c4fb4ed5ba295e60e3
BLAKE2b-256 checksum
How to use checksums
0c78a6c5a53af1f7f680417b99694240d2293695f34b5acf2565fb9c0af8426d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.5

Security for GeneLocator 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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