7 #ifndef APPLY_TO_ADAPTOR_HPP_ 8 #define APPLY_TO_ADAPTOR_HPP_ 10 #include "boost/foreach.hpp" 11 #include "boost/property_tree/ptree_fwd.hpp" 12 #include "boost/variant/static_visitor.hpp" 23 class Pipe_environment;
31 VDJ_PIPE_STATIC_STRING_METHOD(name,
"apply")
32 VDJ_PIPE_STATIC_STRING_METHOD(category,
"paired read")
33 VDJ_PIPE_STATIC_STRING_METHOD(
35 "apply specified step to either forward, reverse, or merged sequences" 37 VDJ_PIPE_STATIC_STRING_METHOD(description,
"XXX")
39 Apply_one(step_variant_single
const& step) : step_(step) {}
40 void run() {boost::apply_visitor(
Run_visitor(), step_);}
43 void summary(std::ostream& os)
const {
45 boost::apply_visitor(sv2, step_);
49 step_variant_single step_;
56 typedef std::vector<Value_ids_single> vid_vector;
58 class Visitor :
public boost::static_visitor<> {
60 Visitor(vid_vector
const& idv) : idv_(idv) {}
62 template<
typename Step>
void operator()(Step& step)
const {
64 step.reset_access(vis);
75 VDJ_PIPE_STATIC_STRING_METHOD(name,
"apply")
76 VDJ_PIPE_STATIC_STRING_METHOD(category,
"paired read")
77 VDJ_PIPE_STATIC_STRING_METHOD(
79 "apply specified step to either forward, reverse, or merged sequences" 81 VDJ_PIPE_STATIC_STRING_METHOD(description,
"XXX")
85 Apply_many(vid_vector
const& idv, step_variant_single
const& step)
86 : av_(idv), step_(step) {}
88 void run() {boost::apply_visitor(
Run_visitor(), step_);}
91 void summary(std::ostream& os)
const {
93 apply_visitor(sv2, step_);
98 step_variant_single step_;
108 VDJ_PIPE_STATIC_STRING_METHOD(name,
"apply")
109 VDJ_PIPE_STATIC_STRING_METHOD(category,
"paired read")
110 VDJ_PIPE_STATIC_STRING_METHOD(
112 "apply specified step to forward, reverse, or merged sequences" 115 typedef boost::variant<Apply_one, Apply_many> result_type;
118 static result_type make(
120 boost::property_tree::ptree
const& pt,
127 std::string
const& type
Apply enclosed processing step once to a sequence read of specified kind: forward, reverse, or merged.
Definition: apply_to_adaptor.hpp:28
Access to value map for paired read pipeline and processing steps.
Definition: value_map_access_paired.hpp:16
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Definition: visitor.hpp:71
Definition: pipe_environment.hpp:26
Definition: visitor.hpp:18
Provides access to standard values for single read pipeline.
Definition: value_names.hpp:33
Definition: exception.hpp:23
Definition: apply_to_adaptor.hpp:107
Apply enclosed processing step multiple times to sequence reads of specified kind: forward...
Definition: apply_to_adaptor.hpp:55
Definition: step_maker.hpp:40
Definition: apply_to_adaptor.hpp:105
Definition: visitor.hpp:35