#include <datatypes_AMOS.hh>
Inheritance diagram for AMOS::Tile_t:
Public Member Functions | |
| Tile_t () | |
| Constructs an empty Tile_t object. | |
| ~Tile_t () | |
| Destroys a Tile_t object. | |
| void | clear () |
| Clears all object data, reinitializes the object. | |
| Size_t | getGappedLength () const |
| Gets the gapped length of the tile. | |
| virtual NCode_t | getNCode () const |
| Get the AMOS NCode type identifier. | |
| Pos_t | getRightOffset () const |
| Gets the exact right offset of the tile. | |
| virtual void | readMessage (const Message_t &msg) |
| Reads in data from a Message object. | |
| void | readRecord (std::istream &in) |
| Read a binary record. | |
| virtual void | writeMessage (Message_t &msg) const |
| Writes data to a Message object. | |
| void | writeRecord (std::ostream &out) const |
| Write a binary record. | |
Public Attributes | |
| ID_t | source |
| the source of the tile, e.g. read IID | |
| std::vector< Pos_t > | gaps |
| the absolute gap positions | |
| Pos_t | offset |
| the offset of the tile | |
| Range_t | range |
| the usable range of the tile | |
Static Public Attributes | |
| static const NCode_t | NCODE = M_TILE |
| The NCode type identifier for this object. | |
A tiled sequence, like a read in a contig, or a contig in a scaffold. For explanation purposes, let us assume we are dealing with an underlying read in a contig. The id is the IID of the read. The gaps are the alignment gaps in the read, stored as a list of gap positions. How these positions are stored relative to the parent contig is left to the user. Commonly, each gap integer is simply the gap location in the read. Thus, two adjacent gaps would share the same value. The offset is the offset of the beginning on the read in the contig, thus an offset of 0 would signify a read beginning at the very start of the contig. Finally, the range is the portion of the read that has been aligned to the contig, with the range order also specifying the orientation of the read relative to the contig, i.e. if the beginning of the range is greater than the end of the range the read is reversed relative to the forward strand of the contig.
Definition at line 301 of file datatypes_AMOS.hh.
| AMOS::Tile_t::Tile_t | ( | ) | [inline] |
Constructs an empty Tile_t object.
Sets id to NULL_ID, offset to 0
Definition at line 318 of file datatypes_AMOS.hh.
References AMOS::NULL_ID, offset, and source.
| AMOS::Tile_t::~Tile_t | ( | ) | [inline] |
| void Tile_t::clear | ( | ) |
Clears all object data, reinitializes the object.
Definition at line 99 of file datatypes_AMOS.cc.
References gaps, AMOS::NULL_ID, offset, range, and source.
Referenced by readMessage(), and writeMessage().
| Size_t AMOS::Tile_t::getGappedLength | ( | ) | const [inline] |
Gets the gapped length of the tile.
(range . getLength( ) + gaps . size( ))
Definition at line 347 of file datatypes_AMOS.hh.
Referenced by AMOS::TileOrderCmp::operator()(), and AMOS::TiledRead_t::TiledRead_t().
| virtual NCode_t AMOS::Tile_t::getNCode | ( | ) | const [inline, virtual] |
Get the AMOS NCode type identifier.
Implements AMOS::IMessagable_t.
Definition at line 354 of file datatypes_AMOS.hh.
References NCODE.
Referenced by writeMessage().
| Pos_t AMOS::Tile_t::getRightOffset | ( | ) | const [inline] |
Gets the exact right offset of the tile.
offset + (range . getLength( ) + gaps . size( )) - 1
Definition at line 368 of file datatypes_AMOS.hh.
References gaps, AMOS::Range_t::getLength(), offset, and range.
| void Tile_t::readMessage | ( | const Message_t & | msg | ) | [virtual] |
Reads in data from a Message object.
Reads the data contained in a Message object and stores it in the Messagable object. Will not complain if incoming message is of the wrong type, will only try and suck out the fields it recognizes. All previous data in the Messagable object will be cleared or overwritten.
| msg | The Message to read from |
| ArgumentException_t |
Implements AMOS::IMessagable_t.
Definition at line 109 of file datatypes_AMOS.cc.
References AMOS_THROW_ARGUMENT, clear(), AMOS::F_CLEAR, AMOS::F_GAPS, AMOS::F_OFFSET, AMOS::F_SOURCE, gaps, offset, range, and source.
| void AMOS::Tile_t::readRecord | ( | std::istream & | in | ) |
Read a binary record.
| void Tile_t::writeMessage | ( | Message_t & | msg | ) | const [virtual] |
Writes data to a Message object.
Writes the data contained in a Messagable object to a Message object. All previous data in the Message will be cleared or overwritten.
| msg | The Message to write to |
Implements AMOS::IMessagable_t.
Definition at line 187 of file datatypes_AMOS.cc.
References clear(), AMOS::F_CLEAR, AMOS::F_GAPS, AMOS::F_OFFSET, AMOS::F_SOURCE, gaps, getNCode(), AMOS::NULL_ID, AMOS::NULL_STRING, offset, range, and source.
| void AMOS::Tile_t::writeRecord | ( | std::ostream & | out | ) | const |
Write a binary record.
| std::vector<Pos_t> AMOS::Tile_t::gaps |
the absolute gap positions
Definition at line 304 of file datatypes_AMOS.hh.
Referenced by clear(), getGappedLength(), getRightOffset(), readMessage(), AMOS::TiledRead_t::TiledRead_t(), and writeMessage().
const NCode_t Tile_t::NCODE = M_TILE [static] |
The NCode type identifier for this object.
Definition at line 310 of file datatypes_AMOS.hh.
Referenced by getNCode().
the offset of the tile
Definition at line 305 of file datatypes_AMOS.hh.
Referenced by clear(), getRightOffset(), AMOS::TileOrderCmp::operator()(), readMessage(), Tile_t(), AMOS::TiledRead_t::TiledRead_t(), and writeMessage().
the usable range of the tile
Definition at line 306 of file datatypes_AMOS.hh.
Referenced by clear(), getGappedLength(), getRightOffset(), readMessage(), AMOS::TiledRead_t::TiledRead_t(), and writeMessage().
the source of the tile, e.g. read IID
Definition at line 303 of file datatypes_AMOS.hh.
Referenced by clear(), AMOS::TileOrderCmp::operator()(), readMessage(), Tile_t(), and writeMessage().
1.4.7