scanSingleCovg: Scan exome coverage of single sample

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function is not supposed to be directly called by users. Rather, it should be called by scanMultiCovg

Usage

1
2
3
4
scanSingleCovg(wig.filename, sample.ID, exon.bin.vec, is.capture.vec, 
                      is.plot = FALSE, log.for.plot = TRUE, plot.output.DIR, 
                      bin.size = 10, ylab = "# of exons", 
                      xlab = "log2(coverage per base)")

Arguments

wig.filename

the name of input WIG file

sample.ID

character name of input sample

exon.bin.vec

a numeric vector indicating number of genomic bins per exon

is.capture.vec

a logical vector indicating if corresponding is captured

is.plot

a logical value indicating if generating coverage plot

log.for.plot

a logical value indicating if the coverage plot is according to log-scale

plot.output.DIR

name of directory for generating plot

bin.size

genomic bin-size

xlab

a title for the x axis

ylab

a title for the y axis

Details

Not for users

Value

coverage information of a single sample

Author(s)

Chen Wang

See Also

scanMultiCovg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#=== locate an example wig file, which is average pattern of simulation data
wigfile <- system.file("extdata","avg_pattern.wig",package="patternCNV")

#=== load a simulation session with generated pattern files
config.filename <- 'sim2.ini'
makeSimulation(config.filename,with.pattern=TRUE)
sim.session <- createSession(config.filename)
is.capture <- exonInfo(sim.session,attri="is.captured")
exon.Nbin <- exonInfo(sim.session,attri="N.exon.bin")

#=== return coverage information from specificed wig file
wig.out <- scanSingleCovg(wigfile,"avg",exon.Nbin,is.capture)

#=== plot coverage versus position (Mb)
exon.startpos <- exonInfo(sim.session,attri="start")
plot(exon.startpos/1e6,wig.out,log="y",xlab="position (Mb)",ylab="BP-level coverage")

hshdndx/new-to-CNV documentation built on May 17, 2019, 5:55 p.m.