BamTools  2.5.1
Namespaces | Classes | Typedefs | Functions
BamTools Namespace Reference

Contains all BamTools classes & methods. More...

Namespaces

 Algorithms
 Provides convenient classes & methods for working with BAM data.
 
 Constants
 Provides basic constants for handling BAM files.
 

Classes

class  BamAlignment
 The main BAM alignment data structure. More...
 
struct  CigarOp
 Represents a CIGAR alignment operation. More...
 
struct  RefData
 Represents a reference sequence entry. More...
 
struct  BamRegion
 Represents a sequential genomic region. More...
 
struct  CustomHeaderTag
 
struct  RaiiBuffer
 
class  BamIndex
 Provides methods for generating & loading BAM index files. More...
 
class  BamMultiReader
 Convenience class for reading multiple BAM files. More...
 
class  BamReader
 Provides read access to BAM files. More...
 
class  BamWriter
 Provides write access for generating BAM files. More...
 
class  IBamIODevice
 
struct  SamHeader
 Represents the SAM-formatted text header that is part of the BAM file header. More...
 
struct  SamProgram
 Represents a SAM program record. More...
 
class  SamProgramChain
 Sorted container "chain" of SamProgram records. More...
 
struct  SamReadGroup
 Represents a SAM read group entry. More...
 
class  SamReadGroupDictionary
 Container of SamReadGroup entries. More...
 
struct  SamSequence
 Represents a SAM sequence entry. More...
 
class  SamSequenceDictionary
 Container of SamSequence entries. More...
 

Typedefs

typedef std::vector< BamAlignmentBamAlignmentVector
 
typedef std::vector< RefDataRefVector
 convenience typedef for vector of RefData entries More...
 
typedef std::vector< SamProgramSamProgramContainer
 
typedef SamProgramContainer::iterator SamProgramIterator
 
typedef SamProgramContainer::const_iterator SamProgramConstIterator
 
typedef std::vector< SamReadGroupSamReadGroupContainer
 
typedef SamReadGroupContainer::iterator SamReadGroupIterator
 
typedef SamReadGroupContainer::const_iterator SamReadGroupConstIterator
 
typedef std::vector< SamSequenceSamSequenceContainer
 
typedef SamSequenceContainer::iterator SamSequenceIterator
 
typedef SamSequenceContainer::const_iterator SamSequenceConstIterator
 

Functions

template<>
bool BamAlignment::AddTag< std::string > (const std::string &tag, const std::string &type, const std::string &value)
 
template<>
bool BamAlignment::GetTag< std::string > (const std::string &tag, std::string &destination) const
 
API_EXPORT bool FileExists (const std::string &filename)
 returns true if the file exists More...
 
API_EXPORT void SwapEndian_16 (int16_t &x)
 swaps endianness of signed 16-bit integer, in place More...
 
API_EXPORT void SwapEndian_16 (uint16_t &x)
 swaps endianness of unsigned 16-bit integer, in place More...
 
API_EXPORT void SwapEndian_32 (int32_t &x)
 swaps endianness of signed 32-bit integer, in place More...
 
API_EXPORT void SwapEndian_32 (uint32_t &x)
 swaps endianness of unsigned 32-bit integer, in place More...
 
API_EXPORT void SwapEndian_64 (int64_t &x)
 swaps endianness of signed 64-bit integer, in place More...
 
API_EXPORT void SwapEndian_64 (uint64_t &x)
 swaps endianness of unsigned 64-bit integer, in place More...
 
API_EXPORT void SwapEndian_16p (char *data)
 swaps endianness of the next 2 bytes in a buffer, in place More...
 
API_EXPORT void SwapEndian_32p (char *data)
 swaps endianness of the next 4 bytes in a buffer, in place More...
 
API_EXPORT void SwapEndian_64p (char *data)
 swaps endianness of the next 8 bytes in a buffer, in place More...
 
API_EXPORT bool SystemIsBigEndian ()
 checks host architecture's byte order More...
 
API_EXPORT void PackUnsignedInt (char *buffer, unsigned int value)
 stores unsigned integer value in a byte buffer More...
 
API_EXPORT void PackUnsignedShort (char *buffer, unsigned short value)
 stores unsigned short integer value in a byte buffer More...
 
API_EXPORT double UnpackDouble (const char *buffer)
 reads a double value from byte buffer More...
 
API_EXPORT double UnpackDouble (char *buffer)
 reads a double value from byte buffer More...
 
API_EXPORT float UnpackFloat (const char *buffer)
 reads a float value from byte buffer More...
 
