vdj_pipe
pipeline for processing DNA sequence data
value_names.hpp
Go to the documentation of this file.
1 
7 #ifndef VALUE_NAMES_HPP_
8 #define VALUE_NAMES_HPP_
9 #include <string>
10 #include <vector>
11 #include "boost/array.hpp"
12 #include "vdj_pipe/config.hpp"
13 #include "vdj_pipe/object_ids.hpp"
14 
15 namespace vdj_pipe{
16 class Value_map;
17 
20 struct VDJ_PIPE_DECL Value_names {
21  typedef boost::array<std::string,8> single_read_names;
22  static single_read_names const& single();
23 
24  static single_read_names const& forward();
25 
26  static single_read_names const& reverse();
27 
28  static single_read_names const& merged();
29 };
30 
33 class VDJ_PIPE_DECL Value_ids_single {
34  typedef boost::array<Val_id, 7> id_array;
35 
36  Value_ids_single() : is_reverse_(false) {}
37 
38 public:
40  static Value_ids_single create(
41  Value_map& vm,
42  Value_names::single_read_names const& names
43  );
44 
46  static Value_ids_single ensure(
47  Value_map const& vm,
48  Value_names::single_read_names const& names
49  );
50 
52  Value_ids_single(Value_map& vm, Value_names::single_read_names const& names);
53 
54  Val_id description() const {return ida_[0];}
55  Val_id sequence() const {return ida_[1];}
56  Val_id quality() const {return ida_[2];}
57  Val_id trim() const {return ida_[3];}
58  Val_id direction() const {return ida_[4];}
59  Val_id sequence_path() const {return ida_[5];}
60  Val_id quality_path() const {return ida_[6];}
61  bool is_reverse() const {return is_reverse_;}
62 
63 private:
64  id_array ida_;
65  bool is_reverse_;
66 };
67 
70 class VDJ_PIPE_DECL Value_ids_paired {
71  typedef boost::array<Val_id, 12>
72  id_array;
73 
74  enum {
75  descr_fwd = 0,
76  descr_rev = 1,
77  seq_fwd = 2,
78  seq_rev = 3,
79  qual_fwd = 4,
80  qual_rev = 5,
81  trim_fwd = 6,
82  trim_rev = 7,
83  seq_path_fwd = 8,
84  seq_path_rev = 9,
85  qual_path_fwd = 10,
86  qual_path_rev = 11
87  };
88 
89 public:
90  explicit Value_ids_paired(Value_map& vm);
91 
92  Val_id description_fwd() const {return ida_[descr_fwd];}
93  Val_id description_rev() const {return ida_[descr_rev];}
94  Val_id sequence_fwd() const {return ida_[seq_fwd];}
95  Val_id sequence_rev() const {return ida_[seq_rev];}
96  Val_id quality_fwd() const {return ida_[qual_fwd];}
97  Val_id quality_rev() const {return ida_[qual_rev];}
98  Val_id interval_fwd() const {return ida_[trim_fwd];}
99  Val_id interval_rev() const {return ida_[trim_rev];}
100  Val_id sequence_path_fwd() const {return ida_[seq_path_fwd];}
101  Val_id sequence_path_rev() const {return ida_[seq_path_rev];}
102  Val_id quality_path_fwd() const {return ida_[qual_path_fwd];}
103  Val_id quality_path_rev() const {return ida_[qual_path_rev];}
104 
105 private:
106  id_array ida_;
107 };
108 
111 class VDJ_PIPE_DECL Value_ids_emid {
112  typedef boost::array<Val_id, 4> id_array;
113 
114  enum {
115  emid_fwd_ = 0,
116  emid_rev_ = 1,
117  emid_path_fwd_ = 2,
118  emid_path_rev_ = 3
119  };
120 
121 public:
122  explicit Value_ids_emid(Value_map& vm);
123 
124  Val_id emid_fwd() const {return ida_[emid_fwd_];}
125  Val_id emid_rev() const {return ida_[emid_rev_];}
126  Val_id emid_path_fwd() const {return ida_[emid_path_fwd_];}
127  Val_id emid_path_rev() const {return ida_[emid_path_rev_];}
128 
129 private:
130  id_array ida_;
131 };
132 
133 }//namespace vdj_pipe
134 #endif /* VALUE_NAMES_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
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Provides access to standard values for single read pipeline.
Definition: value_names.hpp:33
Store values mapped against name strings and value IDs.
Definition: value_map.hpp:23
Definition: value_names.hpp:20