htmlReport: HTML-Report Builder for the AVASet and MapperSet

Description Usage Arguments Details Author(s) See Also Examples

View source: R/htmlReport.R

Description

This function creates a HTML variant and quality report for a given AVASet or MapperSet instance.

Usage

1
htmlReport(object, annot, blocks=c(), transcripts=c(), sampleCols, minMut=3, dir="HTMLReport", title="Summary")

Arguments

object

An AVASet-class or MapperSet-class instance.

annot

An instance of class AnnotatedVariants you get by calling annotateVariants. If no such argument is supplied the data will be read from the Ensembl database automatically for all variants.

blocks

Character vector of block names for each variant. The variants will then be structured into several blocks. If no such list is supplied, the report consists of just one (big) table for all variants.

transcripts

Character vector containing Ensembl transcript-IDs that order the according entries on the transcript pages. Transcripts given in this argument will appear on top of the transcript page.

sampleCols

Character vector of column names of the sample data (phenoData) of the AVASet/MapperSet object to filter the sample output on the transcript pages. All columns will be listed if no such argument is given.

minMut

If the value of minMut is greater than zero, the report lists only variants, whose coverage for at least one sample is higher than minMut (percentage between 0 and 100).

dir

Character with the desired output directory. By defaultm the directory "HTMLReport" will be created in the current directory.

title

Heading for the first page with the variant information.

Details

The report is structured into two (MapperSet) or three (AVASet) parts containing variant and quality information:

Author(s)

Christoph Bartenhagen, Hans-Ulrich Klein, Christian Ruckert

See Also

annotateVariants.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# note: all examples save the report to the directory "htmlReportExample" in your current R working directory

# load a filtered AVA dataset containing 6 samples, 4 amplicons and 4 variants
# and its variant annotations
data("avaSetFiltered")
data("avaSetFiltered_annot")

# create a full report showing all (unfiltered) information
htmlReport(avaSetFiltered, avaSetFiltered_annot, dir="htmlReportExample", title="htmlReport Example", minMut=0)
# create a report that emphasizes on samples with variants covered by at least 50% of the reads 
htmlReport(avaSetFiltered, avaSetFiltered_annot, dir="htmlReportExample", title="htmlReport Example", minMut=50)

# create a report that is structured by the reference genes
library("ShortRead")
refs = sapply(fData(avaSetFiltered)$referenceSeq, function(x) 
    subset(pData(alignData(referenceSequences(avaSetFiltered))), pData(alignData(referenceSequences(avaSetFiltered)))$refSeqID == x)$name)
htmlReport(avaSetFiltered, avaSetFiltered_annot, dir="htmlReportExample", title="htmlReport Example", minMut=0, blocks=refs)

# create a report whose sample information only lists the sample ids
pData(avaSetFiltered)
sampleCols = "SampleID"
htmlReport(avaSetFiltered, avaSetFiltered_annot, dir="htmlReportExample", title="htmlReport Example", minMut=0, sampleCols=sampleCols)

R453Plus1Toolbox documentation built on Nov. 1, 2018, 2:27 a.m.