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
|
#ifndef H_SoloReadFeatureStats
#define H_SoloReadFeatureStats
#include "IncludeDefine.h"
class SoloReadFeatureStats {
public:
vector<string> names;
enum { noUnmapped, noNoFeature, MultiFeature, subMultiFeatureMultiGenomic, noTooManyWLmatches, noMMtoWLwithoutExact, yesWLmatch, yessubWLmatchExact, yessubWLmatch_UniqueFeature, yesCellBarcodes, yesUMIs, nStats};
uint64 V[nStats];
SoloReadFeatureStats()
{
names={"noUnmapped","noNoFeature","MultiFeature","subMultiFeatureMultiGenomic","noTooManyWLmatches","noMMtoWLwithoutExact","yesWLmatch","yessubWLmatchExact","yessubWLmatch_UniqueFeature","yesCellBarcodes","yesUMIs"};
for (uint32 ii=0; ii<nStats; ii++)
V[ii]=0;
};
uint64 numInvalidBarcodes()
{
return V[noTooManyWLmatches]+V[noMMtoWLwithoutExact];
};
uint64 numMappedToTranscriptome()
{
return V[yesWLmatch];
};
/*
void calcUnique(bool multYes)
{
if ( multYes ) {//multi-genic reads were counted in yesWLmatch
V[yessubWLmatch_UniqueFeature] = V[yesWLmatch] - V[MultiFeature];
} else {//no multi-genic reads
V[yessubWLmatch_UniqueFeature] = V[yesWLmatch];
};
};
*/
uint64 numMappedToTranscriptomeUnique()
{
return V[yessubWLmatch_UniqueFeature];
};
double numSequencingSaturation()
{
return 1.0 - double(V[yesUMIs])/V[yessubWLmatch_UniqueFeature]; //yesUMIs is calculated for unqiue-gene reads
};
};
#endif
|