vdj_pipe
pipeline for processing DNA sequence data
sequence_record.hpp
Go to the documentation of this file.
1 
7 #ifndef SEQUENCE_RECORD_HPP_
8 #define SEQUENCE_RECORD_HPP_
9 #include <iosfwd>
10 #include <iterator>
11 #include <string>
12 #include <vector>
13 
14 namespace vdj_pipe{
15 
18 struct Seq_meta {
20  std::string id_;
21 
23  std::string comm_;
24 };
25 
28 struct Seq_record : public Seq_meta {
29  typedef std::string sequence;
30 
32  sequence seq_;
33 };
34 
35 class Quality : public std::vector<unsigned char> {
36 public:
37  typedef unsigned char value_type;
38 
39 private:
40  typedef std::vector<value_type> vec_t;
41 public:
42  Quality() {}
43 
44  explicit Quality(const std::size_t n, const value_type val = 0)
45  : vec_t(n, val)
46  {}
47 
48  Quality(vec_t const& v) : vec_t(v) {}
49 };
50 
53 struct Qual_record : public Seq_meta {
54  typedef Quality quality;
55 
57  quality qual_;
58 };
59 
62 template<class ChT, class Tr> inline
63 std::basic_ostream<ChT,Tr>& operator<<(
64  std::basic_ostream<ChT,Tr>& os,
66 ) {
67  std::copy(
68  qual.begin(),
69  qual.end(),
70  std::ostream_iterator<Qual_record::quality::value_type>(os, " ")
71  );
72  return os;
73 }
74 
77 struct Seq_qual_record : public Seq_meta {
80 
82  sequence seq_;
83 
85  quality qual_;
86 };
87 
88 }//namespace vdj_pipe
89 #endif /* SEQUENCE_RECORD_HPP_ */
quality qual_
Definition: sequence_record.hpp:57
Quality()
Definition: sequence_record.hpp:42
Definition: sequence_record.hpp:35
Quality(const std::size_t n, const value_type val=0)
Definition: sequence_record.hpp:44
sequence seq_
Definition: sequence_record.hpp:32
Seq_record::sequence sequence
Definition: sequence_record.hpp:78
Definition: sequence_record.hpp:18
Definition: sequence_record.hpp:77
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
Qual_record::quality quality
Definition: sequence_record.hpp:79
std::vector< value_type > vec_t
Definition: sequence_record.hpp:40
Qual_record::quality qual
Definition: match_element_run.cpp:26
Definition: sequence_record.hpp:28
sequence seq_
Definition: sequence_record.hpp:82
unsigned char value_type
Definition: sequence_record.hpp:37
std::string id_
Definition: sequence_record.hpp:20
const std::size_t n
Definition: vector_set_test.cpp:26
quality qual_
Definition: sequence_record.hpp:85
std::string sequence
Definition: sequence_record.hpp:29
Quality quality
Definition: sequence_record.hpp:54
Definition: sequence_record.hpp:53
std::basic_ostream< ChT, Tr > & operator<<(std::basic_ostream< ChT, Tr > &os, Blank const &)
Definition: value_variant.hpp:37
std::string comm_
Definition: sequence_record.hpp:23
Quality(vec_t const &v)
Definition: sequence_record.hpp:48