Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
fastq_iterator.h
Go to the documentation of this file.
1 #ifndef __foghorn__fastq_iterator__
2 #define __foghorn__fastq_iterator__
3 
4 
5 #include "fastq.h"
6 
7 namespace gamgee {
8 
13  public:
14 
18  FastqIterator();
19 
25  FastqIterator(std::istream* in);
26 
31  FastqIterator(const FastqIterator&) = delete;
32 
37 
46  bool operator!=(const FastqIterator& rhs);
47 
53  Fastq& operator*();
54 
60  Fastq& operator++();
61 
62  private:
63  std::istream* m_input_stream;
64  Fastq m_element;
65  bool m_is_fastq;
66  char m_eos_delim;
67  char m_bor_delim;
68 
69  Fastq fetch_next_element();
70  std::string parse_comment();
71  std::string parse_seq();
72  std::string parse_quals(uint32_t seq_length);
73  const std::string parse_multiline();
74  void skip_new_lines();
75 };
76 
77 } // end namespace gamgee
78 
79 #endif
bool operator!=(const FastqIterator &rhs)
inequality operator (needed by for-each loop)
Definition: fastq_iterator.cpp:49
FastqIterator()
creates an empty iterator (used for the end() method)
Definition: fastq_iterator.cpp:11
Utility class to hold one FastA or FastQ record.
Definition: fastq.h:13
Utility class to enable for-each style iteration in the FastqReader class.
Definition: fastq_iterator.h:12
Fastq & operator*()
dereference operator (needed by for-each loop)
Definition: fastq_iterator.cpp:40
Fastq & operator++()
increment operator (needed by for-each loop)
Definition: fastq_iterator.cpp:44