getcoverage: Get depth of coverage from whole exome sequencing

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getcoverage.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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

CODEX documentation built on Nov. 8, 2020, 8:22 p.m.