libStatGen Software
1
BamInterface.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 __BAM_INTERFACE_H__
19
#define __BAM_INTERFACE_H__
20
21
#include "GenericSamInterface.h"
22
23
class
BamInterface
:
public
GenericSamInterface
24
{
25
public
:
26
BamInterface
();
27
~
BamInterface
();
28
29
// Reads the header section from the specified BAM file and stores it in
30
// the passed in header.
31
// Returns false and updates the status on failure.
32
virtual
bool
readHeader(
IFILE
filePtr,
SamFileHeader
& header,
33
SamStatus
& samStatus);
34
35
// Writes the specified header into the specified BAM file.
36
// Returns false and updates the status on failure.
37
virtual
bool
writeHeader(
IFILE
filePtr,
SamFileHeader
& header,
38
SamStatus
& samStatus);
39
40
// Reads the next record from the specified BAM file and stores it in
41
// the passed in record.
42
virtual
void
readRecord(
IFILE
filePtr,
43
SamFileHeader
& header,
44
SamRecord
& record,
45
SamStatus
& samStatus);
46
47
// Writes the specified record into the specified BAM file.
48
virtual
SamStatus::Status
writeRecord(
IFILE
filePtr,
49
SamFileHeader
& header,
50
SamRecord
& record,
51
SamRecord::SequenceTranslation
translation);
52
53
private
:
54
55
};
56
57
#endif
BamInterface
Definition:
BamInterface.h:24
SamRecord::SequenceTranslation
SequenceTranslation
Enum containing the settings on how to translate the sequence if a reference is available.
Definition:
SamRecord.h:57
StatGenStatus
This class is used to track the status results of some methods in the BAM classes.
Definition:
StatGenStatus.h:27
StatGenStatus::Status
Status
Return value enum for StatGenFile methods.
Definition:
StatGenStatus.h:32
SamFileHeader
This class allows a user to get/set the fields in a SAM/BAM Header.
Definition:
SamFileHeader.h:35
SamRecord
Class providing an easy to use interface to get/set/operate on the fields in a SAM/BAM record.
Definition:
SamRecord.h:52
GenericSamInterface
Definition:
GenericSamInterface.h:27
InputFile
Class for easily reading/writing files without having to worry about file type (uncompressed,...
Definition:
InputFile.h:37
bam
BamInterface.h
Generated by
1.8.18