source: branches/stable/GDE/MUSCLE/src/seqvect.h

Last change on this file was 10390, checked in by aboeckma, 11 years ago

added muscle sourcles amd makefile

File size: 1.5 KB
Line 
1#ifndef SeqVect_h
2#define SeqVect_h
3
4#include <vector>
5#include "seq.h"
6
7typedef std::vector<Seq *> SeqVectBase;
8
9class SeqVect : public SeqVectBase
10        {
11public:
12        SeqVect() {}
13        virtual ~SeqVect();
14
15private:
16// Not implemented; prevent use of copy c'tor and assignment.
17        SeqVect(const SeqVect &);
18        SeqVect &operator=(const SeqVect &);
19
20public:
21        void FromFile(TextFile &File)
22                {
23                FromFASTAFile(File);
24                }
25
26        void FromFASTAFile(TextFile &File);
27        void ToFASTAFile(TextFile &File) const;
28
29        void ToFile(TextFile &File) const
30                {
31                ToFASTAFile(File);
32                }
33
34        void PadToMSA(MSA &msa);
35        void Copy(const SeqVect &rhs);
36        void StripGaps();
37        void StripGapsAndWhitespace();
38        void ToUpper();
39        void Clear();
40        unsigned Length() const { return (unsigned) size(); }
41        unsigned GetSeqCount() const { return (unsigned) size(); }
42        void AppendSeq(const Seq &s);
43        bool FindName(const char *ptrName, unsigned *ptruIndex) const;
44        void LogMe() const;
45        const char *GetSeqName(unsigned uSeqIndex) const;
46        unsigned GetSeqId(unsigned uSeqIndex) const;
47        unsigned GetSeqIdFromName(const char *Name) const;
48        unsigned GetSeqLength(unsigned uSeqIndex) const;
49        void SetSeqId(unsigned uSeqIndex, unsigned uId);
50        Seq &GetSeq(unsigned uIndex);
51        Seq &GetSeqById(unsigned uId);
52        const Seq &GetSeq(unsigned uIndex) const;
53
54        ALPHA GuessAlpha() const;
55        void FixAlpha();
56
57#ifndef _WIN32
58        reference at(size_type i) { return operator[](i); }
59        const_reference at(size_type i) const { return operator[](i); }
60#endif
61        };
62
63#endif  // SeqVect_h
Note: See TracBrowser for help on using the repository browser.