vdj_pipe
pipeline for processing DNA sequence data
quality_stats_step.hpp
Go to the documentation of this file.
1 
7 #ifndef QUALITY_STATS_STEP_HPP_
8 #define QUALITY_STATS_STEP_HPP_
9 #include <iosfwd>
10 #include <string>
11 #if defined(NDEBUG)
12 //fix boost::multi_array warnings
13 //boost/multi_array/base.hpp:503:13: warning: unused variable 'bound_adjustment'
14 #define BOOST_DISABLE_ASSERTS
15 #endif
16 #include "boost/array.hpp"
17 #include "boost/multi_array.hpp"
18 #include "boost/property_tree/ptree_fwd.hpp"
19 #include "vdj_pipe/config.hpp"
21 #include "vdj_pipe/file.hpp"
24 
25 namespace vdj_pipe{
26 
29 class VDJ_PIPE_DECL Qual_stats : public detail::Step_base_single {
31 
32  typedef boost::array<double,5> fractions;
33  static fractions const& fracts() {
34  static const fractions f = {{0.1, 0.25, 0.5, 0.75, 0.9}};
35  return f;
36  }
37 
38 public:
39  VDJ_PIPE_STATIC_STRING_METHOD(name, "quality_stats")
40  VDJ_PIPE_STATIC_STRING_METHOD(category, "statistics")
41  VDJ_PIPE_STATIC_STRING_METHOD(
42  comment,
43  "calculate quality statistics of sequencing reads"
44  )
45 
46  VDJ_PIPE_STATIC_STRING_METHOD(
47  description,
48  "based on trimmed reads"
49  )
50 
51  Qual_stats(
52  Vm_access_single const& vma,
53  boost::property_tree::ptree const& pt,
55  );
56 
57  void run();
58  void finish();
59 
60 private:
61  heat_map hm_;
62  Histogram_1d mqh_;
63  Histogram_1d lh_;
64  std::string out_hm_;
65  std::string out_qs_;
66  std::string out_mqh_;
67  std::string out_len_hist_;
68 
69  void write_heat_map() const;
70  void write_qstats() const;
71  void write_meanq_hist() const;
72  void write_len_hist() const;
73 };
74 
75 }//namespace vdj_pipe
76 #endif /* QUALITY_STATS_STEP_HPP_ */
Definition: quality_stats_step.hpp:29
Definition: value_map_access_single.hpp:16
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Definition: pipe_environment.hpp:26
Definition: step_base_single.hpp:16
simple unsigned integer-based histogram
Definition: histogram_1d.hpp:17