Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AMOS::Tile_t Struct Reference

A singe sequence's location and orientation in a larger sequence. More...

#include <datatypes_AMOS.hh>

Inheritance diagram for AMOS::Tile_t:

Inheritance graph
[legend]
Collaboration diagram for AMOS::Tile_t:

Collaboration graph
[legend]
List of all members.

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 ()
 Gets the gapped length of the tile.
virtual NCode_t getNCode () const
 Get the AMOS NCode type identifier.
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_tgaps
 the absolute gap positions
Pos_t offset
 the offset of the tile
Range_t range
 the usable range of the tile

Static Public Attributes

const NCode_t NCODE = M_TILE
 The NCode type identifier for this object.

Detailed Description

A singe sequence's location and orientation in a larger sequence.

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.


Constructor & Destructor Documentation

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]
 

Destroys a Tile_t object.

Definition at line 328 of file datatypes_AMOS.hh.


Member Function Documentation

void Tile_t::clear  ) 
 

Clears all object data, reinitializes the object.

Definition at line 105 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  )  [inline]
 

Gets the gapped length of the tile.

(range . getLength( ) + gaps . size( ))

Returns:
The gapped length of the tile
Definition at line 347 of file datatypes_AMOS.hh.

References gaps, range, and AMOS::Size_t.

virtual NCode_t AMOS::Tile_t::getNCode  )  const [inline, virtual]
 

Get the AMOS NCode type identifier.

Returns:
The AMOS NCode type identifier

Implements AMOS::IMessagable_t.

Definition at line 354 of file datatypes_AMOS.hh.

References AMOS::NCode_t.

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.

Parameters:
msg The Message to read from
Precondition:
The expected fields are formatted properly
Exceptions:
ArgumentException_t 
Returns:
void

Implements AMOS::IMessagable_t.

Definition at line 115 of file datatypes_AMOS.cc.

References AMOS_THROW_ARGUMENT, clear(), AMOS::F_CLEAR, AMOS::F_GAPS, AMOS::F_OFFSET, AMOS::F_SOURCE, gaps, offset, AMOS::Pos_t, range, and source.

void Tile_t::readRecord std::istream &  in  ) 
 

Read a binary record.

Definition at line 177 of file datatypes_AMOS.cc.

References gaps, offset, AMOS::Pos_t, range, AMOS::readLE(), AMOS::Size_t, and source.

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.

Parameters:
msg The Message to write to
Returns:
void

Implements AMOS::IMessagable_t.

Definition at line 193 of file datatypes_AMOS.cc.

References clear(), AMOS::F_CLEAR, AMOS::F_GAPS, AMOS::F_OFFSET, AMOS::F_SOURCE, gaps, AMOS::NULL_ID, AMOS::NULL_STRING, offset, range, and source.

void Tile_t::writeRecord std::ostream &  out  )  const
 

Write a binary record.

Definition at line 235 of file datatypes_AMOS.cc.

References gaps, offset, AMOS::Pos_t, range, AMOS::Size_t, source, and AMOS::writeLE().


Member Data Documentation

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(), readMessage(), readRecord(), writeMessage(), and writeRecord().

const NCode_t Tile_t::NCODE = M_TILE [static]
 

The NCode type identifier for this object.

Definition at line 101 of file datatypes_AMOS.cc.

Pos_t AMOS::Tile_t::offset
 

the offset of the tile

Definition at line 305 of file datatypes_AMOS.hh.

Referenced by clear(), readMessage(), readRecord(), Tile_t(), writeMessage(), and writeRecord().

Range_t AMOS::Tile_t::range
 

the usable range of the tile

Definition at line 306 of file datatypes_AMOS.hh.

Referenced by clear(), getGappedLength(), readMessage(), readRecord(), writeMessage(), and writeRecord().

ID_t AMOS::Tile_t::source
 

the source of the tile, e.g. read IID

Definition at line 303 of file datatypes_AMOS.hh.

Referenced by clear(), readMessage(), readRecord(), Tile_t(), writeMessage(), and writeRecord().


The documentation for this struct was generated from the following files:
Generated on Tue May 17 15:19:44 2005 for libAMOS by doxygen 1.3.8