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
|
#ifndef TAGALIGNMENTS_H
#define TAGALIGNMENTS_H
#include<stdint.h>
#include<vector>
using namespace std;
class TagAlignments{
private:
vector<int_least32_t> trIds;
vector<double> probs;
vector<int_least32_t> readIndex;
vector<int_least32_t> readsInIsoform;
bool storeLog,knowNtotal,knowNreads;
long M,Ntotal,Nreads,currentRead,reservedN;
public:
TagAlignments(bool storeL = true);
void init(long Nreads = 0,long Ntotal = 0,long M = 0);
void pushAlignment(long trId, double prob);
void pushAlignmentL(long trId, double lProb);
void pushRead();
void finalizeRead(long *M, long *Nreads, long *Ntotal);
int_least32_t getTrId(long i) const;
double getProb(long i) const;
int_least32_t getReadsI(long i) const;
long getNreads() const { return Nreads;}
};
#endif
|