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