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

AMOS::Read_t Class Reference

A DNA sequencing read. More...

#include <Read_AMOS.hh>

Inheritance diagram for AMOS::Read_t:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Read_t ()
 Constructs an empty Read_t object.
 Read_t (const Read_t &source)
 Copy constructor.
 ~Read_t ()
 Destroys a Read_t object.
virtual void clear ()
 Clears all object data, reinitializes the object.
const std::vector< int16_t > & getBasePositions () const
 Get the base call positions.
std::vector< int16_t > & getBasePositions ()
 Get the base call positions.
Range_t getClearRange ()
 Get the generic clear range.
ID_t getFragment () const
 Get the parent fragment IID.
Pos_t getFragmentPosition ()
 Get the approximate position on the parent fragment.
virtual NCode_t getNCode () const
 Get the AMOS NCode type identifier.
Range_t getQualityClearRange ()
 Get the quality score clear range.
ReadType_t getType () const
 Get the type of read.
Range_t getVectorClearRange ()
 Get the vector sequence clear range.
virtual void readMessage (const Message_t &msg)
 Reads in data from a Message object.
void setBasePositions (const std::vector< int16_t > &bcp)
 Set the base call positions.
void setClearRange (Range_t clear)
 Set the generic clear range.
void setFragment (ID_t frag)
 Set the parent fragment IID.
void setFragmentPosition (Pos_t pos)
 Set the approximate position on the parent fragment.
void setQualityClearRange (Range_t qclear)
 Set the quality score clear range.
void setType (ReadType_t type)
 Set the type of read.
void setVectorClearRange (Range_t vclear)
 Set the vector sequence clear range.
virtual void writeMessage (Message_t &msg) const
 Writes data to a Message object.
void compress ()
 Compress the internal representation of this sequence.
void uncompress ()
 Uncompress the internal representation of this sequence.
std::pair< char, char > getBase (Pos_t index) const
 Get a single base and its quality score.
Size_t getLength () const
 Get the length of the sequence.
std::string getQualString () const
 Get the quality score string.
std::string getQualString (Range_t range) const
 Get a quality score substring.
std::string getSeqString () const
 Get the sequence base string.
std::string getSeqString (Range_t range) const
 Get a sequence base substring.
bool isCompressed () const
 Checks if the sequence data is compressed.
void setBase (char seqchar, char qualchar, Pos_t index)
 Set a sequence base and its quality score.
void setSequence (const char *seq, const char *qual)
 Set the entire sequence.
void setSequence (const std::string &seq, const std::string &qual)
 Set the entire sequence.
const std::string & getComment () const
 Get the comment string.
const Status_t getStatus () const
 Get the status value.
void setComment (const std::string &comment)
 Set the comment string.
void setStatus (Status_t status)
 Set the status value.
const std::string & getEID () const
 Get the external ID.
ID_t getIID () const
 Get the internal ID.
bool isRemoved () const
 Check if the object is waiting to be removed from the bank.
bool isModified () const
 Check if the object has been modified.
bool isFlagA () const
 Check the value of flag A.
bool isFlagB () const
 Check the value of flag B.
void setEID (const std::string &eid)
 Set the external ID.
void setFlagA (bool flag)
 Set flag A.
void setFlagB (bool flag)
 Set flag B.
void setIID (ID_t iid)
 Set the internal ID.

Static Public Attributes

const NCode_t NCODE = M_READ
 The NCode type identifier for this object.
const ReadType_t NULL_READ = 0
const ReadType_t OTHER = 'X'
const ReadType_t END = 'E'
const ReadType_t CONTIG = 'C'
const ReadType_t BAC = 'B'
const ReadType_t WALK = 'W'
const ReadType_t TRANSPOSON = 'T'

Protected Member Functions

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

Static Protected Member Functions

uint8_t compress (char seqchar, char qualchar)
 Compresses a sequence char and quality char into a single byte.
std::pair< char, char > uncompress (uint8_t byte)
 Uncompresses a byte into a sequence and quality char.

Protected Attributes

uint8_t * seq_m
 compressed seq and qual data or uncompressed seq
uint8_t * qual_m
 uncompressed qual data
Size_t length_m
 length of the sequence and quality data
ID_t iid_m
 internal ID (integer AMOS identifier)
