AlignedRead-class {ShortRead} | R Documentation |
This class represents and manipulates reads and their genomic alignments. Alignment information includes genomic position, strand, quality, and other data.
Objects of this class can be created from a call to the
AlignedRead
constructor, or more typically by parsing
appropriate files (e.g., readAligned
).
chromosome
:"factor"
the
particular sequence within a set of target sequences
(e.g. chromosomes in a genome assembly) to which each short read
aligns.position
:"integer"
the
(base-pair) position in the genome to which the read is aligned.strand
:"factor"
the strand of
the alignment.alignQuality
:"numeric"
representing an alignment quality score.alignData
:"AlignedDataFrame"
additional alignment information.quality
:"BStringSet"
representing base-call read quality scores.sread
:"DNAStringSet"
DNA
sequence of the read.id
:"BStringSet"
read
identifier.
Class "ShortReadQ"
, directly.
Class "ShortRead"
, by class "ShortReadQ", distance 2.
Class ".ShortReadBase"
, by class "ShortReadQ", distance 3.
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.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.signature(from = "PairwiseAlignedXStringSet", to = "AlignedRead")
:
(Invoke this method with, as(from, "AlignedRead")
) coerce
objects of class from
to class to
.
signature(object = "AlignedRead")
: access the
strand slot of object
.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.
signature{x = "AlignedRead"}
:signature{x = "AlignedRead"}
:signature{x = "AlignedRead"}
: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))]
.signature(object = "AlignedRead")
: provide a
compact display of the AlignedRead
content.signature(object = "AlignedRead")
: display
alignData
in more detail.Martin Morgan <mtmorgan@fhcrc.org>
showMethods(class="AlignedRead", where=getNamespace("ShortRead")) dirPath <- system.file('extdata', 'maq', package='ShortRead') readAligned(dirPath, 'out.aln.1.txt', type="MAQMapview")