Class
AlignTabular alignment of same-type sequences.
Tabular alignment of same-type sequences.
Implements | EqualityComparableConcept |
---|---|
All Impl'd | EqualityComparableConcept |
Defined in | <seqan/align.h> |
Signature |
template <typename TSequence, typename TGapSpec>
class Align;
|
Template Parameters
TSequence |
Type of the underlying sequence. |
---|---|
TGapSpec |
Tag for selecting the Gaps specialization. |
Member Function Overview
Member Functions Inherited From EqualityComparableConcept
Interface Function Overview
-
void clearClipping(align);
Clear clipping on all rows. -
void clearGaps(align);
Clear gaps of all Align rows. -
TCol col(align);
Returns the columns of an Align object. -
TCols cols(align);
Returns the columns of an Align object. -
TStream operator<<(stream, align);
Stream-output for Align objects. -
TRow row(align, pos);
Returns a single row of an Align object. -
TRows rows(align);
Returns the rows of an Align object. -
void setStrings(align, stringSet);
Loads the sequences of a string set into an alignment. -
TStringSet stringSet(align);
Return string set with all ungapped sequences. -
void write(stream, align);
Writing of Gaps to Streams in human-readable format.
Interface Metafunction Overview
-
Col<TAlign>::Type
The column type for Align objects. -
Cols<TAlign>::Type
Return the type representing a column in an Align object. -
GetValue<TAlign>::Type
Return the get-value type for an Align object. -
GetValue<TAlign>::Type
Return the reference type for an Align object. -
Row<TAlign>::Type
Return the row type (Gaps specialization). -
Rows<TAlign>::Type
Return the type used for rows in an Align object (a Gaps specialization). -
Rows<TAlign>::Type;
Return the type of the underlying sequence. -
Rows<TAlign>::Type
Return the type that would be used for a string set of the sources. -
Value<TAlign>::Type
Return the value type for an Align object.
Detailed Description
The Alignment class is for storing tabular alignments of sequences having the same type. They do so by being a container of Gaps objects. The most common use case is storing pairwise alignments that are generated by one of the dynamic programming alignment algorithms.
Example
Here is an example of using an Align object with globalAlignment.
#include <seqan/basic.h>
#include <seqan/sequence.h>
#include <seqan/stream.h> // for I/O
#include <seqan/align.h>
#include <seqan/score.h>
using namespace seqan;
int main()
{
StringSet<DnaString> stringSet;
appendValue(stringSet, "AGTTTAATCA");
appendValue(stringSet, "AGTATACGA");
Align<DnaString> align(stringSet); // Initialize the Align object using a StringSet.
int score = globalAlignment(align, EditDistanceScore()); // Compute a global alingment using the Align object.
std::cout << "score = " << score << std::endl;
std::cout << "align\n" << align << std::endl;
return 0;
}
The output is as follows:
score = -4 align 0 . : AGTTTAATCA ||| | | | AGTAT-ACGA
See Also
Interface Functions Detail
void clearClipping(align);
Clear clipping on all rows.
Parameters
align
|
Align object to clear clippings of. |
---|
Data Races
Thread safety unknown!
void clearGaps(align);
Clear gaps of all Align rows.
Parameters
align
|
The Align object to clear all all gaps from. |
---|
Data Races
Thread safety unknown!
TCol col(align);
Returns the columns of an Align object.
Parameters
align
|
The Align object to get the cols of. |
---|
Returns
TCol |
The column of the Align object (Metafunction: Col). |
---|
Data Races
Thread safety unknown!
TCols cols(align);
Returns the columns of an Align object.
Parameters
align
|
The Align object to get the cols of. |
---|
Returns
TCols |
The columns of the Align object (Metafunction: Cols). |
---|
Data Races
Thread safety unknown!
TStream operator<<(stream, align);
Stream-output for Align objects.
Parameters
stream
|
std::ostream to write to. |
---|---|
align
|
Align object to write out. |
Returns
TStream |
Reference to stream after output of align. |
---|
Data Races
Thread safety unknown!
TRow row(align, pos);
Returns a single row of an Align object.
Parameters
align
|
The Align object to get the row of. |
---|---|
pos
|
The number of the row to get. |
Returns
TRow |
Reference to the given row of align (Metafunction: Row). |
---|
Data Races
Thread safety unknown!
TRows rows(align);
Returns the rows of an Align object.
Parameters
align
|
The Align object to get the rows for. |
---|
Returns
TRows |
A container with the Gaps of the Align object. |
---|
Data Races
Thread safety unknown!
void setStrings(align, stringSet);
Loads the sequences of a string set into an alignment.
Parameters
align
|
Align object to set underlying sequence of. |
---|---|
stringSet
|
The StringSet with the data. |
Data Races
Thread safety unknown!
TStringSet stringSet(align);
Return string set with all ungapped sequences.
Parameters
align
|
Align object to get sequences of. |
---|
Returns
TStringSet |
The set of ungapped sequences (Metafunction: StringSetType). |
---|
Data Races
Thread safety unknown!
void write(stream, align);
Deprecated.
Old-style I/O.
Writing of Gaps to Streams in human-readable format.
Parameters
stream
|
The Stream to write to. |
---|---|
align
|
The Align object to write out. |
Data Races
Thread safety unknown!