AlignedRead-class {ShortRead}R Documentation

"AlignedRead" class for aligned short reads

Description

This class represents and manipulates reads and their genomic alignments. Alignment information includes genomic position, strand, quality, and other data.

Objects from the Class

Objects of this class can be created from a call to the AlignedRead constructor, or more typically by parsing appropriate files (e.g., readAligned).

Slots

chromosome:
Object of class "factor" the particular sequence within a set of target sequences (e.g. chromosomes in a genome assembly) to which each short read aligns.
position:
Object of class "integer" the (base-pair) position in the genome to which the read is aligned.
strand:
Object of class "factor" the strand of the alignment.
alignQuality:
Object of class "numeric" representing an alignment quality score.
alignData:
Object of class "AlignedDataFrame" additional alignment information.
quality:
Object of class "BStringSet" representing base-call read quality scores.
sread:
Object of class "DNAStringSet" DNA sequence of the read.
id:
Object of class "BStringSet" read identifier.

Extends

Class "ShortReadQ", directly. Class "ShortRead", by class "ShortReadQ", distance 2. Class ".ShortReadBase", by class "ShortReadQ", distance 3.

Methods

See accessors for additional functions to access slot content, and ShortReadQ, ShortRead for inherited methods. Additional methods include:

[
signature(x = "AlignedRead", i = "ANY", j = "missing"): This method creates a new AlignedRead object containing only those reads indexed by i. chromosome is recoded to contain only those levels in the new subset.
append
signature(x = "AlignedRead", values = "AlignedRead", length = "missing"): append values after x. chromosome and strand must be factors with the same levels. See methods for ShortReadQ, AlignedDataFrame for details of how these components of x and y are appended.
coerce
signature(from = "PairwiseAlignedXStringSet", to = "AlignedRead"):

(Invoke this method with, as(from, "AlignedRead")) coerce objects of class from to class to.

strand
signature(object = "AlignedRead"): access the strand slot of object.
coverage
signature(x = "AlignedRead", start = NA, end = NA, ..., coords=c("leftmost", "fiveprime"), extend=0L):

Calculate coverage across reads present in x.

start and end are regions (e.g., of chromosomes) over which coverage is to be calculated. If provided, these are length 1 integers or named integer vectors of length greater than 1. If named integer vectors, the names must match levels(chromosome(x)). If omitted, coverage is calculated over the range of values spanned by the reads in x

coords specifies the coordinate system used to record position. Both systems number base pairs from left to right on the 5' strand. leftmost indicates the eland convention, where position(x) is the left-most (minimum) base pair, regardless of strand. fiveprime is the MAQ convetion, where position(x) is the coordinate of the 5' end of the aligned read.

extend indicates the number of base pairs to extend the read. Extension is in the 3' direction, measured from the 3' end of the aligned read.

The return value of coverage is a GenomeData object.

srorder
signature{x = "AlignedRead"}:
srrank
signature{x = "AlignedRead"}:
srsort
signature{x = "AlignedRead"}:
srduplicated
signature{x = "AlignedRead"}: Order, rank, sort, and find duplicates in AlignedRead objects. Reads are sorted by chromosome, strand, position, and then sread; less fine-grained sorting can be accomplished with, e.g., x[srorder(sread(x))].
show
signature(object = "AlignedRead"): provide a compact display of the AlignedRead content.
detail
signature(object = "AlignedRead"): display alignData in more detail.

Author(s)

Martin Morgan <mtmorgan@fhcrc.org>

See Also

readAligned

Examples

showMethods(class="AlignedRead", where=getNamespace("ShortRead"))
dirPath <- system.file('extdata', 'maq', package='ShortRead')
readAligned(dirPath, 'out.aln.1.txt', type="MAQMapview")

[Package ShortRead version 1.2.1 Index]