SeqAn3  3.0.1
The Modern C++ library for sequence analysis.
seqan3::alignment_file_input_default_traits< ref_sequences_t, ref_ids_t > Struct Template Reference

The default traits for seqan3::alignment_file_input. More...

#include <seqan3/io/alignment_file/input.hpp>

+ Inheritance diagram for seqan3::alignment_file_input_default_traits< ref_sequences_t, ref_ids_t >:

Public Types

Member types
using sequence_alphabet = dna5
 The sequence alphabet is seqan3::dna5.
using sequence_legal_alphabet = dna15
 The legal sequence alphabet for parsing is seqan3::dna15.
template<typename _sequence_alphabet >
using sequence_container = std::vector< _sequence_alphabet >
 The container for a sequence is std::vector.
template<typename _id_alphabet >
using id_container = std::basic_string< _id_alphabet >
 The string type for an identifier is std::basic_string.
using quality_alphabet = phred42
 The alphabet for a quality annotation is seqan3::phred42.
template<typename _quality_alphabet >
using quality_container = std::vector< _quality_alphabet >
 The string type for a quality annotation is std::vector.
using ref_sequences = ref_sequences_t
 The type of the reference sequences is deduced on construction.
using ref_ids = ref_ids_t
 The type of the reference identifiers is deduced on construction.

Detailed Description

template<typename ref_sequences_t = ref_info_not_given, typename ref_ids_t = std::deque<std::string>>
struct seqan3::alignment_file_input_default_traits< ref_sequences_t, ref_ids_t >

The default traits for seqan3::alignment_file_input.

Template Parameters
ref_sequences_tA range over reference sequences. This type is automatically deduced on construction.
ref_ids_tA range over reference ids. This type is automatically deduced on construction.

If you wish to change a single or a few types from the default, just inherit from this class and "overwrite" the respective type definitions.

This example will make the file read into a smaller alphabet and a compressed container:

#include <sstream>
using sequence_alphabet = seqan3::dna4; // instead of dna5
template <typename alph>
using sequence_container = seqan3::bitcompressed_vector<alph>; // must be defined as a template!
auto sam_file_raw = R"(@HD VN:1.6 SO:coordinate GO:none
@SQ SN:ref LN:45
r001 99 ref 7 30 8M2I4M1D3M = 37 39 TTAGATAAAGGATACTG *
r003 0 ref 29 30 5S6M * 0 0 GCCTAAGCTAA * SA:Z:ref,29,-,6H5M,17,0;
r003 2064 ref 29 17 6H5M * 0 0 TAGGC * SA:Z:ref,9,+,5S6M,30,1;
r001 147 ref 237 30 9M = 7 -39 CAGCGGCAT * NM:i:1
// ... within main you can then use:
int main()

The documentation for this struct was generated from the following file:
Provides seqan3::dna4, container aliases and string literals.
A more refined container concept than seqan3::container.
dna5 sequence_alphabet
The sequence alphabet is seqan3::dna5.
Definition: input.hpp:191
A class for reading alignment files, e.g. SAM, BAM, BLAST ...
Definition: input.hpp:382
The four letter DNA alphabet of A,C,G,T.
Definition: dna4.hpp:47
Provides seqan3::bitcompressed_vector.
The default traits for seqan3::alignment_file_input.
Definition: input.hpp:183
Provides seqan3::alignment_file_input and corresponding traits classes.
The SAM format (tag).
Definition: format_sam.hpp:124
A space-optimised version of std::vector that compresses multiple letters into a single byte.
Definition: bitcompressed_vector.hpp:66
Provides seqan3::type_list.