Learn R Programming

transcriptR (version 1.0.2)

transcriptsToBed: transcriptsToBed

Description

A convenient graphical way to explore the identified transcripts is to visualize them in the https://genome.ucsc.edu/{UCSC genome browser}. The transcriptsToBed function returns a file in https://genome.ucsc.edu/FAQ/FAQformat.html#format1{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

transcriptsToBed(object, file, strand.color = c("blue", "red"))

## S3 method for class '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.

See Also

estimateBackground https://genome.ucsc.edu/{UCSC genome browser} https://genome.ucsc.edu/FAQ/FAQformat.html#format1{BED}

Examples

Run this code
### 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"))

Run the code above in your browser using DataLab