SeqAn3 3.1.0-rc.2
The Modern C++ library for sequence analysis.
seqan3::fields< fs > Struct Template Reference

A class template that holds a choice of seqan3::field. More...

#include <seqan3/io/record.hpp>

Static Private Member Functions

static constexpr bool contains (field f)
 Whether a field is contained in the parameter pack.
 
static constexpr size_t index_of (field f)
 Retrieve the position of field in the parameter pack.
 

Static Private Attributes

static constexpr std::array< field, sizeof...(fs)> as_array {fs...}
 The template parameters stored in an array for easy access.
 
static constexpr size_t npos = std::numeric_limits<size_t>::max()
 Special value that indicates that index_of() failed.
 
static constexpr size_t size = sizeof...(fs)
 The size of fields.
 

Detailed Description

template<field ... fs>
struct seqan3::fields< fs >

A class template that holds a choice of seqan3::field.

Template Parameters
fsThe fields you wish to be present in the seqan3::record returned by your file.
See also
seqan3::record

This class acts as a compile time list of seqan3::field elements. It is used in specialising file classes to determine the elements in a seqan3::record.

Example

#include <sstream>
auto input = R"(> TEST1
ACGT
> Test2
AGGCTGA
> Test3
GGAGTATAATATATATATATATAT)";
int main()
{
using seqan3::get;
// specify custom field combination/order to file:
auto record = fin.front(); // get current record, in this case the first
auto & id = record.id();
auto & seq = record.sequence();
}
The FastA format.
Definition: format_fasta.hpp:79
A class for reading sequence files, e.g. FASTA, FASTQ ...
Definition: input.hpp:309
@ seq
The "sequence", usually a range of nucleotides or amino acids.
Provides seqan3::sequence_file_output and corresponding traits classes.
constexpr auto const & get(configuration< configs_t... > const &config) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: configuration.hpp:429
Provides the seqan3::record template and the seqan3::field enum.
Provides seqan3::sequence_file_input and corresponding traits classes.
A class template that holds a choice of seqan3::field.
Definition: record.hpp:128

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