vdj_pipe
pipeline for processing DNA sequence data
input_manager.hpp
Go to the documentation of this file.
1 
7 #ifndef INPUT_MANAGER_HPP_
8 #define INPUT_MANAGER_HPP_
9 #include <string>
10 #include <vector>
11 #include "boost/filesystem/path.hpp"
12 #include "vdj_pipe/config.hpp"
13 #include "vdj_pipe/exception.hpp"
16 
17 namespace vdj_pipe{
18 class Value_map;
19 
22 class VDJ_PIPE_DECL Input_manager {
23  static std::string check_dir(std::string const& dir);
24 
25  typedef std::vector<Seq_file_entry> in_v_t;
26 public:
27  typedef in_v_t::const_iterator iterator;
28  typedef in_v_t::const_iterator const_iterator;
29  struct Err : public base_exception {};
30  static std::string path(std::string const& root, std::string const& fn);
31 
33  std::string const& base,
34  boost::property_tree::ptree const& pt,
35  Value_map& vm
36  );
37 
39  std::string const& base,
40  const bool is_paired = false,
41  const bool has_emid = false,
42  const bool has_qual = true
43  )
44  : root_(base),
45  is_paired_(is_paired),
46  has_emid_(has_emid),
47  has_qual_(has_qual)
48  {}
49 
50  std::size_t size() const {return iv_.size();}
51  bool empty() const {return iv_.empty();}
52  const_iterator begin() const {return iv_.begin();}
53  const_iterator end() const {return iv_.end();}
54  std::string path(std::string const& fn) const {return path(root_, fn);}
55 
57  bool is_paired() const {return is_paired_;}
58 
60  bool has_emid() const {return has_emid_;}
61 
63  bool has_quality() const {return has_qual_;}
64 
65 private:
66  std::string root_;
67  in_v_t iv_;
68  bool is_paired_;
69  bool has_emid_;
70  bool has_qual_;
71 
72 };
73 
74 }//namespace vdj_pipe
75 #endif /* INPUT_MANAGER_HPP_ */
bool has_quality() const
Definition: input_manager.hpp:63
Definition: input_manager.hpp:29
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
bool is_paired() const
Definition: input_manager.hpp:57
Definition: input_manager.hpp:22
bool has_emid() const
Definition: input_manager.hpp:60
Definition: exception.hpp:23
Store values mapped against name strings and value IDs.
Definition: value_map.hpp:23