-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSamReader.H
37 lines (34 loc) · 1019 Bytes
/
SamReader.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/****************************************************************
SamReader.H
Copyright (C)2020 William H. Majoros ([email protected])
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
****************************************************************/
#ifndef INCL_SamReader_H
#define INCL_SamReader_H
#include <iostream>
#include <utility>
#include "SamRecord.H"
#include "BOOM/File.H"
#include "BOOM/String.H"
#include "BOOM/Regex.H"
#include "BOOM/Set.H"
#include "SamRecord.H"
using namespace std;
using namespace BOOM;
class SamReader {
public:
SamReader();
SamReader(const String &filename); // sam file can be gzipped!
virtual ~SamReader();
virtual SamRecord *nextSequence() { return nextRecord(); }
virtual SamRecord *nextRecord();
virtual SamRecord *nextSeqAndText(String &line);
virtual void close();
protected:
Regex gzRegex;
Set<char> headerChars;
File *fh;
Vector<String> headerLines;
};
#endif