vdj_pipe
pipeline for processing DNA sequence data
common_subsequence.hpp
Go to the documentation of this file.
1 
7 #ifndef COMMON_SUBSEQUENCE_HPP_
8 #define COMMON_SUBSEQUENCE_HPP_
9 //#include "boost/container/flat_set.hpp"
10 #include "boost/assert.hpp"
13 
14 namespace vdj_pipe{ namespace gdst{
15 
18 struct Common_subseq {
19  explicit Common_subseq(const unsigned start = 0, const unsigned len = 0)
20  : start_(start), len_(len)
21  {}
22 
23  unsigned start_;
24  unsigned len_;
25 
26 // boost::container::flat_set<super_seq> seq_;
28 };
29 
38 inline bool mismatching_end(
39  const unsigned start1,
40  const unsigned len1,
41  const unsigned start2,
42  const unsigned len2,
43  const unsigned match_len
44 ) {
45  BOOST_ASSERT(start1 + match_len <= len1);
46  BOOST_ASSERT(start2 + match_len <= len2);
47  return
48  (start1 && start2) ||
49  ( start1 + match_len != len1 && start2 + match_len != len2 )
50  ;
51 }
52 
53 }//namespace gdst
54 }//namespace vdj_pipe
55 #endif /* COMMON_SUBSEQUENCE_HPP_ */
unsigned start_
match starting position in pattern
Definition: common_subsequence.hpp:23
unsigned len_
match length
Definition: common_subsequence.hpp:24
Common subsequence.
Definition: common_subsequence.hpp:18
Collection of unique objects stored in an ordered vector.
Definition: vector_set.hpp:18
detail::Vector_set< super_seq > seq_
Definition: common_subsequence.hpp:27
Common_subseq(const unsigned start=0, const unsigned len=0)
Definition: common_subsequence.hpp:19
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
bool mismatching_end(const unsigned start1, const unsigned len1, const unsigned start2, const unsigned len2, const unsigned match_len)
Definition: common_subsequence.hpp:38