QualityScore-class {ShortRead}R Documentation

Quality scores for short reads and their alignments

Description

This class hierarchy represents quality scores for short reads. QualityScore is a virtual base class, with derived classes offering different ways of representing qualities. Methods defined on QualityScore are implemented in all derived classes.

Objects from the Class

Objects from the class are created using constructors (e.g., NumericQuality) named after the class name.

Extends

Class ".ShortReadBase", directly.

Methods

The following methods are defined on all QualityScore and derived classes:

[
signature(x = "QualityScore", i = "ANY", j = "missing")
[
signature(x = "MatrixQuality", i = "ANY", j = "missing"):

Subset the object, with index i indicating the reads for which quality scores are to be extracted. The class of the result is the same as the class of x. It is an error to provide any argument other than i.

[[
signature(x = "QualityScore", i = "ANY", j = "ANY"):

Subset the object, returning the quality score (e.g., numeric value) of the ith read.

[[
signature(x = "MatrixQuality", i = "ANY", j = "ANY"):

Returns the vector of quality scores associated with the ith read.

dim
signature(x = "MatrixQuality"):

The integer(2) dimension (e.g., number of reads, read width) represented by the quality score.

length
signature(x = "QualityScore"):
length
signature(x = "MatrixQuality"):

The integer(1) length (e.g., number of reads) represented by the quality score. Note that length of MatrixQuailty is the number of rows of the corresponding matrix, and not the length of the corresponding numeric vector.

append
signature(x = "QualityScore", values = "QualityScore", length = "missing"): append values after x.
width
signature(x = "QualityScore"):
width
signature(x = "NumericQuality"):
width
signature(x = "MatrixQuality"):
width
signature(x = "FastqQuality"):

A numeric vector with length equal to the number of quality scores, and value equal to the number of quality scores for each read. For instance, a FastqQuality will have widths equal to the number of nucleotides in the underlying short read.

show
signature(object = "QualityScore"):
show
signature(object = "NumericQuality"):
show
signature(object = "FastqQuality"):

provide a brief summary of the object content.

detail
signature(object = "QualityScore"):

provide a more detailed view of object content.

The following methods are defined on specific classes:

alphabet
signature(x = "FastqQuality", ...): Return a character vector of valid quality characters.
alphabetFrequency
signature(stringSet = "FastqQuality"):

Apply alphabetFrequency to quality scores, returning a matrix as described in alphabetFrequency.

alphabetByCycle
signature(stringSet = "FastqQuality"):

Apply alphabetByCycle to quality scores, returning a matrix as described in alphabetByCycle.

alphabetScore
signature(object = "FastqQuality"):
alphabetScore
signature(object = "SFastqQuality"):

Apply alphabetScore (i.e., summed base quality, per read) to object.

coerce
signature(from = "FastqQuality", to = "numeric"):
coerce
signature(from = "FastqQuality", to = "matrix"):
coerce
signature(from = "SFastqQuality", to = "matrix"):

(Use these as, for instance, as(from, "matrix")) coerce objects of class from to class to, using the quality encoding implied by the class. WHen to is “matrix”, the result is a matrix of type integer. In addition, methods require that all quality scores are of the same width.

narrow
signature(x = "FastqQuality", start = NA, end = NA, width = NA, use.names = TRUE): ‘narrow’ qualilty so that scores are between start and end bases, according to narrow in the IRanges package.
srorder
signature(x = "FastqQuality"):
srrank
signature(x = "FastqQuality"):
srduplicated
signature(x = "FastqQuality"):

Apply srsort, srorder, srrank, and srduplicated to quality scores, returning objects as described on the appropriate help page.

Integer representations of SFastqQuality and FastqQuality can be obtained with as(x, "matrix").

Author(s)

Martin Morgan <mtmorgan@fhcrc.org>

See Also

NumericQuality and other constructors.

Examples

names(slot(getClass("QualityScore"), "subclasses"))

[Package ShortRead version 1.2.1 Index]