Learn R Programming

CODEX (version 1.4.0)

getcoverage: 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

See Also

getbambed

Examples

Run this code
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

Run the code above in your browser using DataLab