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 
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,
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_ */
std::size_t size() const
Definition: input_manager.hpp:50
bool has_quality() const
Definition: input_manager.hpp:63
bool has_qual_
Definition: input_manager.hpp:70
bool is_paired_
Definition: input_manager.hpp:68
std::vector< Seq_file_entry > in_v_t
Definition: input_manager.hpp:25
bool empty() const
Definition: input_manager.hpp:51
std::string path(std::string const &fn) const
Definition: input_manager.hpp:54
Definition: input_manager.hpp:29
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
bool is_paired() const
Definition: input_manager.hpp:57
const_iterator end() const
Definition: input_manager.hpp:53
#define VDJ_PIPE_DECL
Definition: config.hpp:23
Input_manager(std::string const &base, const bool is_paired=false, const bool has_emid=false, const bool has_qual=true)
Definition: input_manager.hpp:38
const_iterator begin() const
Definition: input_manager.hpp:52
Definition: input_manager.hpp:22
bool has_emid() const
Definition: input_manager.hpp:60
in_v_t iv_
Definition: input_manager.hpp:67
Definition: exception.hpp:23
std::string root_
Definition: input_manager.hpp:66
in_v_t::const_iterator iterator
Definition: input_manager.hpp:27
bool has_emid_
Definition: input_manager.hpp:69
Store values mapped against name strings and value IDs.
Definition: value_map.hpp:23
bpt::ptree ptree
Definition: processing_step_utils.hpp:19
in_v_t::const_iterator const_iterator
Definition: input_manager.hpp:28