seq2gene: seq2gene

View source: R/seq2gene.R

seq2geneR Documentation

seq2gene

Description

annotate genomic regions to genes in many-to-many mapping

Usage

seq2gene(seq, tssRegion, flankDistance, TxDb, sameStrand = FALSE)

Arguments

seq

genomic regions in GRanges object

tssRegion

TSS region

flankDistance

flanking search radius

TxDb

TranscriptDb object

sameStrand

logical whether find nearest/overlap gene in the same strand

Details

This funciton associates genomic regions with coding genes in a many-to-many mapping. It first maps genomic regions to host genes (either located in exon or intron), proximal genes (located in promoter regions) and flanking genes (located in upstream and downstream within user specify distance).

Value

gene vector

Author(s)

Guangchuang Yu

Examples

## Not run: 
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
TxDb <- TxDb.Hsapiens.UCSC.hg19.knownGene
file <- getSampleFiles()[[1]] # a bed file
gr <- readPeakFile(file)
genes <- seq2gene(gr, tssRegion=c(-1000, 1000), flankDistance = 3000, TxDb) 

## End(Not run)

GuangchuangYu/ChIPseeker documentation built on Oct. 31, 2024, 9:13 a.m.