Loading...
Searching...
No Matches
BamTools::SamReadGroupDictionary Class Reference

Container of SamReadGroup entries. More...

`#include <SamReadGroupDictionary.h>`

## Public Member Functions

| SamReadGroupDictionary ()
| constructor
void | Add (const SamReadGroup &readGroup)
| Appends a read group to the dictionary.
void | Add (const std::string &readGroupId)
| Appends a read group to the dictionary.
void | Add (const SamReadGroupDictionary &readGroups)
| Appends another read group dictionary to this one.
void | Add (const std::vector< SamReadGroup > &readGroups)
| Appends multiple read groups to the dictionary.
void | Add (const std::vector< std::string > &readGroupIds)
| Appends multiple read groups to the dictionary.
void | Clear ()
| Clears all read group entries.
bool | Contains (const SamReadGroup &readGroup) const
| Returns true if dictionary contains read group (matching on ID).
bool | Contains (const std::string &readGroupId) const
| Returns true if dictionary contains read group.
bool | IsEmpty () const
| Returns `true` if dictionary contains no read groups.
void | Remove (const SamReadGroup &readGroup)
| Removes read group from dictionary, if found (matching on ID).
void | Remove (const std::string &readGroupId)
| Removes read group from dictionary, if found.
void | Remove (const std::vector< SamReadGroup > &readGroups)
| Removes multiple read groups from dictionary (matching on ID).
void | Remove (const std::vector< std::string > &readGroupIds)
| Removes multiple read groups from dictionary.
int | Size () const
| Returns number of read groups in dictionary.
SamReadGroup & | operator[] (const std::string &readGroupId)
| Retrieves the modifiable SamReadGroup that matches readGroupId.
SamReadGroupIterator | Begin ()
SamReadGroupConstIterator | Begin () const
SamReadGroupConstIterator | ConstBegin () const
SamReadGroupIterator | End ()
SamReadGroupConstIterator | End () const
SamReadGroupConstIterator | ConstEnd () const

## Detailed Description

Container of SamReadGroup entries.

Provides methods for operating on a collection of SamReadGroup entries.

## Constructor & Destructor Documentation

## SamReadGroupDictionary()

SamReadGroupDictionary::SamReadGroupDictionary | ( |  | ) |

constructor

## Member Function Documentation

## Add() [1/5]

void SamReadGroupDictionary::Add | ( | const SamReadGroup & | readGroup | ) |

Appends a read group to the dictionary.

Duplicate entries are silently discarded.

Parameters

  [in] | readGroup | entry to be added

## Add() [2/5]

void SamReadGroupDictionary::Add | ( | const SamReadGroupDictionary & | readGroups | ) |

Appends another read group dictionary to this one.

This is an overloaded function.

Parameters

  [in] | readGroups | entries to be added

See also
  Add()

## Add() [3/5]

void SamReadGroupDictionary::Add | ( | const std::string & | readGroupId | ) |

Appends a read group to the dictionary.

This is an overloaded function.

Parameters

  [in] | readGroupId | ID of read group to be added

See also
  Add()

## Add() [4/5]

void SamReadGroupDictionary::Add | ( | const std::vector< SamReadGroup > & | readGroups | ) |

Appends multiple read groups to the dictionary.

This is an overloaded function.

Parameters

  [in] | readGroups | entries to be added

See also
  Add()

## Add() [5/5]

void SamReadGroupDictionary::Add | ( | const std::vector< std::string > & | readGroupIds | ) |

Appends multiple read groups to the dictionary.

This is an overloaded function.

Parameters

  [in] | readGroupIds | IDs of read groups to be added

See also
  Add()

## Begin() [1/2]

SamReadGroupIterator SamReadGroupDictionary::Begin | ( |  | ) |

Returns
  an STL iterator pointing to the first read group

See also
  ConstBegin(), End()

## Begin() [2/2]

