seq2gene | R Documentation |
annotate genomic regions to genes in many-to-many mapping
seq2gene(seq, tssRegion, flankDistance, TxDb, sameStrand = FALSE)
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 |
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).
gene vector
Guangchuang Yu
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.