LocARNA-2.0.0
|
Represents a structure-annotated sequence alignment. More...
#include <alignment.hh>
Public Types | |
typedef EdgeEnd | edge_end_t |
edge end | |
using | edge_ends_t = std::vector< EdgeEnd > |
edge ends | |
using | edge_end_pair_t = std::pair< EdgeEnd, EdgeEnd > |
using | pos_pair_t = std::pair< pos_type, pos_type > |
using | edges_t = AlignmentEdges |
description of alignment edges | |
Public Member Functions | |
Alignment (const Sequence &seqA, const Sequence &seqB) | |
~Alignment () | |
Alignment (const Sequence &seqA, const Sequence &seqB, const edges_t &edges) | |
Construct alignment from sequences and alignment strings. More... | |
Alignment (const Alignment &alignment) | |
copy constructor More... | |
Alignment & | operator= (const Alignment &alignment) |
assignment operator More... | |
void | set_consensus_structure (const RnaStructure &structure) |
Set consensus structure of the alignment. More... | |
void | set_structures (const RnaStructure &structureA, const RnaStructure &structureB) |
Set structures of the alignment. More... | |
void | clear () |
void | append (edge_end_t i, edge_end_t j) |
Append an alignment edge. More... | |
void | add_basepairA (int i, int j) |
Add a basepair to the structure of A. | |
void | add_basepairB (int i, int j) |
Add a basepair to the structure of B. | |
void | add_deleted_basepairA (int i, int j) |
Add a basepair to the structure of A. | |
void | add_deleted_basepairB (int i, int j) |
Add a basepair to the structure of B. | |
const edges_t | alignment_edges (bool only_local) const |
All alignment edges. More... | |
pos_pair_t | start_positions () const |
pos_pair_t | end_positions () const |
std::string | dot_bracket_structureA (bool only_local) const |
Structure A. More... | |
std::string | dot_bracket_structureB (bool only_local) const |
Structure B. More... | |
const Sequence & | seqA () const |
read access seqA More... | |
const Sequence & | seqB () const |
read access seqB More... | |
bool | empty () const |
Static Public Member Functions | |
static edges_t | alistrs_to_edges (const std::string &alistrA, const std::string &alistrB) |
convert alignemnt string to edge end vector More... | |
Represents a structure-annotated sequence alignment.
Supports construction of the alignment during traceback.
Construct empty alignment from sequences
seqA | First sequence |
seqB | Second sequence |
LocARNA::Alignment::~Alignment | ( | ) |
Destructor
LocARNA::Alignment::Alignment | ( | const Sequence & | seqA, |
const Sequence & | seqB, | ||
const edges_t & | edges | ||
) |
Construct alignment from sequences and alignment strings.
seqA | First sequence |
seqB | Second sequence |
edges | alignment edges |
LocARNA::Alignment::Alignment | ( | const Alignment & | alignment | ) |
copy constructor
alignment | object to be copied Copies implementation object (not only pointer) |
const Alignment::edges_t LocARNA::Alignment::alignment_edges | ( | bool | only_local | ) | const |
All alignment edges.
only_local | if true, return only local edges |
If !only_local, the returned vector contains all positions of the sequence. We distinguish different gaps, in particular locality gaps, which are paired with positions that are not aligned at all (i.e. they are not part of the local alignment).
If only_local, the vector does not contain non-local edges, i.e. edges with locality gaps.
Edges are sorted (ascendingly).
|
static |
convert alignemnt string to edge end vector
alistr | alignment string |
void LocARNA::Alignment::append | ( | edge_end_t | i, |
edge_end_t | j | ||
) |
Append an alignment edge.
i | first position of edge (or -1 for gap) |
j | second position of edge (or -1 for gap) Edges have to be appended in ascending order |
void LocARNA::Alignment::clear | ( | ) |
Delete the alignment edges and reset structure
std::string LocARNA::Alignment::dot_bracket_structureA | ( | bool | only_local | ) | const |
Structure A.
only_local | if true, construct string only for aligned subsequence |
std::string LocARNA::Alignment::dot_bracket_structureB | ( | bool | only_local | ) | const |
Structure B.
only_local | if true, construct string only for aligned subsequence |
bool LocARNA::Alignment::empty | ( | ) | const |
check for empty alignment
Alignment::pos_pair_t LocARNA::Alignment::end_positions | ( | ) | const |
get pair of last positions in the alignment
assignment operator
alignment | object to be assigned Assigns implementation object (not only pointer) |
const Sequence & LocARNA::Alignment::seqA | ( | ) | const |
read access seqA
const Sequence & LocARNA::Alignment::seqB | ( | ) | const |
read access seqB
void LocARNA::Alignment::set_consensus_structure | ( | const RnaStructure & | structure | ) |
Set consensus structure of the alignment.
structure | consensus structure |
void LocARNA::Alignment::set_structures | ( | const RnaStructure & | structureA, |
const RnaStructure & | structureB | ||
) |
Set structures of the alignment.
structureA | structure A |
structureB | structure B |
Alignment::pos_pair_t LocARNA::Alignment::start_positions | ( | ) | const |
get pair of first positions in the alignment