std::string eid_m
 external ID (anything you want sans newlines)
BankFlags_t flags_m
 bank flags, derived classes may use "nibble"

Static Protected Attributes

const uint8_t COMPRESS_BIT = 0x1
 compressed sequence flag
const uint8_t ADENINE_BITS = 0x0
 'A' bit
const uint8_t CYTOSINE_BITS = 0x40
 'C' bit
const uint8_t GUANINE_BITS = 0x80
 'G' bit
const uint8_t THYMINE_BITS = 0xC0
 'T' bit
const uint8_t SEQ_BITS = 0xC0
 sequence bit mask
const uint8_t QUAL_BITS = 0x3F
 quality bit mask

Detailed Description

A DNA sequencing read.

Derived from a Sequence_t type, this class is for the efficient storage of DNA sequencing reads. Retains all the functionality of a Sequence with added fields for clear ranges, mate pairs, etc.

Definition at line 31 of file Read_AMOS.hh.


Constructor & Destructor Documentation

AMOS::Read_t::Read_t  )  [inline]
 

Constructs an empty Read_t object.

Sets all members to NULL Definition at line 74 of file Read_AMOS.hh.

References AMOS::NULL_ID, and NULL_READ.

AMOS::Read_t::Read_t const Read_t source  )  [inline]
 

Copy constructor.

Definition at line 85 of file Read_AMOS.hh.

AMOS::Read_t::~Read_t  )  [inline]
 

Destroys a Read_t object.

Definition at line 94 of file Read_AMOS.hh.


Member Function Documentation

void Read_t::clear  )  [virtual]
 

Clears all object data, reinitializes the object.

All data will be cleared, but object compression status will remain unchanged. Use the compress/uncompress members to change this info.

Reimplemented from AMOS::Sequence_t.

Definition at line 29 of file Read_AMOS.cc.

References AMOS::Sequence_t::clear(), AMOS::NULL_ID, and NULL_READ.

Referenced by readMessage(), and writeMessage().

void Sequence_t::compress  )  [inherited]
 

Compress the internal representation of this sequence.

After compression, this object will continue to compress incoming data until the uncompress method is called. Compression packs both a base and a quality score into a single byte, effectively halving the memory requirements for each object.

The sequence should only contain A,C,G,T and Ns and quality scores in the range [MIN_QUALITY,MAX_QUALITY], if either of these conditions are not met the information will be lost when the data is compressed (see postconditions below).

Postcondition:
All invalid quality scores will be cast to MIN_QUALITY

All N's will be assigned a MIN_QUALITY quality score

All MIN_QUALITY scores will be assigned a N seqchar

Returns:
void
Definition at line 37 of file Sequence_AMOS.cc.

References AMOS::Sequence_t::COMPRESS_BIT, AMOS::Sequence_t::isCompressed(), AMOS::Sequence_t::length_m, AMOS::Pos_t, AMOS::Sequence_t::qual_m, and AMOS::Sequence_t::seq_m.

Referenced by AMOS::Sequence_t::setBase().

uint8_t AMOS::Sequence_t::compress char  seqchar,
char  qualchar
[inline, static, protected, inherited]
 

Compresses a sequence char and quality char into a single byte.

Note:
Must work with uncompress(uint8_t) method
Parameters:
seqchar The sequence base character (case insensitive)
qualchar The quality score character
Returns:
The compressed byte
Definition at line 64 of file Sequence_AMOS.hh.

References AMOS::Sequence_t::ADENINE_BITS, AMOS::Char2Qual(), AMOS::Sequence_t::CYTOSINE_BITS, AMOS::Sequence_t::GUANINE_BITS, AMOS::Sequence_t::SEQ_BITS, and AMOS::Sequence_t::THYMINE_BITS.

Referenced by AMOS::Sequence_t::clear().

std::pair<char, char> AMOS::Sequence_t::getBase Pos_t  index  )  const [inline, inherited]
 

Get a single base and its quality score.

Retrieves and uncompresses the sequence base for the requested index.

Parameters:
index The index of the requested base
Precondition:
index >= 0 && index < length
Exceptions:
ArgumentException_t 
Returns:
The requested (uppercase) base character and its quality score
Definition at line 203 of file Sequence_AMOS.hh.

