Aminoacid¶
Contains seqan3::aa27, container aliases and string literals.
- Author
- Sara Hetzel <sara.hetzel AT fu-berlin.de>
-
namespace
seqan3¶ The main SeqAn3 namespace.
Helpers for seqan3::semi_alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.
Helpers for seqan3::alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.
Helpers for seqan3::nucleotide_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.
Alphabet aliases
Other names (typedefs) for seqan3::nucl16
Range concepts
Adapted from the Ranges TS.
Container concepts
Container concepts as defined by the standard library (or very close).
Container-of-container concepts
Shortcuts for multi-dimensional container concepts.
-
struct
aa27¶ - #include <alphabet/aminoacid/aa27.hpp>
The twenty-seven letter amino acid alphabet.
The alphabet consists of letters A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, *
The alphabet may be brace initialized from the static letter members (see above). Note that you cannot assign regular characters, but additional functions for this are available.
aa27 my_letter{aa27::A}; // doesn't work: // aa27 my_letter{'A'}; my_letter.assign_char('C'); // <- this does! my_letter.assign_char('?'); // converted to X internally if (my_letter.to_char() == 'X') std::cout << "yeah\n"; // "yeah";Inherits from seqan3::alphabet_concept
Letter values
Static member “letters” that can be assigned to the alphabet or used in aggregate initialization.
Similar to an Enum interface . Don’t worry about the .
Read functions
Write functions
Comparison operators
Requirements for seqan3::semi_alphabet_concept
You can expect these functions on all types that implement seqan3::semi_alphabet_concept.
Requirements for seqan3::alphabet_concept
You can expect these functions on all types that implement seqan3::alphabet_concept.
Public Types
Public Static Attributes
Private Types
-
enum
internal_type¶ The internal type is a strictly typed enum.
This is done to prevent aggregate initialization from numbers and/or chars. It is has the drawback that it also introduces a scope which in turn makes the static “letter values ” members necessary.
Values:
-
A¶
-
B¶
-
C¶
-
D¶
-
E¶
-
F¶
-
G¶
-
H¶
-
I¶
-
J¶
-
K¶
-
L¶
-
M¶
-
N¶
-
O¶
-
P¶
-
Q¶
-
R¶
-
S¶
-
T¶
-
U¶
-
V¶
-
W¶
-
X¶
-
Y¶
-
Z¶
-
TERMINATOR¶
-
UNKNOWN= X¶
-
Private Members
-
internal_type
_value¶ The data member.
Private Static Attributes
-
constexpr char_type
value_to_char[value_size] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '*' }¶ Value to char conversion table.
-
constexpr std::array<internal_type, 256>
char_to_value¶ Char to value conversion table.
Related
-
using
aa27_vector= std::vector<aa27>¶ Alias for an std::vector of seqan3::aa27.
-
using
aa27_string= std::basic_string<aa27, std::char_traits<aa27>>¶ Alias for an std::basic_string of seqan3::aa27.
- Attention
- Note that we recommend using seqan3::aa27_vector instead of aa27_string in almost all situations. While the C++ style operations on the string are well supported, you should not access the internal c-string and should not use C-Style operations on it, e.g. the
char_traits::strlenfunction will not return the correct length of the string (while the.size()returns the correct value).
-
aa27_vector
operator""_aa27(const char *s, std::size_t n)¶ aa27 literal
You can use this string literal to easily assign to aa27_vector:
- Return
- seqan3::aa27_vector
// these don't work: // aa27_vector foo{"ABFUYR"}; // aa27_vector bar = "ABFUYR"; // but these do: using namespace seqan3::literal; aa27_vector foo{"ABFUYR"_aa27}; aa27_vector bar = "ABFUYR"_aa27; auto bax = "ABFUYR"_aa27;
- Attention
- All seqan3 literals are in the namespace seqan3::literal!
-
aa27_string
operator""_aa27s(const char *s, std::size_t n)¶ aa27 string literal
You can use this string literal to easily assign to aa27_vector:
- Return
- seqan3::aa27_string
// these don't work: // aa27_string foo{"ABFUYR"}; // aa27_string bar = "ABFUYR"; // but these do: using namespace seqan3::literal; aa27_string foo{"ABFUYR"_aa27s}; aa27_string bar = "ABFUYR"_aa27s; auto bax = "ABFUYR"_aa27s;
Please note the limitations of seqan3::aa27_string and consider using the operator”“_aa27 instead.
- Attention
- All seqan3 literals are in the namespace seqan3::literal!
-
enum
-
namespace
literal¶ The SeqAn3 namespace for literals.
SeqAn implements “user defined” literals in multiple places, e.g.
auto foo = "ACGTG"_dna4. These make working with small examples and tests a lot easier, but the risk of having a name collision with another library is higher so follow the example of the standard library and define all our literals in the namespaceseqan3::literal.- Attention
- This means you cannot use them, unless you explicitly add
using namespace seqan3::literal;(in addition tousing namespace seqan3;).
-
struct