SeqAn3 3.2.0
The Modern C++ library for sequence analysis.
sam_file_input_format Interface Reference

The generic concept for alignment file input formats. More...

#include <seqan3/io/sam_file/input_format_concept.hpp>

Related Functions

(Note that these are not member functions.)

Requirements for seqan3::sam_file_input_format

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

void read_alignment_record (stream_type &stream, sam_file_input_options< seq_legal_alph_type > const &options, ref_seqs_type &ref_seqs, header_type &header, stream_pos_type &position_buffer, seq_type &seq, qual_type &qual, id_type &id, offset_type &offset, ref_seq_type &ref_seq, ref_id_type &ref_id, ref_offset_type &ref_offset, align_type &align, cigar_type &cigar_vector, flag_type &flag, mapq_type &mapq, mate_type &mate, tag_dict_type &tag_dict, e_value_type &e_value, bit_score_type &bit_score)
 Read from the specified stream and back-insert into the given field buffers. More...
 
static inline std::vector< std::stringfile_extensions
 The format type is required to provide a vector of all supported file extensions.
 

Detailed Description

The generic concept for alignment file input formats.

The details of this concept are only relevant to developers who wish to implement their own format. The requirements for this concept are given as related functions and type traits. Types that satisfy this concept are shown as "implementing this interface".

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

Friends And Related Function Documentation

◆ read_alignment_record()

void read_alignment_record ( stream_type &  stream,
sam_file_input_options< seq_legal_alph_type > const &  options,
ref_seqs_type &  ref_seqs,
header_type &  header,
stream_pos_type &  position_buffer,
seq_type &  seq,
qual_type &  qual,
id_type &  id,
offset_type &  offset,
ref_seq_type &  ref_seq,
ref_id_type &  ref_id,
ref_offset_type &  ref_offset,
align_type &  align,
cigar_type &  cigar_vector,
flag_type &  flag,
mapq_type &  mapq,
mate_type &  mate,
tag_dict_type &  tag_dict,
e_value_type &  e_value,
bit_score_type &  bit_score 
)
related

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

Template Parameters
stream_typeThe input stream type; Must be derived from std::ostream.
stream_pos_typeType of the position buffer, aka, the std::streampos of the current record.
ref_seqs_typee.g. std::deque<ref_sequence_type> or decltype(std::ignore).
seq_typeType of the seqan3::field::seq input (see seqan3::sam_file_input_traits).
qual_typeType of the seqan3::field::qual input (see seqan3::sam_file_input_traits).
id_typeType of the seqan3::field::id input (see seqan3::sam_file_input_traits).
offset_typeType of the seqan3::field::offset input (see seqan3::sam_file_input_traits).
ref_seq_typeType of the seqan3::field::ref_seq input (see seqan3::sam_file_input_traits).
ref_id_typeType of the seqan3::field::ref_id input (see seqan3::sam_file_input_traits).
ref_offset_typeType of the seqan3::field::ref_offset input (see seqan3::sam_file_input_traits).
align_typeType of the seqan3::field::alignment input (see seqan3::sam_file_input_traits).
cigar_typeType of the seqan3::field::cigar input (a std::vector<cigar> or std::ignore).
flag_typeType of the seqan3::field::flag input (see seqan3::sam_file_input_traits).
mapq_typeType of the seqan3::field::mapq input (see seqan3::sam_file_input_traits).
mate_typestd::tuple<ref_id_type, ref_offset_type, int32_t> or decltype(std::ignore).
tag_dict_typeseqan3::sam_tag_dictionary or decltype(std::ignore).
e_value_typeType of the seqan3::field::evalue input (see seqan3::sam_file_input_traits).
bit_score_typeType of the seqan3::field::bit_score input (see seqan3::sam_file_input_traits).
Parameters
[in,out]streamThe input stream to read from.
[in,out]position_bufferThe buffer to store the current record's position.
[in]optionsFile specific options passed to the format.
[out]ref_seqsThe reference sequences to the corresponding alignments.
[out]headerA pointer to the seqan3::sam_file_header object.
[out]seqThe buffer for seqan3::field::seq input.
[out]qualThe buffer for seqan3::field::qual input.
[out]idThe buffer for seqan3::field::id input.
[out]offsetThe buffer for seqan3::field::offset input.
[out]ref_seqThe buffer for seqan3::field::ref_seq input.
[out]ref_idThe buffer for seqan3::field::ref_id input.
[out]ref_offsetThe buffer for seqan3::field::ref_offset input.
[out]alignThe buffer for seqan3::field::alignment input.
[out]cigar_vectorThe buffer for seqan3::field::cigar input.
[out]flagThe buffer for seqan3::field::flag input.
[out]mapqThe buffer for seqan3::field::mapq input.
[out]mateThe buffer for seqan3::field::mate input.
[out]tag_dictThe buffer for seqan3::field::tags input.
[out]e_valueThe buffer for seqan3::field::evalue input.
[out]bit_scoreThe buffer for seqan3::field::bit_score input.

Additional requirements

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

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