transcriptsToBed

Description

A convenient graphical way to explore the identified transcripts is to visualize them in the UCSC genome browser. The transcriptsToBed function returns a file in BED format, which can be directly uploaded to the genome browser. To improve the visual perception, transcripts are color-coded by DNA strand orientation.

Usage

1
2
3
4
5
transcriptsToBed(object, file, strand.color = c("blue", "red"))

## S4 method for signature 'GRanges'
transcriptsToBed(object, file, strand.color = c("blue",
  "red"))

Arguments

object

A GRanges object.

file

Character. A file name.

strand.color

A character vector of length two, specifying color for each DNA strand. Default: c("blue", "red").

Value

A file in the BED format.

Author(s)

Armen R. Karapetyan

See Also

estimateBackground UCSC genome browser BED

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
### Load TranscriptionDataSet object
data(tds)

### Load reference annotations (knownGene from UCSC)
data(annot)

### Detect transcripts
detectTranscripts(object = tds, coverage.cutoff = 5, gap.dist = 4000,
estimate.params = TRUE, combine.by.annot = FALSE, annot = annot)

### View detected transcripts
trx <- getTranscripts(tds)

### Export to BED
# transcriptsToBed(object = trx, file = "transcripts.bed",
# strand.color = c("blue", "red"))