SeqAn3  3.1.0-rc.1
The Modern C++ library for sequence analysis.
sam_flag.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2021, 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 
24 {};
25 
73 enum class sam_flag : uint16_t
74 {
75  none = 0,
76  paired = 0x1,
77  proper_pair = 0x2,
78  unmapped = 0x4,
79  mate_unmapped = 0x8,
80  on_reverse_strand = 0x10,
81  mate_on_reverse_strand = 0x20,
82  first_in_pair = 0x40,
83  second_in_pair = 0x80,
84  secondary_alignment = 0x100,
85  failed_filter = 0x200,
86  duplicate = 0x400,
88 };
89 
94 template <>
97 
104 template <typename char_t>
106 {
107  return stream << static_cast<int16_t>(flag);
108 }
109 
110 } // namespace seqan3
Provides seqan3::add_enum_bitwise_operators.
A "pretty printer" for most SeqAn data structures and related types.
Definition: debug_stream_type.hpp:76
Provides seqan3::debug_stream and related types.
debug_stream_type< char_t > & operator<<(debug_stream_type< char_t > &stream, alignment_t &&alignment)
Stream operator for alignments, which are represented as tuples of aligned sequences.
Definition: debug_stream_alignment.hpp:101
sam_flag
An enum flag that describes the properties of an aligned read (given as a SAM record).
Definition: sam_flag.hpp:74
constexpr bool add_enum_bitwise_operators< sam_flag >
Enables bitwise operations for seqan3::sam_flags.
Definition: sam_flag.hpp:95
@ mate_on_reverse_strand
The mate sequence has been reverse complemented before being mapped (aligned).
@ mate_unmapped
The mate of this read is not mapped to a reference (unaligned).
@ secondary_alignment
This read alignment is an alternative (possibly suboptimal) to the primary.
@ duplicate
The read is marked as a PCR duplicate or optical duplicate.
@ on_reverse_strand
The read sequence has been reverse complemented before being mapped (aligned).
@ none
None of the flags below are set.
@ failed_filter
The read alignment failed a filter, e.g. quality controls.
@ second_in_pair
Indicates the ordering (see details in the seqan3::sam_flag description).
@ first_in_pair
Indicates the ordering (see details in the seqan3::sam_flag description).
@ unmapped
The read is not mapped to a reference (unaligned).
@ supplementary_alignment
This sequence is part of a split alignment and is not the primary alignment.
@ paired
The aligned read is paired (paired-end sequencing).
@ proper_pair
The two aligned reads in a pair have a proper distance between each other.
@ flag
The alignment flag (bit information), uint16_t value.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Type tag which indicates that no reference information has been passed to the alignment file on const...
Definition: sam_flag.hpp:24