File: ReadsMappingStats.h

package info (click to toggle)
perm 0.4.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 976 kB
  • sloc: cpp: 13,499; makefile: 98; sh: 12
file content (44 lines) | stat: -rw-r--r-- 1,581 bytes parent folder | download | duplicates (5)
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
#pragma once
#include "stdafx.h"
#include "GenomeNTdata.h"
#include "AlignmentsQ.h"

/*
 * This class is a base class for CReadsMapping, which collects the counters for statistics of mapping reads.
 */

class CReadsMappingStats
{
public:
    CReadsMappingStats(void);
    virtual ~CReadsMappingStats(void);
    CAlignmentsQ alignmentsQ[2]; // Queue the founded alignments (Two Queues for paired end reads)
protected:
    static const unsigned int SNP_TYPE_NUM = 4;  // Complement, Transition, Transvertion and Mixed
    int iReadsFileCount;

    /* Basic mapping statistics counter */
    void initializeStatsCounter(void);
    // return true if print the alignments
    void bookKeepMapping(CAlignmentsQ& que);
    // return to a bool value indicating the alignment should be printed or not
    bool printAlignmentOrNot(CAlignmentsQ& que, bool bExcludeAmbiguous, bool ambiguousOnly) const;
    // Print the counter in an order of Runs,Chr0,Chr1,Chr2,Total Hits,Sub0,Sub1,Sub2,Total Kmers
    int printMappingStats(ostream& out, const char* readSetName, unsigned int uiSubThreshold) const;

    void printCommand(ostream& out, string command);

    unsigned int iMapCount;
    unsigned int iMapDiffCount[MAXTOLERATSUBMIS + 1];

    unsigned int iReadCounter;
    unsigned int iBadReadCounter;
    unsigned int iMissReadCounter;
    // # of reads that has multiple place mapping(repeats or ambiguous read)
    unsigned int iMultiMappedReads;
    unsigned int iReadsMapped2tooManyLocations;
    unsigned int iMultiMappedLocationThreshold;
private:
    void initialization(void);
};