# Class BedRecord
Data structure for storing BED records.

Implements | FormattedFileRecordConcept
All Subcl's | Bed12Record, Bed3Record, Bed4Record, Bed5Record, Bed6Record
All Impl'd | AssignableConcept, CopyConstructibleConcept, DefaultConstructibleConcept, FormattedFileRecordConcept
Defined in | <seqan/bed_io.h>
Signature | `template <typename TSpec> class BedRecord;`

## Template Parameters

`TSpec` | The specialization to use. Default: `Bed12`.

## Member Function Overview

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

### Member Functions Inherited From AssignableConcept

- `operator=`

## Interface Function Overview

- `void clear(record);`
  Reset BED record to state after default initialization.

### Interface Functions Inherited From AssignableConcept

- `assign`
- `set`
- `move`

## Member Variable Overview

- `__int32 BedRecord::beginPosition`
  Begin position on the reference.
- `CharString BedRecord::data`
  Any data after the last position.
- `__int32 BedRecord::endPosition`
  End position on the reference.
- `__int32 BedRecord::INVALID_POS`
  Constant for invalid positions.
- `__int32 BedRecord::INVALID_REFID`
  Constant for invalid references.
- `CharString BedRecord::ref`
  Name of the interval's reference name.
- `__int32 BedRecord::rID`
  Numeric id of the interval's reference (`__int32`, defaults to `INVALID_REFID`).

## Detailed Description

BED files allow the easy representation of intervals on the genome. Originally, they were designed for tracks in the UCSC genome browser. The original format has 12 columns but often variants using fewer columns with interpreted data are used and the rest is kept as application dependent data.

The BedRecord class allows for storing BED records. The various subclasses provide access to 3, 4, 5, 6, or 12 fields of the BED format. For example, a `BedRecord<Bed>>` has members variables for the first 5 columns of a BED file. The remaining data is stored as the CharString member variable `data`.

### Remarks

The `ref` field is the name of the reference as loaded from the BED file. The `rID` field can be used to store a numeric reference id.

Note that while the BED file format is 1-based, the coordinates in the BedRecord are 0-based.

## Member Functions Detail

### `BedRecord::BedRecord();`

Constructor.

#### Data Races

Thread safety unknown!

## Interface Functions Detail

### `void clear(record);`

Reset BED record to state after default initialization.

#### Parameters

`record` | BedRecord to reset.

#### Data Races

Thread safety unknown!

## Member Variables Detail

### `__int32 BedRecord::beginPosition`

Begin position on the reference.

### `CharString BedRecord::data`

Any data after the last position.

### `__int32 BedRecord::endPosition`

End position on the reference.

### `__int32 BedRecord::INVALID_POS`

Constant for invalid positions.

### `__int32 BedRecord::INVALID_REFID`

Constant for invalid references.

### `CharString BedRecord::ref`

Name of the interval's reference name.

### `__int32 BedRecord::rID`

Numeric id of the interval's reference (`__int32`, defaults to `INVALID_REFID`).

#### Dox Sources

    /*!
     * @class BedRecord
     *
     * @implements FormattedFileRecordConcept
     *
     * @headerfile <seqan/bed_io.h>
     *
     * @brief Data structure for storing BED records.
     *
     * @signature template <typename TSpec> class BedRecord;
     *
     * @tparam TSpec The specialization to use. Default: <tt>Bed12</tt>.
     *
     * BED files allow the easy representation of intervals on the genome.
     * Originally, they were designed for tracks in the UCSC genome browser. The
     * original format has 12 columns but often variants using fewer columns with
     * interpreted data are used and the rest is kept as application dependent data.
     *
     * The BedRecord class allows for storing BED records. The various subclasses
     * provide access to 3, 4, 5, 6, or 12 fields of the BED format. For example, a
     * <tt>BedRecord&lt;Bed&gt;></tt> has members variables for the first 5 columns
     * of a BED file. The remaining data is stored as the @link CharString @endlink
     * member variable <tt>data</tt>.
     *
     * @section Remarks
     *
     * The <tt>ref</tt> field is the name of the reference as loaded from the BED
     * file. The <tt>rID</tt> field can be used to store a numeric reference id.
     *
     * Note that while the BED file format is 1-based, the coordinates in the
     * BedRecord are 0-based.
     *
     * @fn BedRecord::BedRecord
     *
     * @brief Constructor.
     *
     * @signature BedRecord::BedRecord();
     *
     * @var CharString BedRecord::ref;
     *
     * @brief Name of the interval's reference name.
     *
     * @var __int32 BedRecord::beginPosition;
     *
     * @brief Begin position on the reference.
     *
     * @var __int32 BedRecord::rID;
     *
     * @brief Numeric id of the interval's reference (<tt>__int32</tt>, defaults to
     *        <tt>INVALID_REFID</tt>).
     *
     * @var __int32 BedRecord::INVALID_REFID;
     *
     * @brief Constant for invalid references.
     *
     * @signature static const __int32 BedRecord::INVALID_REFID = -1;
     *
     * @var __int32 BedRecord::endPosition;
     *
     * @brief End position on the reference.
     *
     * @var __int32 BedRecord::INVALID_POS;
     *
     * @brief Constant for invalid positions.
     *
     * @signature static const __int32 BedRecord::INVALID_POS = -1;
     *
     * @var CharString BedRecord::data;
     *
     * @brief Any data after the last position.
     *
     * @fn BedRecord#clear
     *
     * @brief Reset BED record to state after default initialization.
     *
     * @signature void clear(record);
     *
     * @param[in,out] record BedRecord to reset.
     */