API_EXPORT float UnpackFloat (char *buffer)
 reads a float value from byte buffer More...
 
API_EXPORT signed int UnpackSignedInt (const char *buffer)
 reads a signed integer value from byte buffer More...
 
API_EXPORT signed int UnpackSignedInt (char *buffer)
 reads a signed integer value from byte buffer More...
 
API_EXPORT signed short UnpackSignedShort (const char *buffer)
 reads a signed short integer value from byte buffer More...
 
API_EXPORT signed short UnpackSignedShort (char *buffer)
 reads a signed short integer value from byte buffer More...
 
API_EXPORT unsigned int UnpackUnsignedInt (const char *buffer)
 reads an unsigned integer value from byte buffer More...
 
API_EXPORT unsigned int UnpackUnsignedInt (char *buffer)
 reads an unsigned integer value from byte buffer More...
 
API_EXPORT unsigned short UnpackUnsignedShort (const char *buffer)
 reads an unsigned short integer value from byte buffer More...
 
API_EXPORT unsigned short UnpackUnsignedShort (char *buffer)
 reads an unsigned short integer value from byte buffer More...
 
API_EXPORT bool operator== (const SamProgram &lhs, const SamProgram &rhs)
 tests equality by comparing program IDs More...
 
API_EXPORT bool operator== (const SamReadGroup &lhs, const SamReadGroup &rhs)
 tests equality by comparing read group IDs More...
 
API_EXPORT bool operator== (const SamSequence &lhs, const SamSequence &rhs)
 tests equality by comparing sequence names, lengths, & checksums (if available) More...
 

Detailed Description

Contains all BamTools classes & methods.

The BamTools API contained in this namespace contains classes and methods for reading, writing, and manipulating BAM alignment files.

Typedef Documentation

◆ BamAlignmentVector

◆ RefVector

typedef std::vector<RefData> BamTools::RefVector

convenience typedef for vector of RefData entries

◆ SamProgramConstIterator

typedef SamProgramContainer::const_iterator BamTools::SamProgramConstIterator

◆ SamProgramContainer

◆ SamProgramIterator

typedef SamProgramContainer::iterator BamTools::SamProgramIterator

◆ SamReadGroupConstIterator

typedef SamReadGroupContainer::const_iterator BamTools::SamReadGroupConstIterator

◆ SamReadGroupContainer

◆ SamReadGroupIterator

typedef SamReadGroupContainer::iterator BamTools::SamReadGroupIterator

◆ SamSequenceConstIterator

typedef SamSequenceContainer::const_iterator BamTools::SamSequenceConstIterator

◆ SamSequenceContainer

◆ SamSequenceIterator

typedef SamSequenceContainer::iterator BamTools::SamSequenceIterator

Function Documentation

◆ BamAlignment::AddTag< std::string >()

template<>
bool BamTools::BamAlignment::AddTag< std::string > ( const std::string &  tag,
const std::string &  type,
const std::string &  value 
)
inline

◆ BamAlignment::GetTag< std::string >()

template<>
bool BamTools::BamAlignment::GetTag< std::string > ( const std::string &  tag,
std::string &  destination 
) const
inline

◆ FileExists()

bool BamTools::FileExists ( const std::string &  filename)
inline

returns true if the file exists

◆ operator==() [1/3]

bool BamTools::operator== ( const SamProgram lhs,
const SamProgram rhs 
)
inline

tests equality by comparing program IDs

◆ operator==() [2/3]

bool BamTools::operator== ( const SamReadGroup lhs,
const SamReadGroup rhs 
)
inline

tests equality by comparing read group IDs

◆ operator==() [3/3]

bool BamTools::operator== ( const SamSequence lhs,
const SamSequence rhs 
)
inline

tests equality by comparing sequence names, lengths, & checksums (if available)

◆ PackUnsignedInt()

void BamTools::PackUnsignedInt ( char *  buffer,
unsigned int  value 
)
inline

stores unsigned integer value in a byte buffer

Parameters
[out]bufferdestination buffer
[in]valuevalue to 'pack' in buffer

◆ PackUnsignedShort()

void BamTools::PackUnsignedShort ( char *  buffer,
unsigned short  value 
)
inline

stores unsigned short integer value in a byte buffer

Parameters
[out]bufferdestination buffer
[in]valuevalue to 'pack' in buffer

◆ SwapEndian_16() [1/2]

void BamTools::SwapEndian_16 ( int16_t &  x)
inline

swaps endianness of signed 16-bit integer, in place

◆ SwapEndian_16() [2/2]

void BamTools::SwapEndian_16 ( uint16_t &  x)
inline

