42 #include <range/v3/view/take_while.hpp> 64 template <
typename irng_t>
65 auto operator()(irng_t && irange,
71 return ranges::view::take_while(std::forward<irng_t>(irange), [threshold] (
auto && value)
73 return to_phred(std::forward<decltype(value)>(value)) >= threshold;
82 template <
typename irng_t>
83 auto operator()(irng_t && irange,
84 std::decay_t<
value_type_t<std::decay_t<irng_t>>>
const threshold)
const 89 return (*
this)(std::forward<irng_t>(irange),
to_phred(threshold));
108 template <
typename threshold_t>
112 threshold_t
const threshold;
114 trim_fn
const & parent;
117 template <
typename irng_t>
118 auto operator()(irng_t && irange)
const 120 return parent(std::forward<irng_t>(irange), threshold);
132 template <
typename threshold_t>
133 delegate<threshold_t> operator()(threshold_t
const threshold)
const 135 requires std::is_integral_v<std::decay_t<threshold_t>> || quality_concept<std::decay_t<threshold_t>>
138 return delegate<threshold_t>{threshold, *
this};
149 template <
typename irng_t,
150 typename threshold_t>
153 (std::is_same_v<std::decay_t<threshold_t>,
154 std::decay_t<value_type_t<std::decay_t<irng_t>>>> ||
155 std::is_convertible_v<std::decay_t<threshold_t>,
156 underlying_phred_t<std::decay_t<value_type_t<std::decay_t<irng_t>>>>>)
158 friend auto operator|(irng_t && irange,
159 seqan3::detail::trim_fn::delegate<threshold_t>
const & bound_view)
161 return bound_view(std::forward<irng_t>(irange));
219 inline constexpr
auto trim =
deep{seqan3::detail::trim_fn{}};
Contains quality alphabet compositions.
constexpr underlying_phred_t< alphabet_type > to_phred(alphabet_type const &chr)
The public getter function for the phred representation of a score.
Definition: concept.hpp:127
typename underlying_phred< alphabet_type >::type underlying_phred_t
The internal phred type.
Definition: concept.hpp:88
Provides seqan3::view::deep.
Adaptations of concepts from the Ranges TS.
The SeqAn3 namespace for views.
constexpr auto trim
A view that does quality-threshold trimming on a range of seqan3::quality_concept.
Definition: trim.hpp:219
Definition: aligned_sequence_concept.hpp:288
A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view...
Definition: deep.hpp:129