setVariantFilter: Filters output of variant information

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

Description

This functions sets the filter to display only those variants, whose amplicon coverage (in percent) in forward and reverse direction in at least one sample is higher than a given value. The coverage is defined as the percentual amount of reads that cover a variant.

Usage

1

Arguments

object

An instance of an link{AVASet-class} or MapperSet-class.

filter

A filter value between 0 and 1. If two values are given in a vector, the variants are filterd according to the forward (first value) and reverse direction (second value) separately. In this case, a variant has to meet both requirements.

Details

Setting the filter affects the assayData and the featureData of the variant slot. See also getVariantPercentages for further details.

Value

setVariantFilter returns the given link{AVASet-class}/link{MapperSet-class} instance with an updated filter value.

Author(s)

Christoph Bartenhagen

See Also

link{AVASet-class}, link{MapperSet-class}, getVariantPercentages.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# load an AVA dataset containing 6 samples, 4 amplicons and 259 variants
data(avaSetExample)
avaSetExample

# use only those variants that are covered by at least 10% of all reads in one sample in both directions together (259 -> 4 variants)
avaSetExample = setVariantFilter(avaSetExample, filter=0.1)
avaSetExample

# use only those variants that are covered by at least 0.1% of all reads in one sample in forward direction
# and by at least 0% in reverse direction (259 -> 6 variants)
avaSetExample = setVariantFilter(avaSetExample, filter=c(0.1, 0))
avaSetExample

# reset filter values to zero
avaSetExample = setVariantFilter(avaSetExample, filter=0)
# or simply
avaSetExample = setVariantFilter(avaSetExample)

R453Plus1Toolbox documentation built on Nov. 8, 2020, 5:59 p.m.