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
|
#ifndef H_SoloReadBarcode
#define H_SoloReadBarcode
#include <set>
#include "IncludeDefine.h"
#include "Parameters.h"
#include "SoloReadBarcodeStats.h"
class SoloReadBarcode {
private:
Parameters &P;
public:
ParametersSolo &pSolo;
uint32 homoPolymer[4];//homopolymer constants
string cbSeq, umiSeq, cbQual, umiQual, bSeq, bQual;
string cbSeqCorrected;
uint64 umiB;
//int64 cbI;
int32 cbMatch;//-1: no match, 0: exact, 1: 1 match with 1MM, >1: # of matches with 1MM
int32 umiCheck;//umi check status
string cbMatchString;//CB matches and qualities
vector<uint64> cbMatchInd;//matches
vector<uint32> cbReadCountExact;
map <uint32,uint32> cbReadCountMap;//count read per CB for no WL
array<uint64,256> qualHist;
SoloReadBarcodeStats stats;
SoloReadBarcode(Parameters &Pin);
void getCBandUMI(char **readSeq, char **readQual, uint64 *readLen, const string &readNameExtraIn, const uint32 &readFilesIndex, const char *readName);
void addCounts(const SoloReadBarcode &rfIn);
void addStats(const SoloReadBarcode &rfIn);
void statsOut(ofstream &streamOut);
void matchCBtoWL(string &cbSeq1, string &cbQual1, vector<uint64> &cbWL, int32 &cbMatch1, vector<uint64> &cbMatchInd1, string &cbMatchString1);
bool convertCheckUMI();
void addStats(const int32 cbMatch1);
protected:
void readNameExtra();
};
#endif
|