The FastA format. More...
#include <seqan3/io/sequence_file/format_fasta.hpp>
Public 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 (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 (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... | |
Constructors, destructor and assignment | |
Rule of five explicitly defaulted. | |
sequence_file_format_fasta ()=default | |
sequence_file_format_fasta (sequence_file_format_fasta const &)=delete | |
sequence_file_format_fasta & | operator= (sequence_file_format_fasta const &)=delete |
sequence_file_format_fasta (sequence_file_format_fasta &&)=default | |
sequence_file_format_fasta & | operator= (sequence_file_format_fasta &&)=default |
~sequence_file_format_fasta ()=default | |
Requirements for seqan3::sequence_file_input_format_concept | |
You can expect these members on all types that implement seqan3::sequence_file_input_format_concept. | |
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... | |
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... | |
The FastA format.
FastA is the de-facto-standard for sequence storage in bionformatics. See the article on wikipedia for a an in-depth description of the format.
The FastA format provides the fields seqan3::field::SEQ and seqan3::field::ID. Both fields are required when writing.
When reading the ID-line the identifier (either ;
or >
) and any blank characters before the actual ID are stripped.
This implementation supports the following less known and optional features of the format:
;
instead of >
The following optional features are currently not supported:
;
or >
), only one ID line before the sequence line is accepted
|
inherited |
Read from the specified stream and back-insert into the given field buffers.
stream_type | Input stream, must satisfy seqan3::istream_concept with char . |
seq_type | Type of the seqan3::field::SEQ input; must satisfy std::ranges::OutputRange over a seqan3::alphabet_concept. |
id_type | Type of the seqan3::field::ID input; must satisfy std::ranges::OutputRange over a seqan3::alphabet_concept. |
qual_type | Type of the seqan3::field::QUAL input; must satisfy std::ranges::OutputRange over a seqan3::quality_concept. |
[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. |
|
inline |
Read from the specified stream and back-insert into the given field buffers.
stream_type | Input stream, must satisfy seqan3::istream_concept with char . |
seq_type | Type of the seqan3::field::SEQ input; must satisfy std::ranges::OutputRange over a seqan3::alphabet_concept. |
id_type | Type of the seqan3::field::ID input; must satisfy std::ranges::OutputRange over a seqan3::alphabet_concept. |
qual_type | Type of the seqan3::field::QUAL input; must satisfy std::ranges::OutputRange over a seqan3::quality_concept. |
[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. |
|
inline |
Write the given fields to the specified stream.
stream_type | Output stream, must satisfy seqan3::ostream_concept with char . |
seq_type | Type of the seqan3::field::SEQ output; must satisfy std::ranges::OutputRange over a seqan3::alphabet_concept. |
id_type | Type of the seqan3::field::ID output; must satisfy std::ranges::OutputRange over a seqan3::alphabet_concept. |
qual_type | Type of the seqan3::field::QUAL output; must satisfy std::ranges::OutputRange over a seqan3::quality_concept. |
[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 seqan3::sequence_file_output_format_concept.
|
inlinestatic |
The valid file extensions for this format; note that you can modify this value.