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 : strstr

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

gene_name : strstr

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

gene_attr : strstr (default: 'external_gene_name')

The biomart attribute the gene symbol should show up for.

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

A list of chromosomes to exclude from query.

host : strstr (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 : boolbool (default: False)

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

Return type

DataFrameDataFrame

Returns

Dataframe containing gene coordinates for the specified gene symbol.

Examples

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