swaps endianness of unsigned 16-bit integer, in place

◆ SwapEndian_16p()

void BamTools::SwapEndian_16p ( char *  data)
inline

swaps endianness of the next 2 bytes in a buffer, in place

◆ SwapEndian_32() [1/2]

void BamTools::SwapEndian_32 ( int32_t &  x)
inline

swaps endianness of signed 32-bit integer, in place

◆ SwapEndian_32() [2/2]

void BamTools::SwapEndian_32 ( uint32_t &  x)
inline

swaps endianness of unsigned 32-bit integer, in place

◆ SwapEndian_32p()

void BamTools::SwapEndian_32p ( char *  data)
inline

swaps endianness of the next 4 bytes in a buffer, in place

◆ SwapEndian_64() [1/2]

void BamTools::SwapEndian_64 ( int64_t &  x)
inline

swaps endianness of signed 64-bit integer, in place

◆ SwapEndian_64() [2/2]

void BamTools::SwapEndian_64 ( uint64_t &  x)
inline

swaps endianness of unsigned 64-bit integer, in place

◆ SwapEndian_64p()

void BamTools::SwapEndian_64p ( char *  data)
inline

swaps endianness of the next 8 bytes in a buffer, in place

◆ SystemIsBigEndian()

bool BamTools::SystemIsBigEndian ( )
inline

checks host architecture's byte order

Returns
true if system uses big-endian ordering

◆ UnpackDouble() [1/2]

double BamTools::UnpackDouble ( char *  buffer)
inline

reads a double value from byte buffer

This is an overloaded function.

Parameters
[in]buffersource byte buffer
Returns
the (double) value read from the buffer

◆ UnpackDouble() [2/2]

double BamTools::UnpackDouble ( const char *  buffer)
inline

reads a double value from byte buffer

Parameters
[in]buffersource byte buffer
Returns
the (double) value read from the buffer

◆ UnpackFloat() [1/2]

double BamTools::UnpackFloat ( char *  buffer)
inline

reads a float value from byte buffer

This is an overloaded function.

Parameters
[in]buffersource byte buffer
Returns
the (float) value read from the buffer

◆ UnpackFloat() [2/2]

double BamTools::UnpackFloat ( const char *  buffer)
inline

reads a float value from byte buffer

Parameters
[in]buffersource byte buffer
Returns
the (float) value read from the buffer

◆ UnpackSignedInt() [1/2]

signed int BamTools::UnpackSignedInt ( char *  buffer)
inline

reads a signed integer value from byte buffer

This is an overloaded function.

Parameters
[in]buffersource byte buffer
Returns
the (signed int) value read from the buffer

◆ UnpackSignedInt() [2/2]

signed int BamTools::UnpackSignedInt ( const char *  buffer)
inline

reads a signed integer value from byte buffer

Parameters
[in]buffersource byte buffer
Returns
the (signed int) value read from the buffer

◆ UnpackSignedShort() [1/2]

signed short BamTools::UnpackSignedShort ( char *  buffer)
inline

reads a signed short integer value from byte buffer

This is an overloaded function.

Parameters
[in]buffersource byte buffer
Returns
the (signed short) value read from the buffer

◆ UnpackSignedShort() [2/2]

signed short BamTools::UnpackSignedShort ( const char *  buffer)
inline

reads a signed short integer value from byte buffer

Parameters
[in]buffersource byte buffer
Returns
the (signed short) value read from the buffer

◆ UnpackUnsignedInt() [1/2]

unsigned int BamTools::UnpackUnsignedInt ( char *  buffer)
inline

reads an unsigned integer value from byte buffer

This is an overloaded function.

Parameters
[in]buffersource byte buffer
Returns
the (unsigned int) value read from the buffer

◆ UnpackUnsignedInt() [2/2]

unsigned int BamTools::UnpackUnsignedInt ( const char *  buffer)
inline

reads an unsigned integer value from byte buffer

Parameters
[in]buffersource byte buffer
Returns
the (unsigned int) value read from the buffer

◆ UnpackUnsignedShort() [1/2]

unsigned short BamTools::UnpackUnsignedShort ( char *  buffer)
inline

reads an unsigned short integer value from byte buffer

This is an overloaded function.

Parameters
[in]buffersource byte buffer
Returns
the (unsigned short) value read from the buffer

◆ UnpackUnsignedShort() [2/2]

unsigned short BamTools::UnpackUnsignedShort ( const char *  buffer)
inline

reads an unsigned short integer value from byte buffer

Parameters
[in]buffersource byte buffer
Returns
the (unsigned short) value read from the buffer