File: SoloReadFeatureStats.h

package info (click to toggle)
rna-star 2.7.8a%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,076 kB
  • sloc: cpp: 20,429; awk: 483; ansic: 470; makefile: 181; sh: 31
file content (38 lines) | stat: -rw-r--r-- 999 bytes parent folder | download
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
#ifndef H_SoloReadFeatureStats
#define H_SoloReadFeatureStats
#include "IncludeDefine.h"

class SoloReadFeatureStats {
public:
    vector<string> names;
    enum {      nUnmapped,  nNoFeature,  nAmbigFeature,  nAmbigFeatureMultimap,  nTooMany,  nNoExactMatch,  nExactMatch,  nMatch,  nCellBarcodes,  nUMIs, nStats};
    uint64 V[nStats];    
    SoloReadFeatureStats() 
    {
        names={"nUnmapped","nNoFeature","nAmbigFeature","nAmbigFeatureMultimap","nTooMany","nNoExactMatch","nExactMatch","nMatch","nCellBarcodes","nUMIs"};
        for (uint32 ii=0; ii<nStats; ii++)
            V[ii]=0;
    };
    
    uint64 numInvalidBarcodes()
    {
        return V[nTooMany]+V[nNoExactMatch];
    };
    
    uint64 numMappedToTranscriptome()
    {
        return V[nAmbigFeature]+V[nMatch];
    };
    
    uint64 numMappedToTranscriptomeUnique()
    {
        return V[nMatch];
    };
    
    double numSequencingSaturation()
    {
        return 1.0 - double(V[nUMIs])/V[nMatch];
    };
};

#endif