References AMOS_THROW_ARGUMENT, AMOS::Sequence_t::isCompressed(), AMOS::Sequence_t::length_m, AMOS::Pos_t, AMOS::Sequence_t::qual_m, AMOS::Sequence_t::seq_m, and AMOS::Sequence_t::uncompress().

Referenced by AMOS::Sequence_t::getQualString(), AMOS::Sequence_t::getSeqString(), AMOS::Contig_t::getUngappedQualString(), AMOS::Contig_t::getUngappedSeqString(), and AMOS::Sequence_t::writeMessage().

std::vector<int16_t>& AMOS::Read_t::getBasePositions  )  [inline]
 

Get the base call positions.

If the vector is empty, then no base call positions are provided. Otherwise, the vector should have a size equal to the sequence length representing the base call positions as specified by the base-caller.

Returns:
The vector of base call positions
Definition at line 128 of file Read_AMOS.hh.

const std::vector<int16_t>& AMOS::Read_t::getBasePositions  )  const [inline]
 

Get the base call positions.

If the vector is empty, then no base call positions are provided. Otherwise, the vector should have a size equal to the sequence length representing the base call positions as specified by the base-caller.

Returns:
The vector of base call positions
Definition at line 113 of file Read_AMOS.hh.

Range_t AMOS::Read_t::getClearRange  )  [inline]
 

Get the generic clear range.

Returns:
The generic clear range
Definition at line 139 of file Read_AMOS.hh.

Referenced by AMOS::operator<<().

const std::string& AMOS::Universal_t::getComment  )  const [inline, inherited]
 

Get the comment string.

Returns:
The comment string
Definition at line 110 of file Universal_AMOS.hh.

Referenced by AMOS::operator<<().

const std::string& AMOS::IBankable_t::getEID  )  const [inline, inherited]
 

Get the external ID.

Returns:
The external ID
Definition at line 156 of file Bank_AMOS.hh.

References AMOS::IBankable_t::eid_m.

Referenced by AMOS::Contig_t::writeUMD().

ID_t AMOS::Read_t::getFragment  )  const [inline]
 

Get the parent fragment IID.

Returns:
The parent fragment IID
Definition at line 150 of file Read_AMOS.hh.

References AMOS::ID_t.

Pos_t AMOS::Read_t::getFragmentPosition  )  [inline]
 

Get the approximate position on the parent fragment.

Get this read's 1-based position on the parent fragment, positive if counting from left and oriented forward, negative if counting from right and reverse oriented, 0 if unknown.

Returns:
The position of this read on the parent fragment
Definition at line 165 of file Read_AMOS.hh.

References AMOS::Pos_t.

ID_t AMOS::IBankable_t::getIID  )  const [inline, inherited]
 

Get the internal ID.

Returns:
The internal ID
Definition at line 167 of file Bank_AMOS.hh.

References AMOS::ID_t, and AMOS::IBankable_t::iid_m.

Referenced by AMOS::Index_t::buildContigFeature(), AMOS::Index_t::buildContigScaffold(), AMOS::Index_t::buildReadContig(), AMOS::Index_t::buildReadLibrary(), AMOS::Index_t::buildScaffoldFeature(), and AMOS::operator<<().

Size_t AMOS::Sequence_t::getLength  )  const [inline, inherited]
 

Get the length of the sequence.

Returns:
The length of the sequence
Definition at line 220 of file Sequence_AMOS.hh.

References AMOS::Sequence_t::length_m, and AMOS::Size_t.

Referenced by AMOS::Contig_t::getSpan(), AMOS::Contig_t::getUngappedQualString(), AMOS::Contig_t::getUngappedSeqString(), and writeMessage().

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

Get the AMOS NCode type identifier.

Returns:
The AMOS NCode type identifier

Reimplemented from AMOS::Sequence_t.

Definition at line 172 of file Read_AMOS.hh.

References AMOS::NCode_t.

Range_t AMOS::Read_t::getQualityClearRange  )  [inline]
 

Get the quality score clear range.

Returns:
The quality score clear range
Definition at line 183 of file Read_AMOS.hh.

string Sequence_t::getQualString Range_t  range  )  const [inherited]
 

Get a quality score substring.

