LocARNA-1.9.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Static Public Member Functions
LocARNA::Alignment Class Reference

Represents a structure-annotated sequence alignment. More...

#include <alignment.hh>

List of all members.

Public Types

typedef EdgeEnd edge_end_t
 edge end
typedef Alignment__edge_ends_t edge_ends_t
 edge ends
typedef AlignmentEdges edges_t
 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.
 Alignment (const Alignment &alignment)
 copy constructor
Alignmentoperator= (const Alignment &alignment)
 assignment operator
void swap (Alignment &a1, Alignment &a2)
 swap two alignments
void set_consensus_structure (const RnaStructure &structure)
 Set consensus structure of the alignment.
void set_structures (const RnaStructure &structureA, const RnaStructure &structureB)
 Set structures of the alignment.
void clear ()
void append (edge_end_t i, edge_end_t j)
 Append an alignment edge.
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.
size_type local_startA () const
 get first position of A that is locally aligned to something
size_type local_endA () const
 get last position of A that is locally aligned to something
size_type local_startB () const
 get first position of B that is locally aligned to something
size_type local_endB () const
 get last position of B that is locally aligned to something
std::string dot_bracket_structureA (bool only_local) const
 Structure A.
std::string dot_bracket_structureB (bool only_local) const
 Structure B.
const SequenceseqA () const
 read access seqA
const SequenceseqB () const
 read access seqB

Static Public Member Functions

static edge_ends_t alistr_to_edge_ends (const std::string &alistr)
 convert alignemnt string to edge end vector

Detailed Description

Represents a structure-annotated sequence alignment.

Supports construction of the alignment during traceback.


Constructor & Destructor Documentation

LocARNA::Alignment::Alignment ( const Sequence seqA,
const Sequence seqB 
)

Construct empty alignment from sequences

Parameters:
seqAFirst sequence
seqBSecond sequence

Destructor

LocARNA::Alignment::Alignment ( const Sequence seqA,
const Sequence seqB,
const edges_t edges 
)

Construct alignment from sequences and alignment strings.

Parameters:
seqAFirst sequence
seqBSecond sequence
edgesalignment edges
LocARNA::Alignment::Alignment ( const Alignment alignment)

copy constructor

Parameters:
alignmentobject to be copied Copies implementation object (not only pointer)

Member Function Documentation

const Alignment::edges_t LocARNA::Alignment::alignment_edges ( bool  only_local) const

All alignment edges.

Parameters:
only_localif true, return only local edges
Returns:
pair of vectors of alignment 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).

Alignment::edge_ends_t LocARNA::Alignment::alistr_to_edge_ends ( const std::string &  alistr) [static]

convert alignemnt string to edge end vector

Parameters:
alistralignment string
Returns:
vector of edge ends corresponding to alistr

Append an alignment edge.

Parameters:
ifirst position of edge (or -1 for gap)
jsecond position of edge (or -1 for gap) Edges have to be appended in ascending order

Delete the alignment edges and reset structure

std::string LocARNA::Alignment::dot_bracket_structureA ( bool  only_local) const

Structure A.

Parameters:
only_localif true, construct string only for aligned subsequence
Returns:
dot bracket string for structure A with gaps
std::string LocARNA::Alignment::dot_bracket_structureB ( bool  only_local) const

Structure B.

Parameters:
only_localif true, construct string only for aligned subsequence
Returns:
dot bracket string for structure B with gaps
Alignment & LocARNA::Alignment::operator= ( const Alignment alignment)

assignment operator

Parameters:
alignmentobject to be assigned Assigns implementation object (not only pointer)

read access seqA

Returns:
sequence A

read access seqB

Returns:
sequence B

Set consensus structure of the alignment.

Parameters:
structureconsensus structure
void LocARNA::Alignment::set_structures ( const RnaStructure structureA,
const RnaStructure structureB 
)

Set structures of the alignment.

Parameters:
structureAstructure A
structureBstructure B
void LocARNA::Alignment::swap ( Alignment a1,
Alignment a2 
)

swap two alignments

Parameters:
a1first alignment
a2second alignment Swaps implementation objects (not only pointer)

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends