SeqAn3  3.0.1
The Modern C++ library for sequence analysis.
misc.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
17 
18 namespace seqan3
19 {
20 
23 {};
24 
70 enum class sam_flag : uint16_t
71 {
72  none = 0,
73  paired = 0x1,
74  proper_pair = 0x2,
75  unmapped = 0x4,
76  mate_unmapped = 0x8,
77  on_reverse_strand = 0x10,
78  mate_on_reverse_strand = 0x20,
79  first_in_pair = 0x40,
80  second_in_pair = 0x80,
81  secondary_alignment = 0x100,
82  failed_filter = 0x200,
83  duplicate = 0x400,
85 };
86 
88 template <>
90 
97 template <typename char_t>
99 {
100  return stream << static_cast<int16_t>(flag);
101 }
102 
103 } // namespace seqan3
seqan3::sam_flag::mate_on_reverse_strand
The mate sequence has been reverse complemented before being mapped (aligned).
seqan3::sam_flag
sam_flag
An enum flag that describes the properties of an aligned read (given as a SAM record).
Definition: misc.hpp:70
debug_stream_type.hpp
Provides seqan3::debug_stream and related types.
seqan3::sam_flag::first_in_pair
Indicates the ordering (see details in the seqan3::sam_flag description).
seqan3::sam_flag::secondary_alignment
This read alignment is an alternative (possibly suboptimal) to the primary.
seqan3::sam_flag::paired
The aligned read is paired (paired-end sequencing).
seqan3::debug_stream_type
A "pretty printer" for most SeqAn data structures and related types.
Definition: debug_stream_type.hpp:70
seqan3::sam_flag::duplicate
The read is marked as a PCR duplicate or optical duplicate.
seqan3::sam_flag::none
None of the flags below are set.
seqan3::sam_flag::on_reverse_strand
The read sequence has been reverse complemented before being mapped (aligned).
seqan3
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:36
seqan3::add_enum_bitwise_operators< sam_flag >
constexpr bool add_enum_bitwise_operators< sam_flag >
Enables bitwise operations for seqan3::sam_flags.
Definition: misc.hpp:89
seqan3::sam_flag::mate_unmapped
The mate of this read is not mapped to a reference (unaligned).
add_enum_bitwise_operators.hpp
Provides seqan3::add_enum_bitwise_operators.
seqan3::operator<<
debug_stream_type< char_t > & operator<<(debug_stream_type< char_t > &stream, tuple_t const &alignment)
Stream operator for alignments, which are represented as tuples of aligned sequences.
Definition: aligned_sequence_concept.hpp:559
seqan3::ref_info_not_given
Type tag which indicates that no reference information has been passed to the alignment file on const...
Definition: misc.hpp:22
seqan3::sam_flag::proper_pair
The two aligned reads in a pair have a proper distance between each other.
seqan3::sam_flag::failed_filter
The read alignment failed a filter, e.g. quality controls.
seqan3::sam_flag::supplementary_alignment
This sequence is part of a split alignment and is not the primary alignment.
seqan3::sam_flag::unmapped
The read is not mapped to a reference (unaligned).
seqan3::sam_flag::second_in_pair
Indicates the ordering (see details in the seqan3::sam_flag description).
seqan3::field::flag
The alignment flag (bit information), uint16_t value.