get_gene_details: Pull gene details for a genomic region

Description Usage Arguments Value Examples

View source: R/pull_gene_details.R

Description

This function subsets the gene index for a genomic region of interest.

Usage

1
get_gene_details(cnr, seqnames = 12, start = 69200804, end = 69246466)

Arguments

cnr

a cnr bundle

seqnames

a chromosome name, must match 'cnr$gene.index$seqnames'

start

region start

end

region end

Value

Returns the subset of the 'gene.index' table for the genomic region.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(dplyr)
data(cnr)
coord.df <- data.frame(chr = 12,
                    start = 69200804,
                    end = 69246466)

get_gene_details(cnr, seqnames = coord.df$chr,
                  start = coord.df$start, end = coord.df$end)

coords.df <- data.frame(chr = c(1, 12), 
                     start = c(170120554, 69200804),
                     end =  c(172941951, 69246466))
do.call(rbind, apply(coords.df, 1, function(rr)
                     get_gene_details(cnr,
                                       seqnames = rr[1],
                                       start = rr[2],
                                       end = rr[3])))

SingerLab/gac documentation built on July 22, 2021, 3:27 a.m.