TEQCreport: Creates an html report

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

View source: R/TEQCreport.R

Description

Creates an automated html report for the complete TEQC analysis of one sample

Usage

1
2
3
4
TEQCreport(sampleName = "", targetsName = "", referenceName = "", destDir = "TEQCreport",
            reads = get.reads(), targets = get.targets(), Offset = 0, pairedend = FALSE, genome = c(NA, "hg38", "hg19", "hg18"),
            genomesize, k=c(1, 2, 3, 5, 10, 20), covthreshold = 8, CovUniformityPlot = FALSE, CovTargetLengthPlot = FALSE, CovGCPlot = FALSE,
            duplicatesPlot = FALSE, baits = get.baits(), WigFiles = FALSE, saveWorkspace = FALSE, figureFormat = c("jpeg", "png", "tiff"))

Arguments

sampleName

descriptive sample name; will be written on top of the html report

targetsName

descriptive name of the captured target; will be written on top of the html report

referenceName

descriptive name of the reference genome the reads were aligned against; will be written on top of the html report

destDir

directory where results and html documents shall be saved

reads

RangedData table containing positions of sequenced reads, or call to get.reads to read in positions from a bed or BAM file

targets

RangedData table containing positions of target regions, or call to get.targets to read in positions from a bed file

Offset

integer; add Offset bases on both sides to targeted regions and potentially collapse resulting overlapping target regions

pairedend

if TRUE, data will be considered to be paired-end data, i.e. reads will be "merged" to read pairs, and chromosome bar plot, specificity, enrichment and duplicate analysis (if selected) will be based on read pairs rather than on single reads

genome

genome version targets were designed and reads aligned to. For the given options the total genome size is set automatically. For other genomes or versions, leave this option empty ('NA') and specify the genome size with option 'genomesize'

genomesize

integer: specify the total genome size manually. If 'genomesize' is given, option 'genome' will be ignored.

k

integer vector of k-values for which to show fraction of target bases with coverage >= k in 'Sensitivity' table. Passed to covered.k

covthreshold

integer indicating which coverage value shall be highlighted by dashed lines in the coverage histogram. Passed to coverage.hist

CovUniformityPlot

if TRUE, a coverage uniformity plot is created, see coverage.uniformity

CovTargetLengthPlot

if TRUE, coverage vs target length plots are created, see coverage.targetlength.plot

CovGCPlot

if TRUE, a coverage vs GC content plot is created, see coverage.GC

duplicatesPlot

if TRUE, a duplicates barplot is created, see duplicates.barplot

baits

A RangedData table holding the hybridization probe ("bait") positions and sequences, or call to get.baits to read in positions from a bed file. Only needed if CovGCPlot = TRUE.

WigFiles

if TRUE, wiggle files with per-base coverage are created for each chromosome

saveWorkspace

if TRUE, an R workspace with objects reads, targets and output of coverage.target and reads2pairs (in case pairedend = TRUE) are saved in destDir to be available for further analyses

figureFormat

format of the figures produced for the html report (besides pdf graphs)

Details

TEQC analysis is performed and files for an html report are created in destDir. The report can be viewed by opening destDir/index.html in a web browser. Images are saved in destDir/image. Wiggle files (in case WigFiles = TRUE) are saved in destDir/wiggle. A table with general target coverage statistics, a table with average coverage values per target, a table with cumulative fractions of targeted bases with certain coverage and the R workspace containing R objects for potential further analysis (in case saveWorkspace = TRUE) are saved in destDir.

Value

The function is invoked for its side effect

Author(s)

Manuela Hummel m.hummel@dkfz.de

References

Hummel M, Bonnin S, Lowy E, Roma G. TEQC: an R-package for quality control in target capture experiments. Bioinformatics 2011; 27(9):1316-1317

See Also

get.reads, get.targets, fraction.target, fraction.reads.target, coverage.target, readsPerTarget, reads2pairs, covered.k, coverage.hist, coverage.uniformity, coverage.targetlength.plot, coverage.GC, get.baits, make.wigfiles

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## get reads and targets files
exptPath <- system.file("extdata", package="TEQC")
readsfile <- file.path(exptPath, "ExampleSet_Reads.bed")
targetsfile <- file.path(exptPath, "ExampleSet_Targets.bed")

## create report
## Not run: 
TEQCreport(sampleName="Test Sample", targetsName="Human Exome", referenceName="Human Genome",
          destDir="report", reads=get.reads(readsfile, skip=0, idcol=4),
          targets=get.targets(targetsfile, skip=0), genome="hg19")
## End(Not run)

Example output

Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: IRanges
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: Rsamtools
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: Biostrings
Loading required package: XVector

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Loading required package: hwriter
[1] "results and report are saved in folder /work/tmp/report"
[1] "reading data..."
[1] "read 19546 sequenced reads"
[1] "read 50 (non-overlapping) target regions"
[1] "calculating fraction of on-target reads"
[1] "calculating coverage..."
[1] "counting reads per target..."
[1] "generating figures..."
[1] "generating html report..."
Warning message:
system call failed: Cannot allocate memory 

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

Related to TEQCreport in TEQC...