vdj_pipe
pipeline for processing DNA sequence data
composition_stats_step.hpp
Go to the documentation of this file.
1 
7 #ifndef COMPOSITION_STATS_STEP_HPP_
8 #define COMPOSITION_STATS_STEP_HPP_
9 #include <iosfwd>
10 #include <string>
11 #include <vector>
12 #include "boost/array.hpp"
13 #include "boost/property_tree/ptree_fwd.hpp"
14 #include "vdj_pipe/config.hpp"
18 
19 namespace vdj_pipe{
20 
23 class VDJ_PIPE_DECL Composition_stats : public detail::Step_base_single {
24  typedef boost::array<unsigned, 5> letter_counts;
25  typedef std::vector<letter_counts> counts_vector;
26 
27 public:
28  VDJ_PIPE_STATIC_STRING_METHOD(name, "composition_stats")
29  VDJ_PIPE_STATIC_STRING_METHOD(category, "statistics")
30  VDJ_PIPE_STATIC_STRING_METHOD(
31  comment,
32  "calculate composition statistics of sequencing reads"
33  )
34  VDJ_PIPE_STATIC_STRING_METHOD(
35  description,
36  "based on trimmed reads"
37  )
38 
40  Vm_access_single const& vma,
41  boost::property_tree::ptree const& pt,
43  );
44 
45  void run();
46  void finish();
47 
48 private:
49  counts_vector cv_;
50  Histogram_1d gch_;
51  std::string comp_;
52  std::string gc_hist_;
53 
54  void write_composition() const;
55  void write_gc_hist() const;
56 };
57 
58 }//namespace vdj_pipe
59 #endif /* COMPOSITION_STATS_STEP_HPP_ */
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
Definition: composition_stats_step.hpp:23