|
template<typename ref_id_type , typename ref_id_tmp_type , typename header_type , typename ref_seqs_type > |
void | check_and_assign_ref_id (ref_id_type &ref_id, ref_id_tmp_type &ref_id_tmp, header_type &header, ref_seqs_type &) |
| Checks for known reference ids or adds a new reference is and assigns a reference id to ref_id .
|
|
template<arithmetic arithmetic_target_type> |
void | read_arithmetic_field (std::string_view const &str, arithmetic_target_type &arithmetic_target) |
| Reads arithmetic fields using std::from_chars.
|
|
template<std::ranges::forward_range target_range_type> |
void | read_forward_range_field (std::string_view const str, target_range_type &target) |
| Reads from str to target , converting values with seqan3::views::char_to.
|
|
template<typename stream_view_type , std::ranges::forward_range target_range_type> |
void | read_forward_range_field (stream_view_type &&stream_view, target_range_type &target) |
| Reads a range by copying from stream_view to target, converting values with seqan3::views::char_to.
|
|
template<typename stream_view_type , typename ref_ids_type , typename ref_seqs_type , typename seq_legal_alph_type > |
void | read_header (stream_view_type &&stream_view, sam_file_header< ref_ids_type > &hdr, ref_seqs_type &, sam_file_input_options< seq_legal_alph_type > const &options) |
| Reads the SAM header.
|
|
int32_t | soft_clipping_at_front (std::vector< cigar > const &cigar_vector) const |
| Returns the soft clipping value at the front of the cigar_vector or 0 if none present.
|
|
template<typename stream_t , typename header_type > |
void | write_header (stream_t &stream, sam_file_output_options const &options, header_type &header) |
| Writes the SAM header.
|
|
|
| format_sam_base ()=default |
| Defaulted.
|
|
| format_sam_base (format_sam_base const &)=default |
| Defaulted.
|
|
format_sam_base & | operator= (format_sam_base const &)=default |
| Defaulted.
|
|
| format_sam_base (format_sam_base &&)=default |
| Defaulted.
|
|
format_sam_base & | operator= (format_sam_base &&)=default |
| Defaulted.
|
|
| ~format_sam_base ()=default |
| Defaulted.
|
|
The alignment base format.
Since the SAM and BAM format share a lot of functionality, this abstract base class defines common member variables and functions that are used in both formats.
template<typename stream_view_type , typename ref_ids_type , typename ref_seqs_type , typename seq_legal_alph_type >
void seqan3::detail::format_sam_base::read_header |
( |
stream_view_type && |
stream_view, |
|
|
sam_file_header< ref_ids_type > & |
hdr, |
|
|
ref_seqs_type & |
, |
|
|
sam_file_input_options< seq_legal_alph_type > const & |
options |
|
) |
| |
|
inlineprotected |
Reads the SAM header.
- Template Parameters
-
stream_view_type | The type of the stream as a view. |
- Parameters
-
[in,out] | stream_view | The stream view to iterate over. |
[in,out] | hdr | The header (as a pointer) to store the parsed values. |
[in] | options | The options to alter the parsing process. |
- Exceptions
-
Reading the header format is done according to the official SAM format specifications.
The function throws a seqan3::format_error if the format is not in a correct state (e.g. required fields are not given), but throwing might occur downstream of the actual error.
If any unknown tag was encountered, a warning will be emitted to std::cerr. This can be configured with seqan3::sam_file_input_options::stream_warnings_to.