41 #ifndef _SEQUENCECONTAINERTOOLS_H_ 42 #define _SEQUENCECONTAINERTOOLS_H_ 96 const std::vector<std::string>& seqNames)
111 template<
class ContFrom,
class ContTo,
class Seq>
113 for (
size_t i = 0; i < input.getNumberOfSequences(); ++i) {
114 std::auto_ptr<Seq> seq(
new Seq(input.getSequence(i)));
115 output.addSequence(*seq);
217 std::vector<std::string> seqNames = seqCont2.getSequencesNames();
218 for (
size_t i = 0; i < seqNames.size(); i++)
219 seqCont1.addSequence(seqCont2.getSequence(seqNames[i]), checkNames);
252 if (seqCont1.getAlphabet()->getAlphabetType() != seqCont2.getAlphabet()->getAlphabetType())
255 std::vector<std::string> seqNames = seqCont1.getSequencesNames();
256 for (
size_t i = 0; i < seqNames.size(); i++)
259 tmp.
append(seqCont2.getContent(seqNames[i]));
260 outputCont.addSequence(tmp,
false);
275 std::vector<std::string> seqNames = seqCont.getSequencesNames();
276 bool checkNames = outputCont.getNumberOfSequences() > 0;
277 for (
size_t i = 0; i < seqNames.size(); i++)
279 BasicSequence seq(seqNames[i], seqCont.toString(seqNames[i]), outputCont.getAlphabet());
280 outputCont.addSequence(seq, checkNames);
298 #endif //_SEQUENCECONTAINERTOOLS_H_ std::vector< size_t > SiteSelection
The OrderedSequenceContainer interface.
This alphabet is used to deal NumericAlphabet.
std::vector< size_t > SequenceSelection
virtual const Sequence & getSequence(size_t sequenceIndex) const =0
Retrieve a sequence object from the container.
The alphabet exception base class.
A basic implementation of the Sequence interface.
virtual void append(const std::vector< int > &content)
Append the specified content to the sequence.
virtual void addSequence(const Sequence &sequence, bool checkName)=0
Add a sequence to the container.
Exception thrown when two alphabets do not match.
The SequenceContainer interface.
virtual size_t getNumberOfSequences() const =0
Get the number of sequences in the container.