# Class AlignedReadStoreElement
Represents an alignment of a read to a contig.

Defined in | <seqan/store.h>
Signature | `template <typename TPos, typename TGapAnchors[, typename TSpec]> struct AlignedReadStoreElement;`

## Template Parameters

`TPos` | The position type to use.
`TGapAnchors` | Type of a read GapAnchor.
`TSpec` | The specializing type. Default: `void`.

## Member Function Overview

- `AlignedReadStoreElement::AlignedReadStoreElement();, AlignedReadStoreElement::AlignedReadStoreElement(id, readId, contigId, beginPos, endPos[, gaps]);`
  Constructor.

## Member Typedef Overview

- `typedef (..) TAlignedReadStoreElement::TGapAnchors;`
  Type of the gaps member.
- `typedef (..) TAlignedReadStoreElement::TId;`
  Type of all store ids.
- `typedef (..) TAlignedReadStoreElement::TPos;`
  Type of the beginPos and endPos.
- `typedef (..) TAlignedReadStoreElement::TSpec;`
  The specializing type.

## Member Variable Overview

- `TPos AlignedReadStoreElement::beginPos`
  Begin position in gap-space.
- `TId AlignedReadStoreElement::contigId`
  Refers to the contig in the contigStore that the read is aligned with.
- `TPos AlignedReadStoreElement::endPos`
  End position in gap-space.
- `TGaps AlignedReadStoreElement::gaps`
  String of read GapAnchor objects. Can be used to create a AnchorGaps alignment row.
- `TId AlignedReadStoreElement::id`
  The alignment id refers to associated alignment information in alignQualityStore or alignedReadTagStore.
- `TId AlignedReadStoreElement::INVALID_ID`
  Constant expression that is the value of an invalid id.
- `TId AlignedReadStoreElement::pairMatchId`
  Two read alignments having the same pairMatchId form a valid pair match. If it equals `INVALID_ID` then the read is either not paired or could not be aligned as part of a pair.
- `TId AlignedReadStoreElement::readId`
  Refers to the aligned read in readStore.

## Detailed Description

Value type of the alignedReadStore. In contrast to all other FragmentStore stores, the id of an aligned read is explicitely stored as a member to allow for reordering the alignedReadStore and still recover the id.

## Member Functions Detail

### `AlignedReadStoreElement::AlignedReadStoreElement(); AlignedReadStoreElement::AlignedReadStoreElement(id, readId, contigId, beginPos, endPos[, gaps]);`

Constructor.

#### Parameters

`id` | The alignment id refers to associated alignment information in alignQualityStore or alignedReadTagStore.
`readId` | Refers to the aligned read in the readStore.
`contigID` | Refers to the contig in the contigStore the read is aligned to.
`beginPos` | Begin position of the alignment in gap-space.
`endPos` | End position of the alignment in gap-space.
`gaps` | A String of GapAnchor objects.

The default constructors sets all ids to `AlignedReadStoreElement::INVALID_ID` and beginPos and endPos to 0.

#### Data Races

Thread safety unknown!

## Member Typedef Detail

### `typedef (..) TAlignedReadStoreElement::TGapAnchors;`

Type of the gaps member.

### `typedef (..) TAlignedReadStoreElement::TId;`

Type of all store ids.

`TId` is the result of `Id≶AlignedReadStoreElement&lgt;> >::Type`, see Id.

### `typedef (..) TAlignedReadStoreElement::TPos;`

Type of the beginPos and endPos.

### `typedef (..) TAlignedReadStoreElement::TSpec;`

The specializing type.

## Member Variables Detail

### `TPos AlignedReadStoreElement::beginPos`

Begin position in gap-space.

If beginPos < endPos then the read is aligned to the reverse strand where beginPos and endPos are the corresponding positions on the forward strand.

### `TId AlignedReadStoreElement::contigId`

Refers to the contig in the contigStore that the read is aligned with.

### `TPos AlignedReadStoreElement::endPos`

End position in gap-space.

If beginPos < endPos then the read is aligned to the reverse strand where beginPos and endPos are the corresponding positions on the forward strand.

### `TGaps AlignedReadStoreElement::gaps`

String of read GapAnchor objects. Can be used to create a AnchorGaps alignment row.

### `TId AlignedReadStoreElement::id`

The alignment id refers to associated alignment information in alignQualityStore or alignedReadTagStore.

### `TId AlignedReadStoreElement::INVALID_ID`

Constant expression that is the value of an invalid id.

### `TId AlignedReadStoreElement::pairMatchId`

Two read alignments having the same pairMatchId form a valid pair match. If it equals `INVALID_ID` then the read is either not paired or could not be aligned as part of a pair.

### `TId AlignedReadStoreElement::readId`

Refers to the aligned read in readStore.

