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 
32 protected:
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:
45 
46  VDJ_PIPE_STATIC_STRING_METHOD(name, "eMID_map")
47  VDJ_PIPE_STATIC_STRING_METHOD(category, "demultiplexing")
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_;
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: sanitize_string.cpp:15
Definition: best_match_pair.hpp:16
int min_score_
Definition: external_mid_base.hpp:68
Definition: find_shared.hpp:22
VDJ_PIPE_KEYWORD_STRUCT(Character_filter::kwds,(chars))
Val_id score_val_id_
Definition: external_mid_base.hpp:71
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
scoring_matrix_t const * scoring_matrix_
Definition: external_mid_base.hpp:67
Definition: pipe_environment.hpp:26
#define VDJ_PIPE_DECL
Definition: config.hpp:23
Best_match_pair< Mid_id, int > match_type
Definition: external_mid_base.hpp:31
Definition: step_base.hpp:28
Step_base::Err Err
Definition: external_mid_base.hpp:44
boost::shared_ptr< Seq_map_full > smf_
Definition: external_mid_base.hpp:66
Definition: external_mid_base.hpp:30
boost::shared_ptr< Seq_map_short > sms_
Definition: external_mid_base.hpp:65
bool require_best_
Definition: external_mid_base.hpp:69
#define VDJ_PIPE_STATIC_STRING_METHOD(name, val)
Definition: keyword_struct_macro.hpp:12
Val_id name_val_id_
Definition: external_mid_base.hpp:70
Store values mapped against name strings and value IDs.
Definition: value_map.hpp:23
bpt::ptree ptree
Definition: processing_step_utils.hpp:19