32{
33 SamFile inSam, outSam;
34
37
38
39
40 SamFileHeader samHeader;
43
44
45 SamRecord samRecord;
46 int readNum = 1;
47 bool shiftResult = true;
49 {
50 if((readNum == 3)|| (readNum == 5))
51 {
52 shiftResult = false;
53 }
54 else
55 {
56 shiftResult = true;
57 }
58 ++readNum;
59
62 }
63
64}
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...
bool OpenForWrite(const char *filename, SamFileHeader *header=NULL)
Open a sam/bam file for writing with the specified filename, determining SAM/BAM from the extension (...
bool WriteHeader(SamFileHeader &header)
Writes the specified header into the file.
bool WriteRecord(SamFileHeader &header, SamRecord &record)
Writes the specified record into the file.
bool shiftIndelsLeft()
Shift the indels (if any) to the left by updating the CIGAR.