15 using LHType = std::array<cmaple::RealNumType, NUM_STATES>;
19 using LHPtrType = std::unique_ptr<LHType>;
36 void computeLhAmbiguity(
const LHType& entries);
52 void convertAmbiguiousStateDNA(
int max_num_states);
59 void convertAmbiguiousStateAA(
int max_num_states);
67 cmaple::RealNumType plength_observation2node = -1;
79 cmaple::RealNumType plength_observation2root = -1;
89 cmaple::RealNumType getLH(
int pos)
const {
90 assert(type == TYPE_O);
91 return (*likelihood)[
static_cast<unsigned long>(pos)];
97 SeqRegion() =
default;
102 SeqRegion(cmaple::StateType n_type,
103 cmaple::PositionType n_position,
104 cmaple::RealNumType n_plength_observation = -1,
105 cmaple::RealNumType n_plength_from_root = -1,
106 LHPtrType n_likelihood =
nullptr);
111 SeqRegion(cmaple::StateType n_type,
112 cmaple::PositionType n_position,
113 cmaple::RealNumType n_plength_observation,
114 cmaple::RealNumType n_plength_from_root,
115 const LHType& n_likelihood);
123 SeqRegion(cmaple::StateType n_type,
124 cmaple::PositionType n_position,
134 SeqRegion(Mutation* n_mutation,
147 SeqRegion(SeqRegion&& region)
noexcept =
default;
151 SeqRegion& operator=(SeqRegion&& region)
noexcept =
default;
156 static inline SeqRegion clone(
const SeqRegion& from) {
158 return SeqRegion(from.type, from.position, from.plength_observation2node,
159 from.plength_observation2root, *from.likelihood);
161 return SeqRegion(from.type, from.position, from.plength_observation2node,
162 from.plength_observation2root);
168 ~SeqRegion() =
default;
173 bool operator==(
const SeqRegion& seqregion_1)
const;
180 static SeqType parseSeqType(
const std::string& n_seqtype_str);
SeqType
Definition seqregion.h:25
@ SEQ_DNA
Definition seqregion.h:26
@ SEQ_PROTEIN
Definition seqregion.h:27
@ SEQ_UNKNOWN
Definition seqregion.h:29
@ SEQ_AUTO
Definition seqregion.h:28