SamFlag Class Reference

Class for extracting information from a SAM Flag. More...

#include <SamFlag.h>

List of all members.

Static Public Member Functions

Static methods for determining the contents of a flag.

static bool isMapped (uint16_t flag)
static bool isMateMapped (uint16_t flag)
static bool isPaired (uint16_t flag)
static bool isReverse (uint16_t flag)
static bool isMateReverse (uint16_t flag)
static bool isProperPair (uint16_t flag)
static bool isDuplicate (uint16_t flag)
static bool isQCFailure (uint16_t flag)
static bool isFirstFragment (uint16_t flag)
 Return if it is the first fragment or not (if FIRST_READ is set and SECOND_READ is not).
static bool isLastFragment (uint16_t flag)
 Return if it is the last fragment or not (if FIRST_READ is not set and SECOND_READ is).
static bool isMidFragment (uint16_t flag)
 Return if it is a middle fragment or not (if FIRST_READ is set and SECOND_READ is also set).
static bool isUnknownFragment (uint16_t flag)
 Return if it is an unknown fragment fragment or not (if FIRST_READ is not set and SECOND_READ is also not set).
static uint8_t getFragmentType (uint16_t flag)
static void setUnmapped (uint16_t &flag)
 Mark the passed in flag as unmapped.
static void setNotDuplicate (uint16_t &flag)
 Mark the passed in flag as not duplicate.
static void setDuplicate (uint16_t &flag)
 Mark the passed in flag as not duplicate.

Static Public Attributes

Constants for parsing a flag.

static const int16_t PAIRED = 0x0001
static const int16_t PROPER_PAIR = 0x0002
static const int16_t UNMAPPED = 0x0004
static const int16_t MATE_UNMAPPED = 0x0008
static const int16_t REVERSE = 0x0010
static const int16_t MATE_REVERSED = 0x0020
static const int16_t FIRST_READ = 0x0040
static const int16_t SECOND_READ = 0x0080
static const int16_t SECONDARY_ALIGNMENT = 0x0100
static const int16_t FAILED_QUALITY = 0x0200
static const int16_t DUPLICATE = 0x0400
static const int16_t FRAGMENT_INFO = 0x00C0
static const int16_t FRAGMENT_SHIFT = 6

Detailed Description

Class for extracting information from a SAM Flag.

Definition at line 28 of file SamFlag.h.


Member Function Documentation

static bool SamFlag::isFirstFragment ( uint16_t  flag  )  [inline, static]

Return if it is the first fragment or not (if FIRST_READ is set and SECOND_READ is not).

Definition at line 68 of file SamFlag.h.

00069     {
00070         // first fragment if FIRST_READ is set and SECOND_READ is not.
00071         return((flag & FIRST_READ) && !(flag & SECOND_READ));
00072     }

static bool SamFlag::isLastFragment ( uint16_t  flag  )  [inline, static]

Return if it is the last fragment or not (if FIRST_READ is not set and SECOND_READ is).

Definition at line 75 of file SamFlag.h.

00076     {
00077         // last fragment if FIRST_READ is not set and SECOND_READ is set.
00078         return(!(flag & FIRST_READ) && (flag & SECOND_READ));
00079     }

static bool SamFlag::isMidFragment ( uint16_t  flag  )  [inline, static]

Return if it is a middle fragment or not (if FIRST_READ is set and SECOND_READ is also set).

Definition at line 82 of file SamFlag.h.

00083     {
00084         // mid fragment if both FIRST_READ and SECOND_READ are set.
00085         return((flag & FIRST_READ) && (flag & SECOND_READ));
00086     }

static bool SamFlag::isUnknownFragment ( uint16_t  flag  )  [inline, static]

Return if it is an unknown fragment fragment or not (if FIRST_READ is not set and SECOND_READ is also not set).

Definition at line 89 of file SamFlag.h.

00090     {
00091         // unknown fragment index if neither FIRST_READ nor SECOND_READ are not.
00092         return(!(flag & FIRST_READ) && !(flag & SECOND_READ));
00093     }


The documentation for this class was generated from the following file:
Generated on Mon Feb 11 13:45:27 2013 for libStatGen Software by  doxygen 1.6.3