libStatGen Software
1
Loading...
Searching...
No Matches
SamStatistics.h
1
/*
2
* Copyright (C) 2010 Regents of the University of Michigan
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef __SAM_STATISTICS_H__
19
#define __SAM_STATISTICS_H__
20
21
#include <stdint.h>
22
#include "SamRecord.h"
23
24
class
SamStatistics
25
{
26
public
:
27
SamStatistics
();
28
~SamStatistics
();
29
30
// Reset the statistics - clear them for processing a new file.
31
void
reset();
32
33
// Method to update the statistics to include the passed in record.
34
bool
updateStatistics(
SamRecord
& samRecord);
35
36
void
print();
37
38
private
:
39
40
///////////////////////////////////////////////////////
41
// Read Counts
42
43
/// The number of reads (records) that were processed.
44
uint64_t myReadCount;
45
46
/// The number of mapped reads (records).
47
uint64_t myMappedReadCount;
48
49
/// The number of paired reads (records).
50
uint64_t myPairedReadCount;
51
52
/// The number of proper paired reads (records).
53
uint64_t myProperPairedReadCount;
54
55
/// The number of duplicate reads (based on the flag).
56
uint64_t myDupReadCount;
57
58
/// The number of QC failure reads (based on the flag).
59
uint64_t myQCFailureReadCount;
60
61
///////////////////////////////////////////////////////
62
// Base Counts
63
64
/// The total number of bases in the reads in the file (sum of read lengths)
65
uint64_t myBaseCount;
66
67
/// The total number of bases in mapped reads (sum of read lengths for mapped reads).
68
uint64_t myMappedReadBases;
69
};
70
71
#endif
SamRecord
Class providing an easy to use interface to get/set/operate on the fields in a SAM/BAM record.
Definition
SamRecord.h:52
SamStatistics
Definition
SamStatistics.h:25
bam
SamStatistics.h
Generated by
1.9.8