exportCoverage {transcriptR} | R Documentation

## exportCoverage

### Description

RNA-seq coverage profiles for both forward and reverse DNA strand can be visualized separately in the UCSC genome browser using `exportCoverage`. This function can generate tracks in BigWig and 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)

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

### Arguments

`object` | A `TranscriptionDataSet` 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.

### 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.

### Value

A file in either BigWig or bedGraph format.

### Author(s)

Armen R. Karapetyan

### See Also

`estimateBackground` UCSC genome browser BigWig

### Examples

    ### 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)

[Package transcriptR version 1.8.0 Index]