BamTools::Algorithms::Sort Struct Reference
Provides classes & methods related to sorting BamAlignments.
More...
#include <Sort.h>
List of all members.
Detailed Description
Provides classes & methods related to sorting BamAlignments.
Member Enumeration Documentation
Provides explicit values for specifying desired sort ordering.
- Enumerator:
AscendingOrder |
|
DescendingOrder |
|
Member Function Documentation
template<typename Compare >
static std::vector<BamAlignment> BamTools::Algorithms::Sort::GetSortedRegion |
( |
BamMultiReader & |
reader, |
|
|
const BamRegion & |
region, |
|
|
const Compare & |
comp = Compare() | |
|
) |
| | [inline, static] |
Reads a region of alignments from position-sorted BAM files, then sorts by the provided compare function
BamMultiReader reader;
BamRegion region;
std::vector<BamAlignments> a;
a = Sort::GetSortedRegion(reader, region, Sort::ByTag<std::string>("RG"));
- Parameters:
-
[in] | reader | BamMultiReader opened on desired BAM files |
[in] | region | desired region-of-interest |
[in] | comp | comparison function object |
- Returns:
- sorted vector of the region's alignments
template<typename Compare >
static std::vector<BamAlignment> BamTools::Algorithms::Sort::GetSortedRegion |
( |
BamReader & |
reader, |
|
|
const BamRegion & |
region, |
|
|
const Compare & |
comp = Compare() | |
|
) |
| | [inline, static] |
Reads a region of alignments from a position-sorted BAM file, then sorts by the provided compare function
BamReader reader;
BamRegion region;
std::vector<BamAlignments> a;
a = Sort::GetSortedRegion(reader, region, Sort::ByTag<std::string>("RG"));
- Parameters:
-
[in] | reader | BamReader opened on desired BAM file |
[in] | region | desired region-of-interest |
[in] | comp | comparison function object |
- Returns:
- sorted vector of the region's alignments
template<typename Compare >
static std::vector<BamAlignment> BamTools::Algorithms::Sort::SortAlignments |
( |
const std::vector< BamAlignment > & |
input, |
|
|
const Compare & |
comp = Compare() | |
|
) |
| | [inline, static] |
Returns a sorted copy of the input alignments, using the provided compare function.
- Parameters:
-
[in] | input | vector of alignments to be sorted |
[in] | comp | comparison function object |
- Returns:
- sorted copy of the input data
template<typename Compare >
static void BamTools::Algorithms::Sort::SortAlignments |
( |
std::vector< BamAlignment > & |
data, |
|
|
const Compare & |
comp = Compare() | |
|
) |
| | [inline, static] |
Sorts a std::vector of alignments (in-place), using the provided compare function.
- Parameters:
-
[in,out] | data | vector of alignments to be sorted |
[in] | comp | comparison function object |
The documentation for this struct was generated from the following file: