7 #ifndef PARSER_FASTQ_HPP_ 8 #define PARSER_FASTQ_HPP_ 10 #include "boost/foreach.hpp" 32 <<
Err::msg_t(
"wrong file format for FASTQ parser")
42 const char offset = qual_offset
59 Parser_line::seek_line(
'+');
71 Parser_line::seek_line(
'@');
78 return Parser_line::get_id(
'@');
85 return Parser_line::get_defstr(
'@');
103 return Parser_line::get_sequence(
'+');
112 template<
class InsertIter>
void get_qual(InsertIter i) {
126 Parser_line::seek_line(
'+');
135 BOOST_FOREACH(
const char c,
str_) {
136 if( c < '!' || c >
'~') BOOST_THROW_EXCEPTION(
154 if( qr.
seq_.size() != qr.
qual_.size() ) BOOST_THROW_EXCEPTION(
156 <<
Err::msg_t(
"sequence-quality size mismatch")
State
Definition: parser_fastq.hpp:20
Parser_fastq(std::istream &is, const compression::Compression compr=compression::none, const char offset=qual_offset)
Definition: parser_fastq.hpp:39
bool has_next() const
Definition: parser_line.hpp:31
record::sequence sequence
Definition: parser_fastq.hpp:23
Definition: sequence_record.hpp:35
format::Format format() const
Definition: file.hpp:75
Parser for FASTQ files.
Definition: parser_fastq.hpp:19
File_istream fis_
Definition: parser_line.hpp:103
std::string str_
Definition: parser_line.hpp:104
record::quality quality
Definition: parser_fastq.hpp:24
Seq_record::sequence sequence
Definition: sequence_record.hpp:78
Compression
File compression types.
Definition: file_properties.hpp:19
const boost::string_ref get_defstr()
Definition: parser_fastq.hpp:81
boost::error_info< struct errinfo_int1_, int > int1_t
Definition: exception.hpp:28
Definition: sequence_record.hpp:77
Definition: parser_line.hpp:26
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
void get_qual(InsertIter i)
Definition: parser_fastq.hpp:112
static const char qual_offset
Definition: parser_fastq.hpp:25
Parser_line(File_input const &fi)
Definition: parser_line.hpp:34
std::string const & path() const
Definition: file.hpp:74
const boost::string_ref get_id()
Definition: parser_fastq.hpp:74
sequence seq_
Definition: sequence_record.hpp:82
boost::error_info< struct errinfo_int2_, int > int2_t
Definition: exception.hpp:29
boost::error_info< struct errinfo_str1_, std::string > str1_t
Definition: exception.hpp:25
State state_
Definition: parser_fastq.hpp:167
void set_meta(Seq_meta &sm, const char tag)
Definition: parser_line.hpp:70
quality get_qual()
Definition: parser_fastq.hpp:106
void next_record()
Definition: parser_fastq.hpp:49
int line_num() const
Definition: parser_line.hpp:30
quality qual_
Definition: sequence_record.hpp:85
Definition: parser_fastq.hpp:20
Seq_qual_record record
Definition: parser_fastq.hpp:22
boost::error_info< struct errinfo_message_, std::string > msg_t
Definition: exception.hpp:24
Definition: parser_fastq.hpp:20
record get_record()
Definition: parser_fastq.hpp:147
std::string sanitize(const char c)
Definition: sanitize_string.cpp:53
Basic line-based parser; use to derive other parsers.
Definition: parser_line.hpp:23
std::istream & istream()
Definition: file_stream.hpp:102
boost::error_info< struct errinfo_line_n_, int > line_t
Definition: parser_line.hpp:27
Definition: parser_fastq.hpp:20
Parser_fastq(File_input const &fi, const char offset=qual_offset)
Definition: parser_fastq.hpp:27
Definition: file_properties.hpp:20
const char offset_
Definition: parser_fastq.hpp:166
sequence get_sequence()
Definition: parser_fastq.hpp:88
Definition: parser_fastq.hpp:20
int line_
Definition: parser_line.hpp:105
void skip_line()
Definition: parser_line.hpp:53