Learn R Programming

transcriptR (version 1.0.2)

exportCoverage: exportCoverage

Description

RNA-seq coverage profiles for both forward and reverse DNA strand can be visualized separately in the https://genome.ucsc.edu/{UCSC genome browser} using exportCoverage. This function can generate tracks in https://genome.ucsc.edu/goldenPath/help/bigWig.html{BigWig} and http://genome.ucsc.edu/goldenpath/help/bedgraph.html{bedGraph} formats, which can be uploaded to the genome browser as custom tracks.

Usage

exportCoverage(object, file, type, strand, color,
  filter.by.coverage.cutoff = FALSE, coverage.cutoff = NULL, rpm = FALSE,
  total.reads)

## S3 method for class 'TranscriptionDataSet': exportCoverage(object, file, type, strand, color, filter.by.coverage.cutoff = FALSE, coverage.cutoff = NULL, rpm = FALSE, total.reads)

Arguments

object
file
Character. A file name.
type
Character. Track type, either "bigWig" or "bedGraph". Default: "bedGraph".
strand
Character. The strand to create a track for. One of ["+", "-"].
color
Object of class "integer" representing the track color (as from col2rgb). Only works with tracks of type "bedGraph". Default: c(0L, 0L, 255L).
filter.by.coverage.cutoff
Logical. Whether to discard regions with low fragment coverage, representing expression noise from the resulting track. Default: FALSE.
coverage.cutoff
Numeric. A cutoff value to discard regions with the low fragment coverage, representing expression noise. By default, the value stored in the coverageCutoff slot of the supplied object is used. The optimal cutoff value can be calculated by estimateBackground function call. Default: NULL.
rpm
Logical. Whether to perform normalization ('Reads Per Million'). Default: FALSE.
total.reads
Numeric. Total number of reads used for normalization. By default, the total number of reads stored in the provided TranscriptionDataSet object is used.

Value

  • A file in either https://genome.ucsc.edu/goldenPath/help/bigWig.html{BigWig} or http://genome.ucsc.edu/goldenpath/help/bedgraph.html{bedGraph} format.

Details

There is an option to filter coverage profiles by the coverage cutoff value, either estimated for a specific FDR via estimateBackground or a user specified value. By default, the coverage cutoff value stored in the TranscriptionDataSet object is used. In order to make an informed decision about a proper FDR level, it is useful to explore the output at different FDR levels and determine the optimal cutoff value.

See Also

estimateBackground https://genome.ucsc.edu/{UCSC genome browser} https://genome.ucsc.edu/goldenPath/help/bigWig.html{BigWig}

Examples

Run this code
### Load TranscriptionDataSet object
data(tds)

### Look at the coverage profile of the regions expressed above the background level
# exportCoverage(object = tds, file = "plus.bg", type = "bedGraph", strand = "+",
# filter.by.coverage.cutoff = TRUE, coverage.cutoff = 3, rpm = FALSE)

### Or check the raw coverage (all expressed regions)
# exportCoverage(object = tds, file = "plus_raw.bg", type = "bedGraph",
# strand = "+", filter.by.coverage.cutoff = FALSE, rpm = FALSE)

Run the code above in your browser using DataLab