File: 3.0.3_io-record.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 (20 lines) | stat: -rw-r--r-- 664 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//![main]
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/io/sequence_file/input.hpp>

int main()
{
    seqan3::sequence_file_input fin{"my.fastq"};

    for (auto && record : fin)
    {
        seqan3::debug_stream << "id: " << record.id() << '\n';
        seqan3::debug_stream << "sequence: " << record.sequence() << '\n';
        seqan3::debug_stream << "base_qualities: " << record.base_qualities() << '\n';
    }
}
//![main]

#include <seqan3/test/snippet/create_temporary_snippet_file.hpp>
// std::filesystem::current_path() / "my.fastq" will be deleted after the execution
seqan3::test::create_temporary_snippet_file input_fastq{"my.fastq", "\n"};