Returns a subrange of quality scores [begin, end) or (end, begin]. The reversed range will pull the reverse string of quality scores.

Parameters:
range The range of quality scores to get
Precondition:
range lo >= 0 && hi <= length
Exceptions:
ArgumentException_t 
Returns:
A subrange quality scores
Definition at line 56 of file Sequence_AMOS.cc.

References AMOS_THROW_ARGUMENT, AMOS::Sequence_t::getBase(), AMOS::Sequence_t::length_m, AMOS::NULL_CHAR, AMOS::Pos_t, and AMOS::Reverse().

std::string AMOS::Sequence_t::getQualString  )  const [inline, inherited]
 

Get the quality score string.

Returns:
The full string of quality scores
Definition at line 238 of file Sequence_AMOS.hh.

References AMOS::Sequence_t::length_m.

Referenced by AMOS::operator<<().

string Sequence_t::getSeqString Range_t  range  )  const [inherited]
 

Get a sequence base substring.

Returns a subrange of sequence bases [begin, end) or (end, being]. The reversed range will pull the reverse complement string of sequences bases.

Parameters:
range The range of sequence bases to get
Precondition:
range lo >= 0 && hi <= length
Exceptions:
ArgumentException_t 
Returns:
A subrange of sequence bases
Definition at line 80 of file Sequence_AMOS.cc.

References AMOS_THROW_ARGUMENT, AMOS::Sequence_t::getBase(), AMOS::Sequence_t::length_m, AMOS::NULL_CHAR, AMOS::Pos_t, and AMOS::ReverseComplement().

std::string AMOS::Sequence_t::getSeqString  )  const [inline, inherited]
 

Get the sequence base string.

Returns:
The full string of sequence bases
Definition at line 263 of file Sequence_AMOS.hh.

References AMOS::Sequence_t::length_m.

Referenced by AMOS::operator<<().

const Status_t AMOS::Universal_t::getStatus  )  const [inline, inherited]
 

Get the status value.

Returns:
The status value
Definition at line 121 of file Universal_AMOS.hh.

References AMOS::Status_t.

ReadType_t AMOS::Read_t::getType  )  const [inline]
 

Get the type of read.

Returns:
The type of read
Definition at line 194 of file Read_AMOS.hh.

References AMOS::ReadType_t.

Range_t AMOS::Read_t::getVectorClearRange  )  [inline]
 

Get the vector sequence clear range.

Returns:
The vector sequence clear range
Definition at line 205 of file Read_AMOS.hh.

bool AMOS::Sequence_t::isCompressed  )  const [inline, inherited]
 

Checks if the sequence data is compressed.

Returns true if the Sequence is currently operating in compressed mode, or false if under normal operation.

Returns:
True if compressed, false if not
Definition at line 291 of file Sequence_AMOS.hh.

References AMOS::Sequence_t::COMPRESS_BIT.

Referenced by AMOS::Sequence_t::compress(), AMOS::Sequence_t::getBase(), AMOS::Sequence_t::operator=(), AMOS::Sequence_t::readRecord(), AMOS::Sequence_t::setBase(), AMOS::Sequence_t::setSequence(), AMOS::Sequence_t::uncompress(), and AMOS::Sequence_t::writeRecord().

bool AMOS::IBankable_t::isFlagA  )  const [inline, inherited]
 

Check the value of flag A.

Returns:
The value of flag A
Definition at line 210 of file Bank_AMOS.hh.

References AMOS::IBankable_t::flags_m.

Referenced by AMOS::Universal_t::writeMessage(), and AMOS::Overlap_t::writeMessage().

bool AMOS::IBankable_t::isFlagB  )  const [inline, inherited]
 

Check the value of flag B.

Returns:
The value of flag B
Definition at line 221 of file Bank_AMOS.hh.

References AMOS::IBankable_t::flags_m.

Referenced by AMOS::Universal_t::writeMessage(), and AMOS::Overlap_t::writeMessage().

bool AMOS::IBankable_t::isModified  )  const [inline, inherited]
 

Check if the object has been modified.

Returns:
true if modified, otherwise false
Definition at line 199 of file Bank_AMOS.hh.

References AMOS::IBankable_t::flags_m.

bool AMOS::IBankable_t::isRemoved  )  const [inline, inherited]
 

