getcoverage {CODEX} | R Documentation

## Get depth of coverage from whole exome sequencing

### Description

Gets depth of coverage for each exon across all samples from whole exome sequencing files.

### Usage

    getcoverage(bambedObj, mapqthres)

### Arguments

`bambedObj` | Object returned from `getbambed`
`mapqthres` | Mapping quality threshold hold of reads.

### Value

`Y` | Read depth matrix
`readlength` | Vector of read length for each sample

### Author(s)

Yuchao Jiang yuchaoj@wharton.upenn.edu

### See Also

`getbambed`

### Examples

    library(WES.1KG.WUGSC)
    dirPath <- system.file("extdata", package = "WES.1KG.WUGSC")
    bamFile <- list.files(dirPath, pattern = '*.bam$')
    bamdir <- file.path(dirPath, bamFile)
    sampnameFile <- file.path(dirPath, "sampname")
    sampname <- as.matrix(read.table(sampnameFile))
    chr <- 22
    bambedObj <- getbambed(bamdir = bamdir, bedFile = file.path(dirPath,
        "chr22_400_to_500.bed"), sampname = sampname,
        projectname = "CODEX_demo", chr)
    bamdir <- bambedObj$bamdir
    sampname <- bambedObj$sampname
    ref <- bambedObj$ref
    projectname <- bambedObj$projectname
    chr <- bambedObj$chr
    coverageObj <- getcoverage(bambedObj, mapqthres = 20)
    Y <- coverageObj$Y
    readlength <- coverageObj$readlength

[Package CODEX version 1.16.0 Index]