annotateTSS: Annotate the provided Transcription Start Sites

Description Usage Arguments Value Examples

View source: R/annotateTSS.R

Description

This function annotates the provided TSS bed file to provide the number of TSS falling within the genomic features from a given TxDB object. In order to break ties between overlapping features, the function ranks the features by preference. By default, the following order is used: fiveUTR > promoter > intron > coding > spliceSite > threeUTR > intergenic. A custom order of feature ranks can also be provided.

Usage

1
2
3
4
5
6
7
8
annotateTSS(
  tssBED,
  txdb,
  featureRank = c("fiveUTR", "promoter", "intron", "coding", "spliceSite", "threeUTR",
    "intergenic"),
  plotValue = "number",
  outFile = NULL
)

Arguments

tssBED

A bed file with detected TSS/differential TSS coordinates

txdb

A txdb object.

featureRank

A vector with features to use for breaking ties, in decending order of preference (highest to lowest),

plotValue

What values to plot (choose from "number", "percent" or NULL for no plot)

outFile

Output file name. (filename extention would be used to determine type). If outfile not specified, the plot would be retured on the screen

Value

A data.frame with number of TSS falling into each feature

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# load a txdb object
library("TxDb.Dmelanogaster.UCSC.dm6.ensGene")
seqlevelsStyle(TxDb.Dmelanogaster.UCSC.dm6.ensGene) <- "ENSEMBL"
# limiting the annotation to X chromosome
seqlevels(TxDb.Dmelanogaster.UCSC.dm6.ensGene) <- "X"

# annotate a given TSS bed file
dir <- system.file("extdata", package = "icetea")
tss <- file.path(dir, "testTSS_merged.bed")
annotations <- annotateTSS(tssBED = tss, TxDb.Dmelanogaster.UCSC.dm6.ensGene,
               plotValue = "number", outFile = "TSS_annot.pdf")

vivekbhr/icetea documentation built on June 8, 2020, 4:45 a.m.