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

AMOS::Overlap_t Class Reference

An overlap relation between to sequencing reads. More...

#include <Overlap_AMOS.hh>

Inheritance diagram for AMOS::Overlap_t:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 Overlap_t ()
 Constructs an empty Overlap_t object.

 Overlap_t (const Overlap_t &source)
 Copy constructor.

 ~Overlap_t ()
 Destroys a Overlap_t object.

virtual void clear ()
 Clears all object data, reinitializes the object.

void flip ()
 Flip the orientation of the overlap.

OverlapAdjacency_t getAdjacency () const
 Get the overlapping ends of the reads.

Size_t getAhang () const
 Get the A-hang overlap value.

Size_t getBhang () const
 Get the B-hang overlap value.

virtual NCode_t getNCode () const
 Get the AMOS NCode type identifier.

std::pair< ID_t, ID_tgetReads () const
 Get the pair of contig IDs joined by this overlap.

virtual void readMessage (const Message_t &msg)
 Reads in data from a Message object.

void setAdjacency (OverlapAdjacency_t adj)
 Set the overlapping ends of the reads.

void setAhang (Size_t aHang)
 Set the A-hang overlap value.

void setBhang (Size_t bHang)
 Set the B-hang overlap value.

void setReads (std::pair< ID_t, ID_t > reads)
 Set the read ID pair for this overlap.

virtual void writeMessage (Message_t &msg) const
 Writes data to a Message object.


Static Public Methods

NCode_t NCode ()
 Get the AMOS NCode type identifier (statically).


Static Public Attributes

const OverlapAdjacency_t NULL_ADJACENCY = 0
const OverlapAdjacency_t NORMAL = 'N'
 E,B.

const OverlapAdjacency_t ANTINORMAL = 'A'
 B,E.

const OverlapAdjacency_t INNIE = 'I'
 E,E.

const OverlapAdjacency_t OUTIE = 'O'
 B,B.


Protected Methods

virtual void readRecord (std::istream &fix, std::istream &var)
 Read selected class members from a biserial record.

virtual Size_t sizeVar () const
 Returns the current size of the variable length record.

virtual void writeRecord (std::ostream &fix, std::ostream &var) const
 Write selected class members to a biserial record.


Static Protected Attributes

const uint8_t FIRST_BIT = 0x1
 adjacency info for 1st read

const uint8_t SECOND_BIT = 0x2
 adjacency info for 2nd read


Detailed Description

An overlap relation between to sequencing reads.

A similarity based overlap between two Read_t that suggests their relative location (to one another) in the original sequence.


Constructor & Destructor Documentation

AMOS::Overlap_t::Overlap_t   [inline]
 

Constructs an empty Overlap_t object.

Sets all members to 0

AMOS::Overlap_t::Overlap_t const Overlap_t &    source [inline]
 

Copy constructor.

AMOS::Overlap_t::~Overlap_t   [inline]
 

Destroys a Overlap_t object.


Member Function Documentation

virtual void AMOS::Overlap_t::clear   [inline, virtual]
 

Clears all object data, reinitializes the object.

Reimplemented from AMOS::Universal_t.

void AMOS::Overlap_t::flip   [inline]
 

Flip the orientation of the overlap.

Reverses the order of the read IDs and changes the overlap adjacency as altered by the new orientation of the reads. Does not alter adjacency if it is currently a NULL_ADJACENCY. Also, swaps the a/bHang values. After flip, NORMAL becomes ANTINORMAL, ANTINORMAL becomes NORMAL, and INNIE and OUTIE remain the same.

Returns:
void

OverlapAdjacency_t Overlap_t::getAdjacency   const
 

Get the overlapping ends of the reads.

Get the overlap information for the reads, i.e. [N]ORMAL (EB), [A]NTINORMAL (BE), [I]NNIE (EE) or [O]UTIE (BB). Where B is the beginning of the read and E is the end of the read and [N]ORMAL means the end of read1 overlaps the beginning of read2.

Returns:
The pair of adjacent ends

Size_t AMOS::Overlap_t::getAhang   const [inline]
 

Get the A-hang overlap value.

Get the length of the non-overlapping portion of the first read.

Returns:
The A-hang overlap value

Size_t AMOS::Overlap_t::getBhang   const [inline]
 

Get the B-hang overlap value.

Get the length of the non-overlapping portion of the second read.

Returns:
The B-hang overlap value

virtual NCode_t AMOS::Overlap_t::getNCode   const [inline, virtual]
 

Get the AMOS NCode type identifier.

Returns:
The AMOS NCode type identifier

Reimplemented from AMOS::Universal_t.

std::pair<ID_t, ID_t> AMOS::Overlap_t::getReads   const [inline]
 

Get the pair of contig IDs joined by this overlap.

Returns:
The first and second read IDs joined by this overlap

NCode_t AMOS::Overlap_t::NCode   [inline, static]
 

Get the AMOS NCode type identifier (statically).

Can be used for constructing a Bank with a certain NCode. e.g. 'Bank_t (Overlap_t::NCode( ))'

Returns:
The AMOS NCode type identifier

Reimplemented from AMOS::Universal_t.

void Overlap_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

Reimplemented from AMOS::Universal_t.

void Overlap_t::readRecord std::istream &    fix,
std::istream &    var
[protected, virtual]
 

Read selected class members from a biserial record.

Reads the fixed and variable length streams from a biserial record and initializes the class members to the values stored within. Used in translating a biserial IBankable object, and needed to retrieve objects from a Bank.

Note:
This method must be able to interpret the biserial record produced by its related function writeRecord.
Parameters:
fix The fixed length stream (stores all fixed length members)
var The variable length stream (stores all var length members)
Precondition:
The get pointer of fix is at the beginning of the record

The get pointer of var is at the beginning of the record

Returns:
void

Reimplemented from AMOS::Universal_t.

void Overlap_t::setAdjacency OverlapAdjacency_t    adj
 

Set the overlapping ends of the reads.

Set the overlap information for the reads, i.e. [N]ORMAL (EB), [A]NTINORMAL (BE), [I]NNIE (EE) or [O]UTIE (BB). Where B is the beginning of the read and E is the end of the read and EB would mean the end of read1 overlaps the beginning of read2.

Note:
Will store info in extra portion of BankableFlags
Parameters:
adj The new adjacency of the reads
Precondition:
adj must be one of [NAIO]
Exceptions:
ArgumentException_t 
Returns:
void

void AMOS::Overlap_t::setAhang Size_t    aHang [inline]
 

Set the A-hang overlap value.

Set the length of the non-overlapping portion of the first read.

Parameters:
aHang The new A-hang overlap value
Returns:
The new A-hang overlap value

void AMOS::Overlap_t::setBhang Size_t    bHang [inline]
 

Set the B-hang overlap value.

Set the length of the non-overlapping portion of the second read.

Parameters:
bHang The new B-hang overlap value
Returns:
The new B-hang overlap value

void AMOS::Overlap_t::setReads std::pair< ID_t, ID_t   reads [inline]
 

Set the read ID pair for this overlap.

Parameters:
reads The new pair of read IDs

Size_t Overlap_t::sizeVar   const [protected, virtual]
 

Returns the current size of the variable length record.

Returns:
Size of the variable length record (var stream)

Reimplemented from AMOS::Universal_t.

void Overlap_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

Reimplemented from AMOS::Universal_t.

void Overlap_t::writeRecord std::ostream &    fix,
std::ostream &    var
const [protected, virtual]
 

Write selected class members to a biserial record.

Writes the fixed and variable length streams to a biserial record. Used in generating a biserial IBankable object, and needed to commit objects to a Bank. Will only write to the ready streams, but the size of the record will always be returned. Does not write the flags and IID of the object because the Bank will handle the storage of these fields on its own.

Note:
This method must be able to produce a biserial record that can be read by its related funtion readRecord.
Parameters:
fix The fixed length stream (stores all fixed length members)
var The variable length stream (stores all var length members)
Returns:
void

Reimplemented from AMOS::Universal_t.


Member Data Documentation

const OverlapAdjacency_t AMOS::Overlap_t::ANTINORMAL = 'A' [static]
 

B,E.

const uint8_t AMOS::Overlap_t::FIRST_BIT = 0x1 [static, protected]
 

adjacency info for 1st read

const OverlapAdjacency_t AMOS::Overlap_t::INNIE = 'I' [static]
 

E,E.

const OverlapAdjacency_t AMOS::Overlap_t::NORMAL = 'N' [static]
 

E,B.

const OverlapAdjacency_t AMOS::Overlap_t::NULL_ADJACENCY = 0 [static]
 

const OverlapAdjacency_t AMOS::Overlap_t::OUTIE = 'O' [static]
 

B,B.

const uint8_t AMOS::Overlap_t::SECOND_BIT = 0x2 [static, protected]
 

adjacency info for 2nd read


The documentation for this class was generated from the following files:
Generated on Mon Apr 26 14:42:21 2004 for AMOS by doxygen1.3-rc2