Check if the object is waiting to be removed from the bank.

Note:
Useful for debugging only
Returns:
true if removed, otherwise false
Definition at line 188 of file Bank_AMOS.hh.

References AMOS::IBankable_t::flags_m.

void Read_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::Sequence_t.

Definition at line 43 of file Read_AMOS.cc.

References AMOS_THROW_ARGUMENT, clear(), AMOS::F_BASEPOSITION, AMOS::F_CLEAR, AMOS::F_FRAGMENT, AMOS::F_POSITION, AMOS::F_QUALITYCLEAR, AMOS::F_TYPE, AMOS::F_VECTORCLEAR, AMOS::Sequence_t::readMessage(), and setType().

void Read_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::Sequence_t.

Definition at line 134 of file Read_AMOS.cc.

References AMOS::Pos_t, AMOS::readLE(), AMOS::Sequence_t::readRecord(), and AMOS::Size_t.

void AMOS::Sequence_t::setBase char  seqchar,
char  qualchar,
Pos_t  index
[inline, inherited]
 

Set a sequence base and its quality score.

Any characters may be used for seq and qualchar unless dealing with a compressed sequence. If compressed, the sequence should only contain A,C,G,T and Ns and quality scores in the range [MIN_QUALITY,MAX_QUALITY], if either of these conditions are not met the information will be lost when the data is compressed (see postconditions below).

Parameters:
seqchar The sequence base character
qualchar The quality score character
index The index to assign these values
Precondition:
index >= 0 && index < length
Postcondition:
If compressed:
  • All invalid quality scores will be cast to MIN_QUALITY
  • All N's will be assigned a MIN_QUALITY quality score
  • All MIN_QUALITY scores will be assigned a N seqchar
Exceptions:
ArgumentException_t 
Returns:
void
Definition at line 321 of file Sequence_AMOS.hh.

References AMOS_THROW_ARGUMENT, AMOS::Sequence_t::compress(), AMOS::Sequence_t::isCompressed(), AMOS::Sequence_t::length_m, AMOS::Pos_t, AMOS::Sequence_t::qual_m, and AMOS::Sequence_t::seq_m.

Referenced by AMOS::Sequence_t::setSequence().

void AMOS::Read_t::setBasePositions const std::vector< int16_t > &  bcp  )  [inline]
 

Set the base call positions.

Parameters:
bcp The new vector of base call positions
Returns:
void
Definition at line 221 of file Read_AMOS.hh.

void AMOS::Read_t::setClearRange Range_t  clear  )  [inline]
 

Set the generic clear range.

Parameters:
clear The new generic clear range
Returns:
void
Definition at line 233 of file Read_AMOS.hh.

void AMOS::Universal_t::setComment const std::string &  comment  )  [inline, inherited]
 

Set the comment string.

Parameters:
comment The new comment string
Returns:
void
Definition at line 144 of file Universal_AMOS.hh.

void AMOS::IBankable_t::setEID const std::string &  eid  )  [inline, inherited]
 

Set the external ID.

Will only use the characters up to but not including the first newline.

Returns:
void
Definition at line 234 of file Bank_AMOS.hh.

References AMOS::IBankable_t::eid_m, and AMOS::NL_CHAR.

Referenced by AMOS::Contig_t::readUMD().

void AMOS::IBankable_t::setFlagA bool  flag  )  [inline, inherited]
 

Set flag A.

Has no effect on the actual object in memory other than setting a flag. This is one of two user accessible flags to be used as needed, the other is flag B.

Parameters:
flag The new flag A value
Returns:
void
Definition at line 254 of file Bank_AMOS.hh.

References AMOS::IBankable_t::flags_m.

Referenced by AMOS::Universal_t::readMessage(), and AMOS::Overlap_t::readMessage().

void AMOS::IBankable_t::setFlagB bool  flag  )  [inline, inherited]
 

Set flag B.

Has no effect on the actual object in memory other than setting a flag. This is one of two user accessible flags to be used as needed, the other is flag A.

Parameters:
flag The new flag B value
Returns:
void
Definition at line 270 of file Bank_AMOS.hh.

References AMOS::IBankable_t::flags_m.

Referenced by AMOS::Universal_t::readMessage(), and AMOS::Overlap_t::readMessage().

