/usr/include/pbseq/pbdata/amos/AfgBasWriter.hpp is in libpbdata-dev 0~20161219-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | #ifndef _BLASR_AMOS_AFG_BAS_WRITER_HPP_
#define _BLASR_AMOS_AFG_BAS_WRITER_HPP_
#include <cmath>
#include <fstream>
#include <sstream>
#include "../SMRTSequence.hpp"
class AfgBasWriter {
// TODO correct file type? outFile
// TODO change SMRTSequence to FASTQ sequence? then maybe fasta2afg would be
// easier to write
std::string afgFileName;
std::ofstream afgOut;
bool firstRecord;
int recordCount;
int defaultQuality;
// Use 122 = '{' - 1 because '{' and '}' are the message delimiters in AMOS.
static const unsigned char maxAfgQuality = 122;
static const unsigned char charToQuality = 48;
static const unsigned char minAfgQuality = charToQuality + 1;
static const int lineLength = 80;
private:
unsigned char pacbioQVtoPhredQV(unsigned char pacbio);
public:
// Assume that closing the afg file must be done
// manually and not in a destructor.
~AfgBasWriter();
AfgBasWriter();
void Initialize(std::string _afgFileName);
void Close();
int Write(SMRTSequence &seq);
void SetDefaultQuality(int _defaultQuality);
private:
void WriteHeader();
void WriteOpen(void);
void WriteIdentifier(SMRTSequence &seq);
void WriteClose();
void WriteBases(SMRTSequence &seq);
void WriteQualities(SMRTSequence &seq);
};
#endif
|