File: structured_aa.cpp

package info (click to toggle)
seqan3 3.2.0%2Bds-6%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 19,776 kB
  • sloc: cpp: 159,121; makefile: 1,290; sh: 414; ansic: 321; xml: 229; javascript: 98; perl: 29; python: 27; php: 25
file content (24 lines) | stat: -rw-r--r-- 912 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <seqan3/alphabet/aminoacid/aa27.hpp>
#include <seqan3/alphabet/structure/dssp9.hpp>
#include <seqan3/alphabet/structure/structured_aa.hpp>
#include <seqan3/core/debug_stream.hpp>

int main()
{
    using namespace seqan3::literals;
    using seqan3::get;

    seqan3::structured_aa<seqan3::aa27, seqan3::dssp9> letter{'W'_aa27, 'B'_dssp9};

    seqan3::debug_stream << seqan3::to_rank(letter) << ' '           // 199
                         << seqan3::to_rank(get<0>(letter)) << ' '   // 22
                         << seqan3::to_rank(get<1>(letter)) << '\n'; // 1

    seqan3::debug_stream << seqan3::to_char(letter) << ' '           // W
                         << seqan3::to_char(get<0>(letter)) << ' '   // W
                         << seqan3::to_char(get<1>(letter)) << '\n'; // B

    // Modify:
    get<0>(letter) = 'V'_aa27;
    seqan3::debug_stream << seqan3::to_char(letter) << '\n'; // V
}