]> git.donarmstrong.com Git - mothur.git/blob - uc.h
8edef832487b8756f108ef1e1323d5ab4076dcee
[mothur.git] / uc.h
1 //uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain.\r
2 \r
3 #ifndef uc_h\r
4 #define uc_h\r
5 \r
6 #include "seqdb.h"\r
7 #include "seq.h"\r
8 #include "path.h"\r
9 \r
10 struct AlnData;\r
11 \r
12 int uchime_main(int, char**);  \r
13 \r
14 class UCFile\r
15         {\r
16 public:\r
17         FILE *m_File;\r
18         byte *m_Data;\r
19         vector<char> m_RecTypes;\r
20         vector<float> m_PctIds;\r
21         vector<const char *> m_Labels;\r
22         vector<const char *> m_SeedLabels;\r
23         vector<unsigned> m_SeedIndexes;\r
24         vector<const char *> m_CompressedPaths;\r
25         vector<unsigned> m_SeqLengths;\r
26         vector<unsigned> m_SortOrder;\r
27         vector<char> m_Strands;\r
28         vector<unsigned> m_Los;\r
29         vector<unsigned> m_SeedLos;\r
30 \r
31 public:\r
32         /* some function prototypes */\r
33         \r
34                 \r
35         UCFile();\r
36         void Clear(bool ctor = false);\r
37         void Close();\r
38         void FromFile(const string &FileName);\r
39         void FromClstr(const string &FileName);\r
40         void ToFile(const string &FileName);\r
41         unsigned GetRecordCount() const;\r
42         void LogMe() const;\r
43         void ToClstr(const string &FileName);\r
44         void ToFasta(const string &FileName, const SeqDB &Input, bool Reformat);\r
45         void Create(const string &FileName);\r
46         void Sort();\r
47         void Flush() const;\r
48 \r
49         void WriteNotMatched(unsigned L, const char *Label) const;\r
50         void WriteLibSeed(unsigned SeedIndex, unsigned L, const char *Label) const;\r
51         void WriteNewSeed(unsigned SeedIndex, unsigned L, const char *Label) const;\r
52         void WriteHit(const SeqData &SA, const SeqData &SB, double FractId,\r
53           const PathData &PD) const;\r
54         void WriteReject(const SeqData &SA, const SeqData &SB, double FractId,\r
55           const char *Path) const;\r
56         void WriteHit(unsigned SeedIndex, unsigned L, double PctId,\r
57           const char *CompressedPath, char Strand, unsigned Lo, unsigned SeedLo,\r
58           const char *Label, const char *SeedLabel) const;\r
59         void WriteHit(const AlnData &AD);\r
60         void WriteLibCluster(unsigned SeedIndex, unsigned Size, double AvgId,\r
61           const char *Label) const;\r
62         void WriteNewCluster(unsigned SeedIndex, unsigned Size, double AvgId,\r
63           const char *Label) const;\r
64         void WriteSeqX(FILE *f, const byte *Seq, unsigned L, const char *CompressedPath) const;\r
65         };\r
66 \r
67 #endif // uc_h\r