7 #ifndef FIND_INTERVAL_HPP_ 8 #define FIND_INTERVAL_HPP_ 22 const std::size_t min_q,
25 std::pair<std::size_t,std::size_t> p(0,0);
26 if( q.size() < win )
return p;
28 for( std::size_t i = 0; i != win; ++i ) cqs += q[i];
30 std::size_t lo = 0, up = win;
31 bool expanding = cqs >= min_q;
32 for( ; up != q.size(); ++up ) {
37 if( p.second < up - lo ) {
50 if( expanding && p.second < up - lo ) {
63 const Qual_record::quality::value_type min_q
65 std::pair<std::size_t,std::size_t> p(0,0);
66 std::size_t lo = 0, up = 0;
67 bool expanding =
false;
68 for( ; up != q.size(); ++up) {
71 if( p.second < up - lo ) {
84 if( expanding && p.second < up - lo ) {
96 Seq_record::sequence
const& seq,
99 std::pair<std::size_t,std::size_t> p(0,0);
100 std::size_t lo = 0, up = 0;
103 std::deque<std::size_t> amb_pos;
104 for( ; up != seq.size(); ++up) {
105 if( is_ambiguous(seq[up]) ) {
106 if( amb_pos.size() == max ) {
107 if( p.second < up - lo ) {
111 lo = amb_pos.front() + 1;
114 amb_pos.push_back(up);
118 for( ; up != seq.size(); ++up) {
119 if( is_ambiguous(seq[up]) ) {
120 if( p.second < up - lo ) {
129 if( p.second < up - lo ) {
Definition: sequence_record.hpp:35
std::pair< std::size_t, std::size_t > longest_average_interval(Qual_record::quality const &q, const std::size_t min_q, const std::size_t win)
Definition: find_interval.hpp:20
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
std::pair< std::size_t, std::size_t > longest_min_interval(Qual_record::quality const &q, const Qual_record::quality::value_type min_q)
Definition: find_interval.hpp:61
std::pair< std::size_t, std::size_t > longest_unambiguous_interval(Seq_record::sequence const &seq, const std::size_t max)
Definition: find_interval.hpp:95