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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
/*++
Module Name:
AlignerStats.h
Abstract:
Common statistics for running single & paired alignment.
Authors:
Ravi Pandya, May, 2012
Environment:
`
User mode service.
Revision History:
Integrated from SingleAligner.cpp & PairedAligner.cpp
--*/
#define TIME_HISTOGRAM 0
#pragma once
#include "stdafx.h"
#include "Compat.h"
struct AbstractStats
{
virtual ~AbstractStats();
virtual void add(const AbstractStats* other) = 0;
virtual void printHistograms(FILE* out) = 0;
};
//#define TIME_STRING_DISTANCE 1
struct AlignerStats : public AbstractStats
{
AlignerStats(AbstractStats* i_extra = NULL);
// TODO: This should also count both-aligned vs one-aligned etc.
_int64 totalReads;
_int64 usefulReads;
_int64 singleHits;
_int64 multiHits;
_int64 notFound;
_int64 alignedAsPairs;
_int64 lvCalls;
static const unsigned maxMapq = 70;
unsigned mapqHistogram[maxMapq+1];
#if TIME_HISTOGRAM
//
// Histogram of alignment times. Time buckets are divided by powers-of-two nanoseconds, so time bucket 0 is
// <= 1 ns, time bucket 10 is <= 1.024 us, etc. Time bucket 30 is > 1s.
//
_int64 countByTimeBucket[31];
_int64 nanosByTimeBucket[31];
#endif // TIME_HISTOGRAM
static const unsigned maxMaxHits = 50;
unsigned countOfBestHitsByWeightDepth[maxMaxHits];
unsigned countOfAllHitsByWeightDepth[maxMaxHits];
double probabilityMassByWeightDepth[maxMaxHits];
AbstractStats* extra;
virtual ~AlignerStats();
virtual void add(const AbstractStats* other);
virtual void printHistograms(FILE* out);
};
|