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 ) {
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 ) {
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) {
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) {
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
bool is_ambiguous(const char c)
Definition: nucleotide_index.hpp:106
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
unsigned char value_type
Definition: sequence_record.hpp:37
std::string sequence
Definition: sequence_record.hpp:29
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