Description Usage Arguments Value See Also Examples
Annotate a set of ranges in a GRanges object with gene IDs (i.e. Entrez Gene Identifiers) based on their genic context. Features overlapping multiple genes are resolved by distance to the nearest TSS. Genes are obtained from a TxDb object, or can manually supplied as a GRanges.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | assignGeneID(object, geneModels, ...)
## S4 method for signature 'GenomicRanges,GenomicRanges'
assignGeneID(
object,
geneModels,
outputColumn = "geneID",
swap = NULL,
upstream = 1000,
downstream = 100
)
## S4 method for signature 'RangedSummarizedExperiment,GenomicRanges'
assignGeneID(object, geneModels, ...)
## S4 method for signature 'GenomicRanges,TxDb'
assignGeneID(
object,
geneModels,
outputColumn = "geneID",
swap = NULL,
upstream = 1000,
downstream = 100
)
## S4 method for signature 'RangedSummarizedExperiment,TxDb'
assignGeneID(object, geneModels, ...)
|
object |
GRanges or RangedSummarizedExperiment: Ranges to be annotated. |
geneModels |
TxDb or GRanges: Gene models via a TxDb, or manually specified as a GRangesList. |
... |
additional arguments passed to methods. |
outputColumn |
character: Name of column to hold geneID values. |
swap |
character or NULL: If not NULL, use another set of ranges contained in object to calculate overlaps, for example peaks in the thick column. |
upstream |
integer: Distance to extend annotated promoter upstream. |
downstream |
integer: Distance to extend annotated promoter downstream. |
object with geneID added as a column in rowData (or mcols).
Other Annotation functions:
assignMissingID()
,
assignTxID()
,
assignTxType()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(exampleUnidirectional)
# Obtain gene models from a TxDb-object:
library(TxDb.Mmusculus.UCSC.mm9.knownGene)
txdb <- TxDb.Mmusculus.UCSC.mm9.knownGene
# Assign geneIDs
assignGeneID(exampleUnidirectional,
geneModels=txdb,
outputColumn='geneID')
# Assign geneIDs using only TC peaks:
assignGeneID(exampleUnidirectional,
geneModels=txdb,
outputColumn='geneID',
swap='thick')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.