#### Dox Sources

    /*!
     * @class AlignedReadStoreElement
     *
     * @headerfile <seqan/store.h>
     *
     * @brief Represents an alignment of a read to a contig.
     *
     * @signature template <typename TPos, typename TGapAnchors[, typename TSpec]>
     *            struct AlignedReadStoreElement;
     *
     * @tparam TPos The position type to use.
     * @tparam TGapAnchors Type of a read @link GapAnchor @endlink.
     * @tparam TSpec The specializing type. Default: <tt>void</tt>.
     *
     * Value type of the @link FragmentStore::alignedReadStore @endlink. In contrast
     * to all other @link FragmentStore @endlink stores, the @link
     * AlignedReadStoreElement::id @endlink of an aligned read is explicitely stored
     * as a member to allow for reordering the @link FragmentStore::alignedReadStore
     * @endlink and still recover the id.
     *
     * @fn AlignedReadStoreElement::AlignedReadStoreElement
     *
     * @brief Constructor.
     *
     * @signature AlignedReadStoreElement::AlignedReadStoreElement();
     * @signature AlignedReadStoreElement::AlignedReadStoreElement(id, readId,
     *            contigId, beginPos, endPos[, gaps]);
     *
     * @param[in] id The alignment id refers to associated alignment information in
     *               @link FragmentStore::alignQualityStore @endlink or @link
     *               FragmentStore::alignedReadTagStore @endlink.
     * @param[in] readId Refers to the aligned read in the @link
     *                   FragmentStore::readStore @endlink.
     * @param[in] contigID Refers to the contig in the @link
     *                     FragmentStore::contigStore @endlink the read is aligned
     *                     to.
     * @param[in] beginPos Begin position of the alignment in gap-space.
     * @param[in] endPos End position of the alignment in gap-space.
     * @param[in] gaps A @link String @endlink of @link GapAnchor @endlink objects.
     *
     * The default constructors sets all ids to
     * <tt>AlignedReadStoreElement::INVALID_ID</tt> and @link
     * AlignedReadStoreElement::beginPos @endlink and @link
     * AlignedReadStoreElement::endPos @endlink to 0.
     *
     * @typedef AlignedReadStoreElement::TId
     *
     * @brief Type of all store ids.
     *
     * @signature typedef (..) TAlignedReadStoreElement::TId;
     *
     * <tt>TId</tt> is the result of <tt>Id&lg;AlignedReadStoreElement&lgt;&gt;
     * &gt;::Type</tt>, see @link Id @endlink.
     *
     * @typedef AlignedReadStoreElement::TPos
     *
     * @brief Type of the @link AlignedReadStoreElement::beginPos @endlink and @link
     *        AlignedReadStoreElement::endPos @endlink.
     *
     * @signature typedef (..) TAlignedReadStoreElement::TPos;
     *
     * @typedef AlignedReadStoreElement::TGapAnchors
     *
     * @brief Type of the @link AlignedReadStoreElement::gaps @endlink member.
     *
     * @signature typedef (..) TAlignedReadStoreElement::TGapAnchors;
     *
     * @typedef AlignedReadStoreElement::TSpec
     *
     * @brief The specializing type.
     *
     * @signature typedef (..) TAlignedReadStoreElement::TSpec;
     *
     * @var TId AlignedReadStoreElement::INVALID_ID;
     *
     * @brief Constant expression that is the value of an invalid id.
     *
     * @var TId AlignedReadStoreElement::id;
     *
     * @brief The alignment id refers to associated alignment information in @link
     *        FragmentStore::alignQualityStore @endlink or @link
     *        FragmentStore::alignedReadTagStore @endlink.
     *
     * @var TId AlignedReadStoreElement::readId;
     *
     * @brief Refers to the aligned read in @link FragmentStore::readStore @endlink.
     *
     * @var TId AlignedReadStoreElement::contigId;
     *
     * @brief Refers to the contig in the @link FragmentStore::contigStore @endlink
     *        that the read is aligned with.
     *
     * @var TId AlignedReadStoreElement::pairMatchId;
     *
     * @brief Two read alignments having the same pairMatchId form a valid pair
     *        match. If it equals <tt>INVALID_ID</tt> then the read is either not
     *        paired or could not be aligned as part of a pair.
     *
     * @var TPos AlignedReadStoreElement::beginPos;
     *
     * @brief Begin position in gap-space.
     *
     * If beginPos &lt; endPos then the read is aligned to the reverse strand where
     * beginPos and endPos are the corresponding positions on the forward strand.
     *
     * @var TPos AlignedReadStoreElement::endPos;
     *
     * @brief End position in gap-space.
     *
     * If beginPos &lt; endPos then the read is aligned to the reverse strand where
     * beginPos and endPos are the corresponding positions on the forward strand.
     *
     * @var TGaps AlignedReadStoreElement::gaps;
     *
     * @brief String of read @link GapAnchor @endlink objects. Can be used to create
     *        a @link AnchorGaps @endlink alignment row.
     */