# Class AlignedReadLayout
Stores a two dimensional visible layout of a multi-read alignment.

Defined in | <seqan/store.h>
Signature | `struct AlignedReadLayout;`

## Interface Function Overview

- `void layoutAlignment(layout, store);`
  Calculates a visible layout of aligned reads.
- `void printAlignment(stream, layout, store, contigID, posBegin, posEnd, lineBegin, lineEnd);`
  Prints a window of the visible layout of reads into a std::outstream.

## Member Variable Overview

- `TContigRows AlignedReadLayout::contigRows`
  2D multi-read layout.

## Interface Functions Detail

### `void layoutAlignment(layout, store);`

Calculates a visible layout of aligned reads.

#### Parameters

`layout` | The resulting layout structure.
`store` | The FragmentStore.

For each contig, thisf unction layouts all reads in rows from up to down reusing empty row spaces.

#### Data Races

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

#### See Also

- printAlignment

### `void printAlignment(stream, layout, store, contigID, posBegin, posEnd, lineBegin, lineEnd);`

Prints a window of the visible layout of reads into a std::outstream.

#### Parameters

`stream` | The std::ostream to print to.
`layout` | The AlignedReadLayout computed earlier in layoutAlignment.
`store` | The FragmentStore that this layout belongs to.
`contigID` | The id of the contig for the alignments to print.
`posBegin` | The begin position of the window.
`posEnd` | The end position of the window.
`lineBegin` | The first line of the window.
`lineEnd` | The end line of the window.

The window coordinates (beginPos, ...) may be chosen bigger than the lyaout is. The empty space is then filled with spaces.

#### Data Races

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

## Member Variables Detail

### `TContigRows AlignedReadLayout::contigRows`

2D multi-read layout.

Stores for a contig and row the ids of aligned reads from left to right. `contigRows[contigId][row]` stores the alignId of all aligned reads from left to right assigned to the same row. `row` is the row of the alignment in the multiple sequence alignment and contigId the id of the reference contig.

#### Dox Sources

    /*!
     * @class AlignedReadLayout
     *
     * @headerfile <seqan/store.h>
     *
     * @brief Stores a two dimensional visible layout of a multi-read alignment.
     *
     * @signature struct AlignedReadLayout;
     *
     * @var TContigRows AlignedReadLayout::contigRows;
     *
     * @brief 2D multi-read layout.
     *
     * Stores for a contig and row the ids of aligned reads from left to right.
     * <tt>contigRows[contigId][row]</tt> stores the alignId of all aligned reads
     * from left to right assigned to the same row. <tt>row</tt> is the row of the
     * alignment in the multiple sequence alignment and contigId the id of the
     * reference contig.
     *
     * @fn AlignedReadLayout#layoutAlignment
     *
     * @brief Calculates a visible layout of aligned reads.
     *
     * @signature void layoutAlignment(layout, store);
     *
     * @param[out] layout The resulting layout structure.
     * @param[in] store The FragmentStore.
     *
     * For each contig, thisf unction layouts all reads in rows from up to down
     * reusing empty row spaces.
     *
     * @see AlignedReadLayout#printAlignment
     *
     * @fn AlignedReadLayout#printAlignment
     *
     * @brief Prints a window of the visible layout of reads into a std::outstream.
     *
     * @signature void printAlignment(stream, layout, store, contigID, posBegin,
     *            posEnd, lineBegin, lineEnd);
     *
     * @param[in,out] stream The std::ostream to print to.
     * @param[in] layout The @link AlignedReadLayout @endlink computed earlier in
     *                   @link AlignedReadLayout#layoutAlignment @endlink.
     * @param[in] store The FragmentStore that this layout belongs to.
     * @param[in] contigID The id of the contig for the alignments to print.
     * @param[in] posBegin The begin position of the window.
     * @param[in] posEnd The end position of the window.
     * @param[in] lineBegin The first line of the window.
     * @param[in] lineEnd The end line of the window.
     *
     * The window coordinates (beginPos, ...) may be chosen bigger than the lyaout
     * is. The empty space is then filled with spaces.
     */