void AMOS::Read_t::setFragment ID_t  frag  )  [inline]
 

Set the parent fragment IID.

Parameters:
frag The new parent fragment IID
Returns:
void
Definition at line 245 of file Read_AMOS.hh.

References AMOS::ID_t.

void AMOS::Read_t::setFragmentPosition Pos_t  pos  )  [inline]
 

Set the approximate position on the parent fragment.

Set this read's 1-based position on the parent fragment, positive if counting from left and oriented forward, negative if counting from right and reverse oriented, 0 if unknown.

Parameters:
pos The approximate position of this read on the parent fragment
Returns:
void
Definition at line 261 of file Read_AMOS.hh.

References AMOS::Pos_t.

void AMOS::IBankable_t::setIID ID_t  iid  )  [inline, inherited]
 

Set the internal ID.

Parameters:
iid The new internal ID
Returns:
void
Definition at line 282 of file Bank_AMOS.hh.

References AMOS::ID_t, and AMOS::IBankable_t::iid_m.

void AMOS::Read_t::setQualityClearRange Range_t  qclear  )  [inline]
 

Set the quality score clear range.

Parameters:
qclear The new quality score clear range
Returns:
void
Definition at line 273 of file Read_AMOS.hh.

void Sequence_t::setSequence const std::string &  seq,
const std::string &  qual
[inherited]
 

Set the entire sequence.

Combines and compresses the sequence and quality data contained in the two STL strings. If current Sequence object is compressed, please refer to the postconditions for the setBase(char,char,Pos_t) operation. All newline characters will be discarded. but the newlines must be in the same location in both the sequence and quality files.

Parameters:
seq The sequence base string
qual The quality score string
Precondition:
seq . size( ) == qual . size( )
Exceptions:
ArgumentException_t 
Returns:
void
Definition at line 179 of file Sequence_AMOS.cc.

References AMOS_THROW_ARGUMENT, AMOS::Sequence_t::isCompressed(), AMOS::Sequence_t::length_m, AMOS::NL_CHAR, AMOS::Pos_t, AMOS::Sequence_t::qual_m, AMOS::SafeRealloc(), AMOS::Sequence_t::seq_m, AMOS::Sequence_t::setBase(), and AMOS::Size_t.

void Sequence_t::setSequence const char *  seq,
const char *  qual
[inherited]
 

Set the entire sequence.

Combines and compresses the sequence and quality data contained in the two C strings. If current Sequence object is compressed, please refer to the postconditions for the setBase(char,char,Pos_t) operation. All newline characters will be discarded, but the newlines must be in the same location in both the sequence and quality files.

Parameters:
seq The sequence base string
qual The quality score string
Precondition:
strlen(seq) == strlen(qual)
Exceptions:
ArgumentException_t 
Returns:
void
Definition at line 145 of file Sequence_AMOS.cc.

References AMOS_THROW_ARGUMENT, AMOS::Sequence_t::isCompressed(), AMOS::Sequence_t::length_m, AMOS::NL_CHAR, AMOS::Pos_t, AMOS::Sequence_t::qual_m, AMOS::SafeRealloc(), AMOS::Sequence_t::seq_m, AMOS::Sequence_t::setBase(), and AMOS::Size_t.

Referenced by AMOS::Sequence_t::readMessage().

void AMOS::Universal_t::setStatus Status_t  status  )  [inline, inherited]
 

Set the status value.

Parameters:
status The new status value
Returns:
void
Definition at line 156 of file Universal_AMOS.hh.

References AMOS::Status_t.

Referenced by AMOS::Universal_t::readMessage().

void Read_t::setType ReadType_t  type  ) 
 

Set the type of read.

Parameters:
type The new type of read
Precondition:
type is one of [XECBW]
Exceptions:
ArgumentException_t 
Returns:
void
Definition at line 157 of file Read_AMOS.cc.

References AMOS_THROW_ARGUMENT, BAC, CONTIG, END, NULL_READ, OTHER, AMOS::ReadType_t, TRANSPOSON, and WALK.

Referenced by readMessage().

void AMOS::Read_t::setVectorClearRange Range_t  vclear  )  [inline]
 

Set the vector sequence clear range.

Parameters:
vclear The new vector sequence clear range
Returns:
void
Definition at line 296 of file Read_AMOS.hh.

void Sequence_t::uncompress  )  [inherited]
 

Uncompress the internal representation of this sequence.

After uncompression, this object will not compress incoming data until the compress method is called once again. The uncompressed version uses two bytes to store a base and quality score, thus doubling the memory requirements over a compressed version.

Returns:
void
Definition at line 213 of file Sequence_AMOS.cc.

References AMOS::Sequence_t::COMPRESS_BIT, AMOS::Sequence_t::isCompressed(), AMOS::Sequence_t::length_m, AMOS::Pos_t, AMOS::Sequence_t::qual_m, AMOS::SafeRealloc(), and AMOS::Sequence_t::seq_m.

Referenced by AMOS::Sequence_t::getBase().

std::pair<char, char> AMOS::Sequence_t::uncompress uint8_t  byte  )  [inline, static, protected, inherited]
 

Uncompresses a byte into a sequence and quality char.

Note:
Must work with compress(char,char)
Parameters:
byte The compressed sequence and quality byte
Returns:
The sequence and quality char respectively
Definition at line 93 of file Sequence_AMOS.hh.

References AMOS::Sequence_t::ADENINE_BITS, AMOS::Sequence_t::CYTOSINE_BITS, AMOS::Sequence_t::GUANINE_BITS, AMOS::Qual2Char(), AMOS::Sequence_t::QUAL_BITS, AMOS::Sequence_t::SEQ_BITS, and AMOS::Sequence_t::THYMINE_BITS.

void Read_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::Sequence_t.

Definition at line 177 of file Read_AMOS.cc.

References clear(), AMOS::F_BASEPOSITION, AMOS::F_CLEAR, AMOS::F_FRAGMENT, AMOS::F_POSITION, AMOS::F_QUALITYCLEAR, AMOS::F_TYPE, AMOS::F_VECTORCLEAR, AMOS::Sequence_t::getLength(), AMOS::NULL_ID, NULL_READ, AMOS::NULL_STRING, and AMOS::Sequence_t::writeMessage().

void Read_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. Should not write the flags, EID, or 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::Sequence_t.

Definition at line 246 of file Read_AMOS.cc.

References AMOS::Pos_t, AMOS::Size_t, AMOS::writeLE(), and AMOS::Sequence_t::writeRecord().


Member Data Documentation

const uint8_t AMOS::Sequence_t::ADENINE_BITS = 0x0 [static, protected, inherited]
 

'A' bit

Definition at line 47 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::compress(), and AMOS::Sequence_t::uncompress().

const ReadType_t Read_t::BAC = 'B' [static]
 

Definition at line 23 of file Read_AMOS.cc.

Referenced by setType().

const uint8_t AMOS::Sequence_t::COMPRESS_BIT = 0x1 [static, protected, inherited]
 

compressed sequence flag

Definition at line 46 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::clear(), AMOS::Sequence_t::compress(), AMOS::Sequence_t::isCompressed(), and AMOS::Sequence_t::uncompress().

const ReadType_t Read_t::CONTIG = 'C' [static]
 

Definition at line 22 of file Read_AMOS.cc.

Referenced by setType().

const uint8_t AMOS::Sequence_t::CYTOSINE_BITS = 0x40 [static, protected, inherited]
 

'C' bit

Definition at line 48 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::compress(), and AMOS::Sequence_t::uncompress().

std::string AMOS::IBankable_t::eid_m [protected, inherited]
 

external ID (anything you want sans newlines)

Definition at line 66 of file Bank_AMOS.hh.

Referenced by AMOS::IBankable_t::clear(), AMOS::IBankable_t::getEID(), and AMOS::IBankable_t::setEID().

const ReadType_t Read_t::END = 'E' [static]
 

Definition at line 21 of file Read_AMOS.cc.

Referenced by setType().

BankFlags_t AMOS::IBankable_t::flags_m [protected, inherited]
 

bank flags, derived classes may use "nibble"

Definition at line 68 of file Bank_AMOS.hh.

Referenced by AMOS::IBankable_t::clear(), AMOS::IBankable_t::isFlagA(), AMOS::IBankable_t::isFlagB(), AMOS::IBankable_t::isModified(), AMOS::IBankable_t::isRemoved(), AMOS::IBankable_t::setFlagA(), and AMOS::IBankable_t::setFlagB().

const uint8_t AMOS::Sequence_t::GUANINE_BITS = 0x80 [static, protected, inherited]
 

'G' bit

Definition at line 49 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::compress(), and AMOS::Sequence_t::uncompress().

ID_t AMOS::IBankable_t::iid_m [protected, inherited]
 

internal ID (integer AMOS identifier)

Definition at line 64 of file Bank_AMOS.hh.

Referenced by AMOS::IBankable_t::clear(), AMOS::IBankable_t::getIID(), AMOS::IBankable_t::IBankable_t(), and AMOS::IBankable_t::setIID().

Size_t AMOS::Sequence_t::length_m [protected, inherited]
 

length of the sequence and quality data

Definition at line 43 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::clear(), AMOS::Sequence_t::compress(), AMOS::Sequence_t::getBase(), AMOS::Sequence_t::getLength(), AMOS::Sequence_t::getQualString(), AMOS::Sequence_t::getSeqString(), AMOS::Sequence_t::operator=(), AMOS::Sequence_t::readRecord(), AMOS::Sequence_t::Sequence_t(), AMOS::Sequence_t::setBase(), AMOS::Sequence_t::setSequence(), AMOS::Sequence_t::uncompress(), AMOS::Sequence_t::writeMessage(), and AMOS::Sequence_t::writeRecord().

const NCode_t Read_t::NCODE = M_READ [static]
 

The NCode type identifier for this object.

Reimplemented from AMOS::Sequence_t.

Definition at line 18 of file Read_AMOS.cc.

const ReadType_t Read_t::NULL_READ = 0 [static]
 

Definition at line 19 of file Read_AMOS.cc.

Referenced by clear(), Read_t(), setType(), and writeMessage().

const ReadType_t Read_t::OTHER = 'X' [static]
 

Definition at line 20 of file Read_AMOS.cc.

Referenced by setType().

const uint8_t AMOS::Sequence_t::QUAL_BITS = 0x3F [static, protected, inherited]
 

quality bit mask

Definition at line 52 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::uncompress().

uint8_t* AMOS::Sequence_t::qual_m [protected, inherited]
 

uncompressed qual data

Definition at line 42 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::clear(), AMOS::Sequence_t::compress(), AMOS::Sequence_t::getBase(), AMOS::Sequence_t::operator=(), AMOS::Sequence_t::readRecord(), AMOS::Sequence_t::Sequence_t(), AMOS::Sequence_t::setBase(), AMOS::Sequence_t::setSequence(), AMOS::Sequence_t::uncompress(), AMOS::Sequence_t::writeRecord(), and AMOS::Sequence_t::~Sequence_t().

const uint8_t AMOS::Sequence_t::SEQ_BITS = 0xC0 [static, protected, inherited]
 

sequence bit mask

Definition at line 51 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::compress(), and AMOS::Sequence_t::uncompress().

uint8_t* AMOS::Sequence_t::seq_m [protected, inherited]
 

compressed seq and qual data or uncompressed seq

Definition at line 41 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::clear(), AMOS::Sequence_t::compress(), AMOS::Sequence_t::getBase(), AMOS::Sequence_t::operator=(), AMOS::Sequence_t::readRecord(), AMOS::Sequence_t::Sequence_t(), AMOS::Sequence_t::setBase(), AMOS::Sequence_t::setSequence(), AMOS::Sequence_t::uncompress(), AMOS::Sequence_t::writeRecord(), and AMOS::Sequence_t::~Sequence_t().

const uint8_t AMOS::Sequence_t::THYMINE_BITS = 0xC0 [static, protected, inherited]
 

'T' bit

Definition at line 50 of file Sequence_AMOS.hh.

Referenced by AMOS::Sequence_t::compress(), and AMOS::Sequence_t::uncompress().

const ReadType_t Read_t::TRANSPOSON = 'T' [static]
 

Definition at line 25 of file Read_AMOS.cc.

Referenced by setType().

const ReadType_t Read_t::WALK = 'W' [static]
 

Definition at line 24 of file Read_AMOS.cc.

Referenced by setType().


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