Return genes residing in defined region(s).

region_to_gene(region, gene_format = "hugo", genome_build = "grch37")

Arguments

region

Regions to intersect genes with, this can be either a data frame with regions sorted in the following columns; chromosome, start, end. Or it can be a character vector in "region" format, i.e chromosome:start-end.

gene_format

Parameter for specifying the format of returned genes, default is "hugo", other acceptable inputs are "ensembl".

genome_build

Reference genome build.

Value

A data frame with gene(s) that are residing in the specified region(s).

Details

This function takes a region as a vector of characters, or a data frame with of regions (e.g output from gene_to_region(return_as="df")). and returns the genes residing withing the specified region. For the other way around (i.e gene to regions, refer to gene_to_region).

Examples

myc_region = gene_to_region(gene_symbol = "MYC",
                            genome_build = "grch37",
                            return_as = "df")
#> 1 region(s) returned for 1 gene(s)

region = region_to_gene(region = myc_region,
                        gene_format = "hugo",
                        genome_build = "grch37")
#> 1 gene(s) returned for 1 region(s)