vdj_pipe
pipeline for processing DNA sequence data
external_mid_base.hpp
Go to the documentation of this file.
1 
7 #ifndef EXTERNAL_MID_BASE_HPP_
8 #define EXTERNAL_MID_BASE_HPP_
9 #include <iosfwd>
10 #include <string>
11 #include "boost/property_tree/ptree_fwd.hpp"
12 #include "boost/shared_ptr.hpp"
14 #include "vdj_pipe/config.hpp"
18 #include "vdj_pipe/object_ids.hpp"
19 
20 namespace vdj_pipe{
21 class Pipe_environment;
22 class Value_map;
23 class Seq_map_short;
24 class Seq_map_full;
25 
26 namespace detail{
27 
30 class VDJ_PIPE_DECL External_mid_base {
32 protected:
33  VDJ_PIPE_KEYWORD_STRUCT(
34  kwds,
35  (fasta_path)
36  (pairs_path)
37  (value_name)
38  (min_score)
39  (max_mismatches) // reject matches with more mismatching nucleotides
40  (require_best)
41  );
42 
43 public:
44  typedef Step_base::Err Err;
45 
46  VDJ_PIPE_STATIC_STRING_METHOD(name, "eMID_map")
47  VDJ_PIPE_STATIC_STRING_METHOD(category, "demultiplexing")
48  VDJ_PIPE_STATIC_STRING_METHOD(
49  comment,
50  "identify which of the given short sequences best matches "
51  "external molecular identifier"
52  )
53  VDJ_PIPE_STATIC_STRING_METHOD(description, "XXX")
54 
56  boost::property_tree::ptree const& pt,
57  Pipe_environment& pe,
58  const Val_id name_val_id,
59  const Val_id score_val_id
60  );
61 
62  void finish() {}
63 
64 private:
65  boost::shared_ptr<Seq_map_short> sms_;
66  boost::shared_ptr<Seq_map_full> smf_;
67  scoring_matrix_t const* scoring_matrix_;
68  int min_score_;
69  bool require_best_;
70  Val_id name_val_id_;
71  Val_id score_val_id_;
72 
73 protected:
74  std::size_t mid_size() const;
75 
79  void find_mid(
80  const boost::string_ref seq,
81  Value_map& vm
82  );
83 };
84 
85 }//namespace detail
86 }//namespace vdj_pipe
87 #endif /* EXTERNAL_MID_BASE_HPP_ */
Definition: best_match_pair.hpp:16
Definition: find_shared.hpp:22
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Definition: pipe_environment.hpp:26
Definition: step_base.hpp:28
Definition: external_mid_base.hpp:30
Store values mapped against name strings and value IDs.
Definition: value_map.hpp:23