scanpy.queries.gene_coordinates

scanpy.queries.gene_coordinates(org, gene_name, *, gene_attr='external_gene_name', chr_exclude=(), host='www.ensembl.org', use_cache=False)

Retrieve gene coordinates for specific organism through BioMart.

Parameters:
org : str

Organism to query. Must be an organism in ensembl biomart. “hsapiens”, “mmusculus”, “drerio”, etc.

gene_name : str

The gene symbol (e.g. “hgnc_symbol” for human) for which to retrieve coordinates.

gene_attr : str (default: 'external_gene_name')

The biomart attribute the gene symbol should show up for.

chr_exclude : Iterable[str] (default: ())

A list of chromosomes to exclude from query.

host : str (default: 'www.ensembl.org')

A valid BioMart host URL. Alternative values include archive urls (like “grch37.ensembl.org”) or regional mirrors (like “useast.ensembl.org”).

use_cache : bool (default: False)

Whether pybiomart should use a cache for requests. Will create a .pybiomart.sqlite file in current directory if used.

Return type:

DataFrame

Returns:

: Dataframe containing gene coordinates for the specified gene symbol.

Examples

>>> import scanpy as sc
>>> sc.queries.gene_coordinates("hsapiens", "MT-TF")