qualityMask: Mask bases by quality

Description Usage Arguments Value Author(s) See Also Examples

Description

Mask out low-quality bases in a DNA sequence prior to downstream analyses.

Usage

1
qualityMask(seq, max.err) 

Arguments

seq

A QualityScaledDNAStringSet containing one or more sequences with quality strings.

max.err

Numeric scalar specifying the error probability threshold, above which bases are to be masked.

Value

A DNAStringSet containing masked DNA sequences. All bases with error probabilities above max.err will be replaced with Ns.

Author(s)

Aaron Lun

See Also

encoding

Examples

1
2
3
4
5
6
7
8
X <- QualityScaledDNAStringSet(
    DNAStringSet(paste0("ACAGCTGCTGCAGCTGTG")),
    PhredQuality(rbeta(18, 1, 10))
)

qualityMask(X, max.err=0.5)
qualityMask(X, max.err=0.1)
qualityMask(X, max.err=0.01)

MarioniLab/sarlacc documentation built on May 13, 2019, 12:51 p.m.