libStatGen Software  1
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 isSecondary (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 SUPPLEMENTARY_ALIGNMENT = 0x0800
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 71 of file SamFlag.h.

    {
        // first fragment if FIRST_READ is set and SECOND_READ is not.
        return((flag & FIRST_READ) && !(flag & SECOND_READ));
    }
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 78 of file SamFlag.h.

    {
        // last fragment if FIRST_READ is not set and SECOND_READ is set.
        return(!(flag & FIRST_READ) && (flag & SECOND_READ));
    }
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 85 of file SamFlag.h.

    {
        // mid fragment if both FIRST_READ and SECOND_READ are set.
        return((flag & FIRST_READ) && (flag & SECOND_READ));
    }
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 92 of file SamFlag.h.

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

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends