1 #ifndef theplu_yat_omic_algorithm
2 #define theplu_yat_omic_algorithm
27 #ifdef YAT_HAVE_LIBBAM
28 #include "BamPairIterator.h"
30 #include "DnaComplementer.h"
32 #include <boost/iterator/iterator_concepts.hpp>
33 #include <boost/iterator/iterator_traits.hpp>
34 #include <boost/iterator/reverse_iterator.hpp>
35 #include <boost/concept_check.hpp>
64 #ifdef YAT_HAVE_LIBBAM
65 template<
class Iterator,
class Visitor>
66 void bam_pair_analyse(Iterator first, Iterator last, Visitor& visitor);
84 template<
typename InputIterator,
typename OutputIterator>
104 template<
typename B
idirectionalIterator>
106 BidirectionalIterator end);
134 template<
typename B
idirectionalIterator,
typename OutputIterator>
136 BidirectionalIterator end,
142 #ifdef YAT_HAVE_LIBBAM
143 template<
class Iterator,
class Visitor>
144 void bam_pair_analyse(Iterator first, Iterator last, Visitor& visitor)
146 BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<Iterator>));
147 BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIterator<Iterator>));
148 BamPairIterator<Iterator> iter(first, last);
149 BamPairIterator<Iterator> end(last, last);
150 for (; iter!=end; ++iter)
151 visitor((*iter).first(), (*iter).second());
156 template<
typename InputIterator,
typename OutputIterator>
160 BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<InputIterator>));
161 BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIterator<InputIterator>));
163 typedef typename boost::iterator_value<InputIterator>::type value_type;
164 BOOST_CONCEPT_ASSERT((boost::Convertible<value_type, char>));
166 using namespace boost_concepts;
167 BOOST_CONCEPT_ASSERT((WritableIterator<OutputIterator, char>));
168 BOOST_CONCEPT_ASSERT((IncrementableIterator<OutputIterator>));
173 template<
typename B
idirectionalIterator>
175 BidirectionalIterator end)
177 BOOST_CONCEPT_ASSERT((
178 boost::Mutable_BidirectionalIterator<BidirectionalIterator>
181 std::reverse(begin, end);
185 template<
typename B
idirectionalIterator,
typename OutputIterator>
187 BidirectionalIterator end,
190 BOOST_CONCEPT_ASSERT((boost_concepts::BidirectionalTraversal<BidirectionalIterator>));
193 boost::make_reverse_iterator(begin), out);
void dna_complement(InputIterator begin, InputIterator end, OutputIterator out)
Definition: algorithm.h:157
Functor that calculates genomic complement.
Definition: DnaComplementer.h:30
void dna_reverse_complement(BidirectionalIterator begin, BidirectionalIterator end)
Definition: algorithm.h:174
void dna_reverse_complement_copy(BidirectionalIterator begin, BidirectionalIterator end, OutputIterator out)
Definition: algorithm.h:186