5 #ifndef BPP_SEQ_SEQUENCETOOLS_H
6 #define BPP_SEQ_SEQUENCETOOLS_H
49 std::string
getName()
const {
return "Bowker's test for homogeneity."; }
66 static std::shared_ptr<RNY>
RNY_;
93 if (end < begin || end >= sequence.
size())
95 std::vector<int> content(end - begin + 1);
96 for (
size_t i = 0; i <= end - begin; ++i)
98 content[i] = sequence[begin + i];
111 template<
class SequenceTypeOut>
115 auto seq = std::make_unique<SequenceTypeOut>(alphaPtr);
116 seq->setName(sequence.
getName());
118 subseq(sequence, begin, end, *seq);
136 template<
class SequenceTypeOut>
145 throw Exception (
"SequenceTools::concatenate : Sequence's names don't match");
148 auto concat = std::make_unique<SequenceTypeOut>(seq1);
149 concat->setToSizeR(seq1.
size() + seq2.
size());
150 for (
size_t i = 0; i < seq2.
size(); ++i)
152 (*concat)[seq1.
size() + i] = seq2[i];
360 std::vector<std::unique_ptr<SequenceInterface>>& hap,
361 unsigned int level = 2);
400 std::string name =
"",
401 unsigned int level = 1);
463 static std::unique_ptr<Sequence>
getRandomSequence(std::shared_ptr<const Alphabet>& alphabet,
size_t length);
Exception thrown when two alphabets do not match.
virtual std::string getAlphabetType() const =0
Identification method.
Bowker's homogeneity test results class.
void setStatistic(double stat)
std::string getName() const
double getStatistic() const
void setPValue(double pvalue)
BowkerTest * clone() const
virtual const std::string & getName() const =0
Get the name of this sequence.
virtual std::shared_ptr< const Alphabet > getAlphabet() const =0
Get the alphabet associated to the list.
virtual size_t size() const =0
Get the number of elements in the list.
virtual const Alphabet & alphabet() const =0
Get the alphabet associated to the list.
Partial implementation of the Transliterator interface for genetic code object.
Replication between to nucleic acids.
virtual void append(const SequenceInterface &seq)=0
Append the content of the sequence.
A basic implementation of the Sequence interface.
std::string toString(T t)
This alphabet is used to deal NumericAlphabet.