SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
phred68solexa.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
13
14namespace seqan3
15{
16
36class phred68solexa : public phred_base<phred68solexa, 68>
37{
38private:
41
43 friend base_t;
46 friend base_t::base_t;
48
49public:
53 constexpr phred68solexa() noexcept = default;
54 constexpr phred68solexa(phred68solexa const &) noexcept = default;
55 constexpr phred68solexa(phred68solexa &&) noexcept = default;
56 constexpr phred68solexa & operator=(phred68solexa const &) noexcept = default;
57 constexpr phred68solexa & operator=(phred68solexa &&) noexcept = default;
58 ~phred68solexa() noexcept = default;
59
60 // Inherit converting constructor
61 using base_t::base_t;
63
71 static constexpr phred_type offset_phred{-5};
72
77 static constexpr char_type offset_char{';'};
79};
80
81inline namespace literals
82{
83
97constexpr phred68solexa operator""_phred68solexa(char const c) noexcept
98{
99 return phred68solexa{}.assign_char(c);
100}
101
113SEQAN3_WORKAROUND_LITERAL std::vector<phred68solexa> operator""_phred68solexa(char const * s, std::size_t n)
114{
116 r.resize(n);
117
118 for (size_t i = 0; i < n; ++i)
119 r[i].assign_char(s[i]);
120
121 return r;
122}
124
125} // namespace literals
126
127} // namespace seqan3
constexpr derived_type & assign_char(char_type const chr) noexcept
Assign from a character, implicitly converts invalid characters.
Definition alphabet_base.hpp:160
Quality type for Solexa and deprecated Illumina formats.
Definition phred68solexa.hpp:37
static constexpr phred_type offset_phred
The projection offset between Phred and rank score representation.
Definition phred68solexa.hpp:71
static constexpr char_type offset_char
The projection offset between char and rank score representation.
Definition phred68solexa.hpp:77
constexpr phred68solexa() noexcept=default
Defaulted.
A CRTP-base that refines seqan3::alphabet_base and is used by the quality alphabets.
Definition phred_base.hpp:30
int8_t phred_type
The integer representation of the quality score.
Definition phred_base.hpp:39
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Provides seqan3::phred42 quality scores.
#define SEQAN3_WORKAROUND_LITERAL
Our char literals returning std::vector should be constexpr if constexpr std::vector is supported.
Definition platform.hpp:269
T resize(T... args)
Hide me