# Class TabixIndex
Access to Tabix indexed files.

Defined in | <seqan/tabix_io.h>
Signature | `class TabixIndex;`

## Member Function Overview

- `TabixIndex::TabixIndex();`
  Constructor.

## Interface Function Overview

- `uint64_t getUnalignedCount(index);`
  Query index for number of unaligned reads.
- `bool jumpToRegion(fileIn, hasEntries, refName, posBeg, posEnd, index[, firstMatch]);`
  Seek in a tab-separated genome related file using a Tabix index.
- `bool open(index, filename);`
  Load a Tabix index from file.

## Member Functions Detail

### `TabixIndex::TabixIndex();`

Constructor.

#### Remarks

Only the default constructor is provided.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

## Interface Functions Detail

### `uint64_t getUnalignedCount(index);`

Query index for number of unaligned reads.

#### Parameters

`index` | Index to query.

#### Returns

`uint64_t` | The number of unaligned reads.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `bool jumpToRegion(fileIn, hasEntries, refName, posBeg, posEnd, index[, firstMatch]);`

Seek in a tab-separated genome related file using a Tabix index.

#### Parameters

`fileIn` | The VcfFileIn, GffFileIn, or BedFileIn to jump with.
`hasEntries` | A `bool` that is set true if the region `[posBeg, posEnd)` has any entries.
`refName` | The reference name to jump to.
`posBeg` | The begin of the region to jump to (`int32_t`).
`posEnd` | The end of the region to jump to (`int32_t`).
`index` | The TabixIndex to use for the jumping.
`firstMatch` | A `bool`, if `true` (default) this function seeks to the first overlapping record. Otherwise, the function potentially stops before the first overlapping record.

#### Returns

`bool` | true if seeking was successful, false if not.

You provide a region `[posBeg, posEnd)` on the contig `refName` that you want to jump to and the function jumps to the first entry in this region, if any.

#### Remarks

This function fails if `refName`/`pos` wasn't found.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `bool open(index, filename);`

Load a Tabix index from file.

#### Parameters

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

#### Returns

`bool` | Returns `true` on success, false otherwise.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

#### Dox Sources

    /*!
     * @class TabixIndex
     *
     * @headerfile <seqan/tabix_io.h>
     *
     * @brief Access to Tabix indexed files.
     *
     * @signature class TabixIndex;
     *
     * @fn TabixIndex::TabixIndex
     *
     * @brief Constructor.
     *
     * @signature TabixIndex::TabixIndex();
     *
     * @section Remarks
     *
     * Only the default constructor is provided.
     *
     * @fn TabixIndex#jumpToRegion
     *
     * @brief Seek in a tab-separated genome related file using a Tabix index.
     *
     * @signature bool jumpToRegion(fileIn, hasEntries, refName, posBeg, posEnd,
     *            index[, firstMatch]);
     *
     * @param[in,out] fileIn The @link VcfFileIn @endlink, @link GffFileIn @endlink,
     *                       or @link BedFileIn @endlink to jump with.
     * @param[out] hasEntries A <tt>bool</tt> that is set true if the region
     *                        <tt>[posBeg, posEnd)</tt> has any entries.
     * @param[in] refName The reference name to jump to.
     * @param[in] posBeg The begin of the region to jump to (<tt>int32_t</tt>).
     * @param[in] posEnd The end of the region to jump to (<tt>int32_t</tt>).
     * @param[in] index The @link TabixIndex @endlink to use for the jumping.
     * @param[in] firstMatch A <tt>bool</tt>, if <tt>true</tt> (default) this
     *                       function seeks to the first overlapping record.
     *                       Otherwise, the function potentially stops before the
     *                       first overlapping record.
     *
     * @return bool true if seeking was successful, false if not.
     *
     * You provide a region <tt>[posBeg, posEnd)</tt> on the contig <tt>refName</tt>
     * that you want to jump to and the function jumps to the first entry in this
     * region, if any.
     *
     * @section Remarks
     *
     * This function fails if <tt>refName</tt>/<tt>pos</tt> wasn't found.
     *
     * @fn TabixIndex#getUnalignedCount
     *
     * @brief Query index for number of unaligned reads.
     *
     * @signature uint64_t getUnalignedCount(index);
     *
     * @param[in] index Index to query.
     *
     * @return uint64_t The number of unaligned reads.
     *
     * @fn TabixIndex#open
     *
     * @brief Load a Tabix index from file.
     *
     * @signature bool open(index, filename);
     *
     * @param[in,out] index Target data structure.
     * @param[in] filename Path to file to load. Types: char const *
     *
     * @return bool Returns <tt>true</tt> on success, false otherwise.
     */