seq2gene {ChIPseeker} | R 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

    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)

[Package ChIPseeker version 1.30.3 Index]