Learn R Programming

TEQC (version 3.12.0)

make.wigfiles: Creates wiggle files with per-base coverages

Description

Prepares wiggle files with (non-zero) per-base coverages for the upload and visualization with genome browsers

Usage

make.wigfiles(coverageAll, chroms, trackname = "Coverage", filename = "Coverage")

Arguments

coverageAll
RleList containing Rle vectors of per-base coverages for each chromosome, i.e. coverageAll output of coverage.target
chroms
vector of chromosome names for which to produce wiggle files; if missing wiggle files will be produced for all chromosomes on which there are reads
trackname
trackname for wiggle file header
filename
part of output wiggle file name. Respective chromosome number and '.wig' will be added

Value

Details

Only non-zero coverages will be listed

See Also

coverage.target, coverage.plot, covered.k, coverage.hist, coverage.uniformity, coverage.targetlength.plot

Examples

Run this code
## get reads and targets
exptPath <- system.file("extdata", package="TEQC")
readsfile <- file.path(exptPath, "ExampleSet_Reads.bed")
reads <- get.reads(readsfile, idcol=4, skip=0)
targetsfile <- file.path(exptPath, "ExampleSet_Targets.bed")
targets <- get.targets(targetsfile, skip=0)

## calculate per-base coverages
Coverage <- coverage.target(reads, targets, perBase=TRUE)

## create wiggle files for read coverages on chromsomes 13 and 17
make.wigfiles(Coverage$coverageAll, chroms=c("chr13", "chr17"))

Run the code above in your browser using DataLab