Class BamIndex
Access to BAM indices.

All Subcl's BaiBamIndex
Defined in <seqan/bam_io.h>
Signature template <typename TSpec> class BamIndex;

Interface Function Overview

Detailed Description

This is an abstract class; don't use it itself but its specializations.

Interface Functions Detail

__uint64 getUnalignedCount(index);

Query index for number of unaligned reads.

Parameters

index Index to query.

Returns

__uint64 The number of unaligned reads.

bool jumpToOrphans(stream, hasAlignments, bamIOContext, index);

Seek to orphans block in BAM BGZF stream using an index.

Parameters

stream The BgzfStream object to jump with.
hasAlignments A reference to bool that is set to true if there are any orphans.
bamIOContext The BamIOContext to use for the state.
index The BamIndex to use for jumping.

Returns

bool true if seeking was successful, false if not.

bool jumpToRegion(stream, hasAlignments, bamIOContext, refID, pos, posEnd, index);

Seek in BAM BGZF stream using an index.

Parameters

stream The BgzfStream to jump with.
hasAlignments A bool that is set true if the region [pos, posEnd) has any alignments.
bamIOContext The BamIOContext to use for jumping.
refID The reference id to jump to (__int32).
pos The begin of the region to jump to (__int32).
posEnd The end of the region to jump to (__int32).
index The BamIndex to use for the jumping.

Returns

bool true if seeking was successful, false if not.

You provide a region [pos, posEnd) on the reference refID that you want to jump to and the function jumps to the first alignment in this region, if any.

This function fails if refID/pos are invalid.

int read(index, filename);

Load a BAM index from a given file name.

Parameters

index Target data structure.
filename Path to file to load. Types: char const *

Returns

int The status code, 0 indicating success.