collapseFullCoverage {derfinder} | R Documentation

## Collapse full coverage information for efficient quantile computations

### Description

For a given data set this function collapses the full coverage information for each sample from all the chromosomes. The resulting information per sample is the number of bases with coverage 0, 1, etc. It is similar to using table() on a regular vector. This information is then used by sampleDepth for calculating the sample depth adjustments. The data set can loaded to R using (see fullCoverage) and optionally filtered using filterData.

### Usage

    collapseFullCoverage(fullCov, colsubset = NULL, save = FALSE, ...)

### Arguments

`fullCov` | A list where each element is the result from loadCoverage used with `cutoff=NULL`. Can be generated using fullCoverage.
`colsubset` | Which columns of `coverageInfo$coverage` to use.
`save` | If `TRUE`, the result is saved as 'collapsedFull.Rdata'.
`...` | Arguments passed to other methods and/or advanced arguments. Advanced arguments: verbose If `TRUE` basic status updates will be printed along the way. Default: `FALSE`.

### Value

A list with one element per sample. Then per sample, a list with two vector elements: `values` and `weights`. The first one is the coverage value and the second one is the number of bases with that value.

### Author(s)

Leonardo Collado-Torres

### See Also

fullCoverage, sampleDepth

### Examples

    ## Collapse the coverage information for the filtered data
    collapsedFull <- collapseFullCoverage(list(genomeData),
        verbose = TRUE
    )
    collapsedFull
    ## Not run:
    ## You can also collapsed the raw data
    collapsedFullRaw <- collapseFullCoverage(list(genomeDataRaw), verbose = TRUE)

    ## End(Not run)

[Package derfinder version 1.26.0 Index]