Utilities (utils)

Genes

gepyto.utils.genes.ensembl_genes_in_region(region, bare=False, build='GRCh37')[source]
Queries a genome region of the form chr3:123-456 for genes using Ensembl
API.
Parameters:
  • region (str) – The region to query.
  • bare (boolean) – If True, no information about transcript will be fetched
  • build (str) – The genome build to use (GRCh37 or GRCh38).
Returns:

A list of gepyto.structures.genes.Gene.

Return type:

list

Variants

gepyto.utils.variants.ensembl_variants_in_region(region, build='GRCh37')[source]
Queries a genome region of the form chr3:123-456 for variants using
Ensembl API.
Parameters:
  • region (str or gepyto Region) – The region to query.
  • build (str) – The genome build to use (GRCh37 or GRCh38).
Returns:

A list of gepyto.structures.variants.Variant or a subclass.

Return type:

list

Warning

If the Region is not contiguous, this will also return all the variants that are in the “gaps”.