41 #ifndef _SEQUENCECONTAINER_H_ 42 #define _SEQUENCECONTAINER_H_ 44 #include "../Alphabet/Alphabet.h" 45 #include "../Sequence.h" 47 #include <Bpp/Clonable.h> 81 public virtual Clonable
128 virtual bool hasSequence(
const std::string& name)
const = 0;
153 virtual void setSequence(
const std::string& name,
const Sequence& sequence,
bool checkName)
throw (Exception) = 0;
197 virtual void setSequencesNames(
const std::vector<std::string>& names,
bool checkNames)
throw (Exception) = 0;
241 virtual void clear() = 0;
297 virtual int&
operator()(
const std::string& sequenceName,
size_t elementIndex) = 0;
309 virtual const int&
operator()(
const std::string& sequenceName,
size_t elementIndex)
const = 0;
315 #endif // _SEQUENCECONTAINER_H_ Exception thrown when a sequence is not found The sequence not found exception base class...
virtual void setSequence(const std::string &name, const Sequence &sequence, bool checkName)=0
Replace a sequence in the container.
virtual Sequence * removeSequence(const std::string &name)=0
Extract (and remove) a sequence from the container.
std::vector< std::string > Comments
Declaration of Comments type.
virtual void setSequencesNames(const std::vector< std::string > &names, bool checkNames)=0
Set all sequence names.
virtual void clear()=0
Delete all sequences in the container.
virtual ~SequenceContainer()
This alphabet is used to deal NumericAlphabet.
virtual std::string toString(const std::string &name) const =0
Convert a particular sequence to a string.
virtual int & valueAt(const std::string &sequenceName, size_t elementIndex)=0
Element access function.
virtual void deleteGeneralComments()=0
Delete the comments associated to this container.
virtual size_t getNumberOfSequences() const =0
Get the number of sequences in the container.
virtual int & operator()(const std::string &sequenceName, size_t elementIndex)=0
Element access operator.
virtual const Comments & getGeneralComments() const =0
Get the comments of this container.
virtual void deleteSequence(const std::string &name)=0
Delete a sequence of the container.
virtual const Comments & getComments(const std::string &name) const =0
Get comments of a particular sequence.
virtual const Sequence & getSequence(const std::string &name) const =0
Retrieve a sequence object from the container.
virtual void addSequence(const Sequence &sequence, bool checkName)=0
Add a sequence to the container.
virtual std::vector< std::string > getSequencesNames() const =0
Get all the names of the sequences in the container.
virtual bool hasSequence(const std::string &name) const =0
Check if a sequence with a given name is present in the container.
virtual void setComments(const std::string &name, const Comments &comments)=0
Set the comments of a particular sequence.
virtual const std::vector< int > & getContent(const std::string &name) const =0
Get the content of a sequence.
virtual SequenceContainer * createEmptyContainer() const =0
Return a copy of this container, but with no sequence inside.
virtual const Alphabet * getAlphabet() const =0
Get sequence container's alphabet.
virtual void setGeneralComments(const Comments &comments)=0
Set the comments of this container.
The SequenceContainer interface.