18#include "TestSamRecordHelper.h"
19#include "TestValidate.h"
20#include "SamRecordHelper.h"
23void testSamRecordHelper()
26 SamRecordHelperTest::testSamRecordHelper(
"testFiles/testSam.sam");
31void SamRecordHelperTest::testSamRecordHelper(
const char* fileName)
37 validateHeader(samHeader);
40 assert(inSam.
ReadRecord(samHeader, samRecord) ==
true);
41 validateRead1(samRecord);
45 TestValidate::READ1_POS,
46 TestValidate::READ1_SEQ.c_str()) == 0);
Allows the user to easily read/write a SAM/BAM file.
bool ReadHeader(SamFileHeader &header)
Reads the header section from the file and stores it in the passed in header.
bool ReadRecord(SamFileHeader &header, SamRecord &record)
Reads the next record from the file & stores it in the passed in record.
bool OpenForRead(const char *filename, SamFileHeader *header=NULL)
Open a sam/bam file for reading with the specified filename, determing the type of file and SAM/BAM b...
static int checkSequence(SamRecord &record, int32_t pos0Based, const char *sequence)
Helper method that checks if the record's read sequence starting at the specified 0-based reference p...
Class providing an easy to use interface to get/set/operate on the fields in a SAM/BAM record.