1 #ifndef LOCARNA_TRACE_CONTROLLER_HH
2 #define LOCARNA_TRACE_CONTROLLER_HH
12 #include "multiple_alignment.hh"
17 class AnchorConstraints;
91 const std::vector<TraceRange> &trs,
105 const std::vector<TraceRange> &trs)
const;
169 using idx_vec_t = std::vector<size_t>;
220 bool relaxed_merging =
false);
286 static const char delimiter =
'&';
Represents anchor constraints between two sequences.
Definition: anchor_constraints.hh:66
abstract class that declares the method is_valid_match()
Definition: trace_controller.hh:175
virtual bool is_valid_match(size_t i, size_t j) const =0
A row in a multiple alignment.
Definition: multiple_alignment.hh:111
Represents a multiple alignment.
Definition: multiple_alignment.hh:65
"Sequence View" of multiple alignment as array of column vectors
Definition: sequence.hh:17
Controls the matrix cells valid for traces.
Definition: trace_controller.hh:200
void restrict_by_trace_probabilities(const TraceProbs &trace_probs, double min_prob)
Restrict by anchor constraints.
Definition: trace_controller.cc:566
TraceController(const Sequence &seqA, const Sequence &seqB, const MultipleAlignment *ma, int delta, bool relaxed_merging=false)
Constructs for the general case of alignment of alignments.
Definition: trace_controller.cc:406
TraceController reverse() const
Controller for the reversed sequences.
Definition: trace_controller.cc:600
virtual ~TraceController()
Virtual destructor.
Definition: trace_controller.cc:358
void restrict_by_anchors(const AnchorConstraints &constraints)
Restrict by anchor constraints.
Definition: trace_controller.cc:542
size_type get_delta() const
Read deviation.
Definition: trace_controller.hh:279
virtual bool is_valid_match(size_type i, size_type j) const
Definition: trace_controller.hh:334
bool is_valid(size_type i, size_type j) const
Is (i,j) a valid cell of the DP matrices (i.e. on some possible trace)?
Definition: trace_controller.hh:329
Provide trace probabilities.
Definition: edge_probs.hh:210
Represents a range of traces.
Definition: trace_controller.hh:27
MultipleAlignment::SeqEntry SeqEntry
alias for MultipleAlignment::SeqEntry
Definition: trace_controller.hh:30
idx_vec_t max_col_
maximal column in row
Definition: trace_controller.hh:171
std::pair< SeqEntry, SeqEntry > seqentry_pair_t
pair of sequence entries
Definition: trace_controller.hh:33
TraceRange(const SeqEntry &pseqA, const SeqEntry &pseqB, const SeqEntry &aliA, const SeqEntry &aliB, size_type delta)
Construct from pair of alignment strings.
Definition: trace_controller.cc:43
TraceRange(size_t lenA, size_t lenB)
Construct "empty".
Definition: trace_controller.hh:161
static seqentry_pair_t remove_common_gaps(const SeqEntry &aliA, const SeqEntry &aliB)
Definition: trace_controller.cc:25
void print_debug(std::ostream &out=std::cerr) const
Definition: trace_controller.cc:341
idx_vec_t min_col_
minimal column in row
Definition: trace_controller.hh:170
size_t max_col(size_t i) const
Maximal column of trace in a row.
Definition: trace_controller.hh:135
size_t rows() const
Read number of rows.
Definition: trace_controller.hh:112
size_type consensus_cost(size_type i, size_type j, const std::vector< TraceRange > &trs) const
Computes cost of a cut in the consensus trace of a trace range set.
Definition: trace_controller.cc:215
size_t min_col(size_t i) const
Minimal column of trace in a row.
Definition: trace_controller.hh:123
size_t lenA_
length of sequence A
Definition: trace_controller.hh:166
TraceRange reverse() const
Ranges for reversed sequences.
Definition: trace_controller.cc:320
size_t lenB_
length of sequence B
Definition: trace_controller.hh:167
Definition: aligner.cc:15
size_t size_type
general size type
Definition: aux.hh:120