libStatGen Software  1
TestEquals.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 #include "SamFile.h"
19 void testSeqEquals();
20 
22 {
23 public:
24  enum FileType{SAM, BAM};
25  static void testEq(FileType inputType);
26 
27 private:
28  static void reset();
29 
30  static void validateEqRead(SamRecord& samRecord,
31  int readIndex,
32  const char* actualExpectedSequence);
33  static void validateEqReadBuffer(SamRecord& samRecord,
34  const char* expectedSequence);
35 
36  static const char* READ_NAMES[];
37  static const char* READ_SEQS_BASES[];
38  static const char* READ_SEQS_EQUALS[];
39  static const char* READ_SEQS_MIXED[];
40 
41  static const char* expectedReferenceName;
42  static const char* expectedMateReferenceName;
43  static const char* expectedMateReferenceNameOrEqual;
44  static const char* expectedCigar;
45  static const char* expectedQuality;
46 
47  static std::vector<unsigned int> expectedCigarHex;
48 
49  static int expected0BasedAlignmentEnd;
50  static int expected1BasedAlignmentEnd;
51  static int expectedAlignmentLength;
52  static int expected0BasedUnclippedStart;
53  static int expected1BasedUnclippedStart;
54  static int expected0BasedUnclippedEnd;
55  static int expected1BasedUnclippedEnd;
56 
57  static bamRecordStruct expectedRecord;
58 };
Class providing an easy to use interface to get/set/operate on the fields in a SAM/BAM record.
Definition: SamRecord.h:52
Structure of a BAM record.
Definition: SamRecord.h:34