SamReadGroupConstIterator SamReadGroupDictionary::Begin | ( |  | ) | const

Returns
  an STL const_iterator pointing to the first read group

This is an overloaded function.

See also
  ConstBegin(), End()

## Clear()

void SamReadGroupDictionary::Clear | ( |  | ) |

Clears all read group entries.

## ConstBegin()

SamReadGroupConstIterator SamReadGroupDictionary::ConstBegin | ( |  | ) | const

Returns
  an STL const_iterator pointing to the first read group

See also
  Begin(), ConstEnd()

## ConstEnd()

SamReadGroupConstIterator SamReadGroupDictionary::ConstEnd | ( |  | ) | const

Returns
  an STL const_iterator pointing to the imaginary entry after the last read group

See also
  ConstBegin(), End()

## Contains() [1/2]

bool SamReadGroupDictionary::Contains | ( | const SamReadGroup & | readGroup | ) | const

Returns true if dictionary contains read group (matching on ID).

This is an overloaded function.

Parameters

  [in] | readGroup | search for this read group

Returns
  `true` if dictionary contains read group (matching on ID).

## Contains() [2/2]

bool SamReadGroupDictionary::Contains | ( | const std::string & | readGroupId | ) | const

Returns true if dictionary contains read group.

Parameters

  [in] | readGroupId | search for read group matching this ID

Returns
  `true` if dictionary contains a read group with this ID

## End() [1/2]

SamReadGroupIterator SamReadGroupDictionary::End | ( |  | ) |

Returns
  an STL iterator pointing to the imaginary entry after the last read group

See also
  Begin(), ConstEnd()

## End() [2/2]

SamReadGroupConstIterator SamReadGroupDictionary::End | ( |  | ) | const

Returns
  an STL const_iterator pointing to the imaginary entry after the last read group

This is an overloaded function.

See also
  Begin(), ConstEnd()

## IsEmpty()

bool SamReadGroupDictionary::IsEmpty | ( |  | ) | const

Returns `true` if dictionary contains no read groups.

See also
  Size()

## operator[]()

SamReadGroup & SamReadGroupDictionary::operator[] | ( | const std::string & | readGroupId | ) |

Retrieves the modifiable SamReadGroup that matches readGroupId.

Note
  If the dictionary contains no read group matching this ID, this function inserts a new one with this ID, and returns a reference to it. If you want to avoid this insertion behavior, check the result of Contains() before using this operator.

Parameters

  [in] | readGroupId | ID of read group to retrieve

Returns
  a modifiable reference to the SamReadGroup associated with the ID

## Remove() [1/4]

void SamReadGroupDictionary::Remove | ( | const SamReadGroup & | readGroup | ) |

Removes read group from dictionary, if found (matching on ID).

This is an overloaded function.

Parameters

  [in] | readGroup | read group to remove (matches on ID)

## Remove() [2/4]

void SamReadGroupDictionary::Remove | ( | const std::string & | readGroupId | ) |

Removes read group from dictionary, if found.

Parameters

  [in] | readGroupId | ID of read group to remove

See also
  Remove()

## Remove() [3/4]

void SamReadGroupDictionary::Remove | ( | const std::vector< SamReadGroup > & | readGroups | ) |

Removes multiple read groups from dictionary (matching on ID).

This is an overloaded function.

Parameters

  [in] | readGroups | read groups to remove

See also
  Remove()

## Remove() [4/4]

void SamReadGroupDictionary::Remove | ( | const std::vector< std::string > & | readGroupIds | ) |

Removes multiple read groups from dictionary.

This is an overloaded function.

Parameters

  [in] | readGroupIds | IDs of the read groups to remove

See also
  Remove()

## Size()

int SamReadGroupDictionary::Size | ( |  | ) | const

Returns number of read groups in dictionary.

See also
  IsEmpty()

The documentation for this class was generated from the following files:

- SamReadGroupDictionary.h
- SamReadGroupDictionary.cpp