SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
seqan3::format_embl Struct Reference

The EMBL format (tag). More...

#include <seqan3/io/sequence_file/format_embl.hpp>

+ Inheritance diagram for seqan3::format_embl:

Static Public Attributes

static std::vector< std::stringfile_extensions
 The valid file extensions for this format; note that you can modify this value. More...
 

Related Functions

(Note that these are not member functions.)

Requirements for seqan3::SequenceFileInputFormat

You can expect these members on all types that implement seqan3::SequenceFileInputFormat.

void read (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...
 
Requirements for seqan3::SequenceFileOutputFormat

You can expect these members on all types that implement seqan3::SequenceFileOutputFormat.

void write (stream_type &stream, seqan3::sequence_file_output_options const &options, seq_type &&sequence, id_type &&id, qual_type &&qualities)
 Write the given fields to the specified stream. More...
 

Detailed Description

The EMBL format (tag).

Introduction

embl is the format used in ENA sequence records. See the (ftp://ftp.ebi.ac.uk/pub/databases/embl/doc/usrman.txt) for a an in-depth description of the format.

Fields

The embl format provides the fields seqan3::field::SEQ and seqan3::field::ID. Both fields are required when writing.

Implementation notes

When reading the ID-line, the ID is read until the stream encounters a ';'. Unless, the option truncate_ids is set to true, then the id is read until it either sees a blank, ';' or a new line. When the option "embl_genbank_complete_header" is set to true (Default: false) the whole header is read into the id.

When writing the ID-line, the sequence length is appended.

All other identifiers apart from 'ID' and 'SQ' are currently ignored.

Passed qualities to either the read or write function are ignored.

Friends And Related Function Documentation

◆ read()

void read ( stream_type &  stream,
seqan3::sequence_file_input_options const &  options,
seq_type &  sequence,
id_type &  id,
qual_type &  qualities 
)
related

Read from the specified stream and back-insert into the given field buffers.

Template Parameters
stream_typeInput stream, must satisfy seqan3::IStream with char.
seq_typeType of the seqan3::field::SEQ input; must satisfy std::ranges::OutputRange over a seqan3::Alphabet.
id_typeType of the seqan3::field::ID input; must satisfy std::ranges::OutputRange over a seqan3::Alphabet.
qual_typeType of the seqan3::field::QUAL input; must satisfy std::ranges::OutputRange over a seqan3::WritableQualityAlphabet.
Parameters
[in,out]streamThe input stream to read from.
[in]optionsFile specific options passed to the format.
[out]sequenceThe buffer for seqan3::field::SEQ input, i.e. the "sequence".
[out]idThe buffer for seqan3::field::ID input, e.g. the header line in FastA.
[out]qualitiesThe buffer for seqan3::field::QUAL input.

Additional requirements

◆ write()

void write ( stream_type &  stream,
seqan3::sequence_file_output_options const &  options,
seq_type &&  sequence,
id_type &&  id,
qual_type &&  qualities 
)
related

Write the given fields to the specified stream.

Template Parameters
stream_typeOutput stream, must satisfy seqan3::OStream with char.
seq_typeType of the seqan3::field::SEQ output; must satisfy std::ranges::OutputRange over a seqan3::Alphabet.
id_typeType of the seqan3::field::ID output; must satisfy std::ranges::OutputRange over a seqan3::Alphabet.
qual_typeType of the seqan3::field::QUAL output; must satisfy std::ranges::OutputRange over a seqan3::QualityAlphabet.
Parameters
[in,out]streamThe output stream to write into.
[in]optionsFile specific options passed to the format.
[in]sequenceThe data for seqan3::field::SEQ, i.e. the "sequence".
[in]idThe data for seqan3::field::ID, e.g. the header line in FastA.
[in]qualitiesThe data for seqan3::field::QUAL.

Additional requirements

  • The format must also accept std::ignore as parameter for any of the fields, however it shall throw an exception if one of the fields required for writing the format is marked as such. [this shall be checked inside the function]
  • The format does not handle seqan3::field::SEQ_QUAL, instead seqan3::sequence_file_output splits it into two views and passes it to the format as if they were separate.

Member Data Documentation

◆ file_extensions

std::vector<std::string> seqan3::format_embl::file_extensions
inlinestatic
Initial value:
{
{ "embl" },
}

The valid file extensions for this format; note that you can modify this value.


The documentation for this struct was generated from the following file: