Loading...
Searching...
No Matches
seqan3::format_embl Class Reference
IO » Sequence File

The EMBL format. More...

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

Inheritance diagram for seqan3::format_embl:
[legend]

## Public Member Functions

Constructors, destructor and assignment
| format_embl () noexcept=default
| Defaulted.
| format_embl (format_embl const &) noexcept=default
| Defaulted.
format_embl & | operator= (format_embl const &) noexcept=default
| Defaulted.
| format_embl (format_embl &&) noexcept=default
| Defaulted.
format_embl & | operator= (format_embl &&) noexcept=default
| Defaulted.
| ~format_embl () 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.

## Protected Member Functions

template<typename stream_type, typename seq_legal_alph_type, typename stream_pos_type, typename seq_type, typename id_type, typename qual_type>
void | read_sequence_record (stream_type &stream, sequence_file_input_options< seq_legal_alph_type > const &options, stream_pos_type &position_buffer, seq_type &sequence, id_type &id, qual_type &qualities)
| Read from the specified stream and back-insert into the given field buffers.
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.

## Additional Inherited Members

Related Symbols inherited from seqan3::sequence_file_input_format< t >
void | read_sequence_record (stream_type &stream, seqan3::sequence_file_input_options const &options, stream_pos_type &position_buffer, seq_type &sequence, id_type &id, qual_type &qualities)
| Read from the specified stream and back-insert into the given field buffers.
static inline std::vector< std::string > | file_extensions
| The format type is required to provide a vector of all supported file extensions.
Related Symbols inherited from seqan3::sequence_file_output_format< t >
static inline std::vector< std::string > | file_extensions
| The format type is required to provide a vector of all supported file extensions.

## Detailed Description

The EMBL format.

### 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_specialisation

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.

Remarks
  For a complete overview, take a look at Sequence File

## Member Function Documentation

## read_sequence_record()

template<typename stream_type, typename seq_legal_alph_type, typename stream_pos_type, typename seq_type, typename id_type, typename qual_type>

void seqan3::format_embl::read_sequence_record | ( | stream_type & | stream,
|  | sequence_file_input_options< seq_legal_alph_type > const & | options,
|  | stream_pos_type & | position_buffer,
|  | seq_type & | sequence,
|  | id_type & | id,
|  | qual_type & | qualities )

inline protected

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

Template Parameters

  stream_type | Input stream, must satisfy seqan3::input_stream_over with char.
  stream_pos_type | Buffer for storing the current record's file position.
  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.

Parameters

  [in,out] | stream | The input stream to read from.
  [in,out] | position_buffer | The buffer to store the current record's file position.
  [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.

### Additional requirements

- The function must also accept std::ignore as parameter for any of the fields. [This is enforced by the concept checker!]
- In this case the data read for that field shall be discarded by the format.

## write_sequence_record()

template<typename stream_type, typename seq_type, typename id_type, typename qual_type>

void seqan3::format_embl::write_sequence_record | ( | stream_type & | stream,
|  | sequence_file_output_options const & | options,
|  | seq_type && | sequence,
|  | id_type && | id,
|  | qual_type && | qualities )

inline protected

Write the given fields to the specified stream.

Template Parameters

  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.

Parameters

  [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.

### 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]

Implements seqan3::sequence_file_output_format< t >.

## Member Data Documentation

## file_extensions

std::vector<std::string> seqan3::format_embl::file_extensions

inline static

Initial value:
{
{"embl"},
}

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

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

- format_embl.hpp

Hide me