9 typedef std::vector<char> CharVect;
\r
11 class Seq : public CharVect
\r
17 // Start with moderate size to avoid
\r
18 // thrashing the heap.
\r
27 // Not implemented; prevent use of copy c'tor and assignment.
\r
29 Seq &operator=(const Seq &);
\r
39 const char *GetName() const
\r
43 unsigned GetId() const
\r
45 if (uInsane == m_uId)
\r
46 Quit("Seq::GetId, id not set");
\r
49 void SetId(unsigned uId) { m_uId = uId; }
\r
51 bool FromFASTAFile(TextFile &File);
\r
52 void ToFASTAFile(TextFile &File) const;
\r
53 void ExtractUngapped(MSA &msa) const;
\r
55 void FromString(const char *pstrSeq, const char *pstrName);
\r
56 void Copy(const Seq &rhs);
\r
57 void CopyReversed(const Seq &rhs);
\r
59 void StripGapsAndWhitespace();
\r
61 void SetName(const char *ptrName);
\r
62 unsigned GetLetter(unsigned uIndex) const;
\r
63 unsigned Length() const { return (unsigned) size(); }
\r
64 bool Eq(const Seq &s) const;
\r
65 bool EqIgnoreCase(const Seq &s) const;
\r
66 bool EqIgnoreCaseAndGaps(const Seq &s) const;
\r
67 bool HasGap() const;
\r
68 unsigned GetUngappedLength() const;
\r
70 char GetChar(unsigned uIndex) const { return operator[](uIndex); }
\r
71 void SetChar(unsigned uIndex, char c) { operator[](uIndex) = c; }
\r
72 void AppendChar(char c) { push_back(c); }
\r
76 reference at(size_type i) { return operator[](i); }
\r
77 const_reference at(size_type i) const { return operator[](i); }
\r