vdj_pipe
pipeline for processing DNA sequence data
histogram_step.hpp
Go to the documentation of this file.
1 
7 #ifndef HISTOGRAM_STEP_HPP_
8 #define HISTOGRAM_STEP_HPP_
9 #include <string>
10 #include <vector>
11 #include "boost/unordered_map.hpp"
12 #include "vdj_pipe/config.hpp"
14 #include "vdj_pipe/file.hpp"
16 #include "vdj_pipe/value_map.hpp"
18 
19 namespace vdj_pipe{
20 class Value_ids_single;
21 namespace detail{class File_output;}
22 
26  typedef std::vector<value_variant> hvalue_t;
27  typedef boost::unordered_map<hvalue_t, std::size_t> map_t;
28 public:
30  VDJ_PIPE_STATIC_STRING_METHOD(name, "histogram")
31  VDJ_PIPE_STATIC_STRING_METHOD(category, "statistics")
33  "build a histogram of value occurrences")
34  VDJ_PIPE_STATIC_STRING_METHOD(description, "XXX")
35 
37  vma_type const& vm,
38  boost::property_tree::ptree const& pt,
40  );
41 
42  void reset_access(Value_ids_single const& ids) {}
43  void run();
44  void finish();
45 
46 private:
48  std::vector<Val_id> ids_;
50  map_t map_;
51 
52  void write_header(std::ostream& os) const;
53 };
54 
55 }//namespace vdj_pipe
56 #endif /* HISTOGRAM_STEP_HPP_ */
boost::unordered_map< hvalue_t, std::size_t > map_t
Definition: histogram_step.hpp:27
std::vector< Val_id > ids_
Definition: histogram_step.hpp:48
Definition: sanitize_string.cpp:15
Qual_record::quality::value_type value
Definition: find_interval_run.cpp:17
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
Definition: pipe_environment.hpp:26
Value_map vm_
Definition: histogram_step.hpp:47
Definition: step_base.hpp:23
#define VDJ_PIPE_DECL
Definition: config.hpp:23
map_t map_
Definition: histogram_step.hpp:50
Definition: histogram_step.hpp:25
Provides access to standard values for single read pipeline.
Definition: value_names.hpp:33
std::vector< value_variant > hvalue_t
Definition: histogram_step.hpp:26
Value_map vma_type
Definition: histogram_step.hpp:29
#define VDJ_PIPE_STATIC_STRING_METHOD(name, val)
Definition: keyword_struct_macro.hpp:12
File_output f_
Definition: histogram_step.hpp:49
Store values mapped against name strings and value IDs.
Definition: value_map.hpp:23
File target is created if needed at construction time.
Definition: file.hpp:105
bpt::ptree ptree
Definition: processing_step_utils.hpp:19