The GenBank format. More...
#include <seqan3/io/sequence_file/format_genbank.hpp>
Public Member Functions | |
Constructors, destructor and assignment | |
format_genbank () noexcept=default | |
Defaulted. | |
format_genbank (format_genbank const &) noexcept=default | |
Defaulted. | |
format_genbank & | operator= (format_genbank const &) noexcept=default |
Defaulted. | |
format_genbank (format_genbank &&) noexcept=default | |
Defaulted. | |
format_genbank & | operator= (format_genbank &&) noexcept=default |
Defaulted. | |
~format_genbank () noexcept=default | |
Defaulted. | |
Static Public Attributes | |
static std::vector< std::string > | file_extensions |
The valid file extensions for this format; note that you can modify this value. More... | |
Protected Member Functions | |
template<typename stream_type , typename seq_legal_alph_type , bool seq_qual_combined, typename seq_type , typename id_type , typename qual_type > | |
void | read_sequence_record (stream_type &stream, sequence_file_input_options< seq_legal_alph_type, seq_qual_combined > const &options, seq_type &sequence, id_type &id, qual_type &qualities) |
Read from the specified stream and back-insert into the given field buffers. More... | |
template<typename stream_type , typename seq_type , typename id_type , typename qual_type > | |
void | write_sequence_record (stream_type &stream, sequence_file_output_options const &options, seq_type &&sequence, id_type &&id, qual_type &&qualities) |
Write the given fields to the specified stream. More... | |
Additional Inherited Members | |
![]() | |
void | read_sequence_record (stream_type &stream, seqan3::sequence_file_input_options const &options, seq_type &sequence, id_type &id, qual_type &qualities) |
Read from the specified stream and back-insert into the given field buffers. More... | |
static inline std::vector< std::string > | file_extensions |
The format type is required to provide a vector of all supported file extensions. | |
![]() | |
static inline std::vector< std::string > | file_extensions |
The format type is required to provide a vector of all supported file extensions. | |
The GenBank format.
genbank is the format used in the GenBank sequence database. See this example record at NCBI for more details about the format.
The genbank format provides the fields seqan3::field::seq and seqan3::field::id. Both fields are required when writing.
There is no truncate_ids option while reading because the GenBank format has no (FASTA-like) idbuffer. Instead, there is the option "complete_header" to indicate whether the whole header is to be read (embl_genbank_complete_header=true) or only the "LOCUS" information should be stored.
Qualities passed to the write function are ignored.
|
no-apiinlineprotected |
Read from the specified stream and back-insert into the given field buffers.
stream_type | Input stream, must satisfy seqan3::input_stream_over with char . |
seq_type | Type of the seqan3::field::seq input; must satisfy std::ranges::output_range over a seqan3::alphabet. |
id_type | Type of the seqan3::field::id input; must satisfy std::ranges::output_range over a seqan3::alphabet. |
qual_type | Type of the seqan3::field::qual input; must satisfy std::ranges::output_range over a seqan3::writable_quality_alphabet. |
[in,out] | stream | The input stream to read from. |
[in] | options | File specific options passed to the format. |
[out] | sequence | The buffer for seqan3::field::seq input, i.e. the "sequence". |
[out] | id | The buffer for seqan3::field::id input, e.g. the header line in FastA. |
[out] | qualities | The buffer for seqan3::field::qual input. |
|
no-apiinlineprotected |
Write the given fields to the specified stream.
stream_type | Output stream, must satisfy seqan3::output_stream_over with char . |
seq_type | Type of the seqan3::field::seq output; must satisfy std::ranges::output_range over a seqan3::alphabet. |
id_type | Type of the seqan3::field::id output; must satisfy std::ranges::output_range over a seqan3::alphabet. |
qual_type | Type of the seqan3::field::qual output; must satisfy std::ranges::output_range over a seqan3::quality_alphabet. |
[in,out] | stream | The output stream to write into. |
[in] | options | File specific options passed to the format. |
[in] | sequence | The data for seqan3::field::seq, i.e. the "sequence". |
[in] | id | The data for seqan3::field::id, e.g. the header line in FastA. |
[in] | qualities | The data for seqan3::field::qual. |
Implements sequence_file_output_format.
|
no-apiinlinestatic |
The valid file extensions for this format; note that you can modify this value.