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

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

View source: R/make.wigfiles.R

Description

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

Usage

1
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

Details

Only non-zero coverages will be listed

Value

One or more wiggle files listing per-base (non-zero) read coverages

Author(s)

Manuela Hummel m.hummel@dkfz.de

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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"))

TEQC documentation built on Nov. 8, 2020, 8:07 p.m.