vdj_pipe
pipeline for processing DNA sequence data
value_map_access_paired.hpp
Go to the documentation of this file.
1 
7 #ifndef VALUE_MAP_ACCESS_PAIRED_HPP_
8 #define VALUE_MAP_ACCESS_PAIRED_HPP_
9 #include "vdj_pipe/value_map.hpp"
11 
12 namespace vdj_pipe{
13 
16 class Vm_access_paired : public Value_map {
17 public:
18  typedef Seq_record::sequence seq_type;
20 
21  struct Err : public base_exception {};
22 
24  : Value_map(), ids_(*this)
25  {}
26 
27  std::string const& description_fwd() const {
28  return value<std::string>(ids_.description_fwd());
29  }
30 
31  void description_fwd(std::string const& descr) {
32  (*this)[ids_.description_fwd()] = descr;
33  }
34 
35  std::string const& description_rev() const {
36  return value<std::string>(ids_.description_rev());
37  }
38 
39  void description_rev(std::string const& descr) {
40  (*this)[ids_.description_rev()] = descr;
41  }
42 
43  seq_type const& sequence_fwd() const {
44  return value<std::string>(ids_.sequence_fwd());
45  }
46 
47  std::string sequence_fwd(const bool trim) const {
48  return sequence(ids_.sequence_fwd(), ids_.interval_fwd(), trim, false);
49  }
50 
51  void sequence_fwd(seq_type const& seq) {
52  (*this)[ids_.sequence_fwd()] = seq;
53  }
54 
55  seq_type const& sequence_rev() const {
56  return value<std::string>(ids_.sequence_rev());
57  }
58 
59  std::string sequence_rev(const bool trim, const bool reverse) const {
60  return sequence(ids_.sequence_rev(), ids_.interval_rev(), trim, reverse);
61  }
62 
63  void sequence_rev(seq_type const& seq) {
64  (*this)[ids_.sequence_rev()] = seq;
65  }
66 
67  qual_type const& quality_fwd() const {
68  return value<qual_type>(ids_.quality_fwd());
69  }
70 
71  qual_type quality_fwd(const bool trim) const {
72  return quality(ids_.quality_fwd(), ids_.interval_fwd(), trim, false);
73  }
74 
75  void quality_fwd(qual_type const& qual) {
76  (*this)[ids_.quality_fwd()] = qual;
77  }
78 
79  qual_type const& quality_rev() const {
80  return value<qual_type>(ids_.quality_rev());
81  }
82 
83  qual_type quality_rev(const bool trim, const bool reverse) const {
84  return quality(ids_.quality_rev(), ids_.interval_rev(), trim, reverse);
85  }
86 
87  void quality_rev(qual_type const& qual) {
88  (*this)[ids_.quality_rev()] = qual;
89  }
90 
91  sequence_interval interval_fwd() const {
92  return value<sequence_interval>(ids_.interval_fwd());
93  }
94 
95  void interval_fwd(sequence_interval const& si) {
96  (*this)[ids_.interval_fwd()] = si;
97  }
98 
99  sequence_interval interval_rev() const {
100  return value<sequence_interval>(ids_.interval_rev());
101  }
102 
103  void interval_rev(sequence_interval const& si) {
104  (*this)[ids_.interval_rev()] = si;
105  }
106 
107  std::string const& sequence_path_fwd() const {
108  return value<std::string>(ids_.sequence_path_fwd());
109  }
110 
111  void sequence_path_fwd(std::string const& s) {
112  (*this)[ids_.sequence_path_fwd()] = s;
113  }
114 
115  std::string const& sequence_path_rev() const {
116  return value<std::string>(ids_.sequence_path_rev());
117  }
118 
119  void sequence_path_rev(std::string const& s) {
120  (*this)[ids_.sequence_path_rev()] = s;
121  }
122 
123  std::string const& quality_path_fwd() const {
124  return value<std::string>(ids_.quality_path_fwd());
125  }
126 
127  void quality_path_fwd(std::string const& s) {
128  (*this)[ids_.quality_path_fwd()] = s;
129  }
130 
131  std::string const& quality_path_rev() const {
132  return value<std::string>(ids_.quality_path_rev());
133  }
134 
135  void quality_path_rev(std::string const& s) {
136  (*this)[ids_.quality_path_rev()] = s;
137  }
138 
139 protected:
140  Value_ids_paired ids_;
141 };
142 
146 public:
148  : Vm_access_paired(), ids_(*this)
149  {}
150 
151  seq_type const& emid_fwd() const {
152  return value<std::string>(ids_.emid_fwd());
153  }
154 
155  void emid_fwd(seq_type const& seq) {
156  (*this)[ids_.emid_fwd()] = seq;
157  }
158 
159  seq_type const& emid_rev() const {
160  return value<std::string>(ids_.emid_rev());
161  }
162 
163  void emid_rev(seq_type const& seq) {
164  (*this)[ids_.emid_rev()] = seq;
165  }
166 
167  std::string const& emid_path_fwd() const {
168  return value<std::string>(ids_.emid_path_fwd());
169  }
170 
171  std::string const& emid_path_rev() const {
172  return value<std::string>(ids_.emid_path_rev());
173  }
174 
175  void emid_path_fwd(std::string const& s) {
176  (*this)[ids_.emid_path_fwd()] = s;
177  }
178 
179  void emid_path_rev(std::string const& s) {
180  (*this)[ids_.emid_path_rev()] = s;
181  }
182 
183 private:
184  Value_ids_emid ids_;
185 };
186 
187 }//namespace vdj_pipe
188 #endif /* VALUE_MAP_ACCESS_PAIRED_HPP_ */
Provides access to standard values for paired read pipeline.
Definition: value_names.hpp:70
Provides access to standard eMID values.
Definition: value_names.hpp:111
Definition: sequence_record.hpp:35
Access to value map for paired read pipeline and processing steps.
Definition: value_map_access_paired.hpp:16
Access to value map for paired eMID read pipeline and processing steps.
Definition: value_map_access_paired.hpp:145
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Definition: value_map_access_paired.hpp:21
Definition: exception.hpp:23
Store values mapped against name strings and value IDs.
Definition: value_map.hpp:23