gnBaseSpec Class Reference

gnBaseSpec is the class which stores genetic information and is best accessed using gnSequence. More...

#include <gnBaseSpec.h>

Inheritance diagram for gnBaseSpec:

Inheritance graph
[legend]
Collaboration diagram for gnBaseSpec:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void Clear ()
 Clears all data from this spec.
virtual gnBaseSpecClone () const =0
virtual gnBaseSpecCloneRange (const gnSeqI startI, const gnSeqI len) const =0
virtual void CropEnd (gnSeqI cropLen)=0
 Crop the last cropLen bases from the sequence.
virtual void CropStart (gnSeqI cropLen)=0
 Crop the first cropLen bases from the sequence.
virtual gnSeqI GetLength () const =0
 Get the length of all the sequence data covered by this spec.
virtual string GetName () const
 Get the name of the contig associated with this spec.
 gnBaseSpec ()
virtual boolean IsCircular () const
 Returns true if this spec's sequence is circular.
virtual boolean IsReverseComplement () const
 Returns true if this spec is read reverse complement.
virtual boolean SeqRead (const gnSeqI start, gnSeqC *buf, gnSeqI &bufLen, const uint32 contigI) const =0
 Reads sequence data from this spec.
virtual void SetCircular (const boolean value)
 Sets whether this spec should be read circular.
virtual void SetName (const string &name)
 Sets the name for this contig.
virtual void SetReverseComplement (const boolean value)=0
 Sets the reverse complement bit for this spec.
virtual ~gnBaseSpec ()
 Destructor, frees memory.

Protected Attributes

boolean m_circular
string m_name
boolean m_reverseComplement
string m_sourceName

Detailed Description

gnBaseSpec is the class which stores genetic information and is best accessed using gnSequence.

Definition at line 27 of file gnBaseSpec.h.


Constructor & Destructor Documentation

gnBaseSpec::gnBaseSpec  )  [inline]
 

Definition at line 30 of file gnBaseSpec.h.

virtual gnBaseSpec::~gnBaseSpec  )  [inline, virtual]
 

Destructor, frees memory.

Definition at line 34 of file gnBaseSpec.h.


Member Function Documentation

void gnBaseSpec::Clear  )  [inline, virtual]
 

Clears all data from this spec.

Reimplemented in gnContigSpec, gnFragmentSpec, gnGenomeSpec, gnMultiSpec< SubSpec >, gnSourceSpec, gnStringSpec, gnMultiSpec< gnContigSpec >, and gnMultiSpec< gnFragmentSpec >.

Definition at line 136 of file gnBaseSpec.h.

References m_circular, m_name, m_reverseComplement, and m_sourceName.

Referenced by gnContigSpec::Clear(), gnMultiSpec< SubSpec >::Clear(), gnFragmentSpec::gnFragmentSpec(), and gnGenomeSpec::gnGenomeSpec().

virtual gnBaseSpec* gnBaseSpec::Clone  )  const [pure virtual]
 

Implements gnClone.

Implemented in gnContigSpec, gnFragmentSpec, gnGenomeSpec, gnMultiSpec< SubSpec >, gnSourceSpec, gnStringSpec, gnMultiSpec< gnContigSpec >, and gnMultiSpec< gnFragmentSpec >.

virtual gnBaseSpec* gnBaseSpec::CloneRange const gnSeqI  startI,
const gnSeqI  len
const [pure virtual]
 

Implemented in gnContigSpec, gnFragmentSpec, gnGenomeSpec, gnSourceSpec, and gnStringSpec.

virtual void gnBaseSpec::CropEnd gnSeqI  cropLen  )  [pure virtual]
 

Crop the last cropLen bases from the sequence.

CropEnd will delete features and headers associated with the cropped bases.

Parameters:
cropLen The number of base pairs to delete from the end.

Implemented in gnContigSpec, gnFragmentSpec, gnMultiSpec< SubSpec >, gnMultiSpec< gnContigSpec >, and gnMultiSpec< gnFragmentSpec >.

virtual void gnBaseSpec::CropStart gnSeqI  cropLen  )  [pure virtual]
 

Crop the first cropLen bases from the sequence.

CropStart will delete features and headers associated with the cropped bases.

Parameters:
cropLen The number of base pairs to delete from the beginning.

Implemented in gnContigSpec, gnFragmentSpec, gnMultiSpec< SubSpec >, gnMultiSpec< gnContigSpec >, and gnMultiSpec< gnFragmentSpec >.

virtual gnSeqI gnBaseSpec::GetLength  )  const [pure virtual]
 

Get the length of all the sequence data covered by this spec.

Returns:
This spec's length in base pairs.

Implemented in gnContigSpec, gnMultiSpec< SubSpec >, gnMultiSpec< gnContigSpec >, and gnMultiSpec< gnFragmentSpec >.

Referenced by gnDNXSource::GetContigSeqLength().

string gnBaseSpec::GetName  )  const [inline, virtual]
 

Get the name of the contig associated with this spec.

Returns:
The contig name or an empty string if none exists.
Definition at line 116 of file gnBaseSpec.h.

Referenced by gnSequence::contigName(), gnDNXSource::GetContigID(), gnDNXSource::GetContigName(), gnDNXSource::HasContig(), gnGBKSource::Write(), and gnDNXSource::Write().

boolean gnBaseSpec::IsCircular  )  const [inline, virtual]
 

Returns true if this spec's sequence is circular.

Returns:
True if this spec's sequence is circular.
Definition at line 128 of file gnBaseSpec.h.

References m_circular.

Referenced by gnSequence::isCircular(), and gnGBKSource::Write().

boolean gnBaseSpec::IsReverseComplement  )  const [inline, virtual]
 

Returns true if this spec is read reverse complement.

Returns:
True if this spec is read reverse complement.
Definition at line 124 of file gnBaseSpec.h.

References m_reverseComplement.

Referenced by gnSequence::globalToSource(), gnSequence::isReverseComplement(), gnGenomeSpec::SetReverseComplement(), and gnFragmentSpec::SetReverseComplement().

virtual boolean gnBaseSpec::SeqRead const gnSeqI  start,
gnSeqC buf,
gnSeqI bufLen,
const uint32  contigI
const [pure virtual]
 

Reads sequence data from this spec.

SeqRead will attempt to read "bufLen" base pairs starting at "start", an offset into the sequence. Reading inside a specific contig can be accomplished by supplying the "contigI" parameter with a valid contig index. SeqRead stores the sequence data in "buf" and returns the actual number of bases read in "bufLen". SeqRead will return false if a serious error occurs.

Parameters:
start The base pair to start reading at.
buf The character array to store base pairs into.
bufLen The number of base pairs to read. This will be modified to reflect the actual number of bases read.
contigI The index of the subspec to read or ALL_CONTIGS by default.
Returns:
True if the operation was successful.

Implemented in gnContigSpec, gnMultiSpec< SubSpec >, gnMultiSpec< gnContigSpec >, and gnMultiSpec< gnFragmentSpec >.

void gnBaseSpec::SetCircular const boolean  value  )  [inline, virtual]
 

Sets whether this spec should be read circular.

If circular is set, reads beyond the end of this spec will pick up at the beginning and read up to the start index.

Parameters:
value True for circular, false otherwise.
Definition at line 132 of file gnBaseSpec.h.

References m_circular.

Referenced by gnSEQSource::ParseStream(), gnGBKSource::ParseStream(), and gnSequence::setCircular().

void gnBaseSpec::SetName const string &  name  )  [inline, virtual]
 

Sets the name for this contig.

Parameters:
name The new name.
Returns:
True if successful. Honestly, I don't know how this could be unsuccessful...
Definition at line 120 of file gnBaseSpec.h.

References m_name.

Referenced by gnFASSource::GetSpec(), gnSEQSource::ParseStream(), gnGBKSource::ParseStream(), gnDNXSource::ParseStream(), and gnSequence::setContigName().

virtual void gnBaseSpec::SetReverseComplement const boolean  value  )  [pure virtual]
 

Sets the reverse complement bit for this spec.

Parameters:
value True for reverse complement, false otherwise.

Implemented in gnContigSpec, gnFragmentSpec, and gnGenomeSpec.

Referenced by main().


Member Data Documentation

boolean gnBaseSpec::m_circular [protected]
 

Definition at line 108 of file gnBaseSpec.h.

Referenced by Clear(), gnStringSpec::CloneRange(), gnSourceSpec::CloneRange(), gnFragmentSpec::gnFragmentSpec(), gnGenomeSpec::gnGenomeSpec(), gnSourceSpec::gnSourceSpec(), gnStringSpec::gnStringSpec(), IsCircular(), and SetCircular().

string gnBaseSpec::m_name [protected]
 

Definition at line 110 of file gnBaseSpec.h.

Referenced by Clear(), gnStringSpec::CloneRange(), gnSourceSpec::CloneRange(), gnFragmentSpec::gnFragmentSpec(), gnGenomeSpec::gnGenomeSpec(), gnSourceSpec::gnSourceSpec(), gnStringSpec::gnStringSpec(), and SetName().

boolean gnBaseSpec::m_reverseComplement [protected]
 

Definition at line 107 of file gnBaseSpec.h.

Referenced by Clear(), gnStringSpec::CloneRange(), gnSourceSpec::CloneRange(), gnFragmentSpec::gnFragmentSpec(), gnGenomeSpec::gnGenomeSpec(), gnSourceSpec::gnSourceSpec(), gnStringSpec::gnStringSpec(), and IsReverseComplement().

string gnBaseSpec::m_sourceName [protected]
 

Reimplemented in gnMultiSpec< SubSpec >, gnMultiSpec< gnContigSpec >, and gnMultiSpec< gnFragmentSpec >.

Definition at line 111 of file gnBaseSpec.h.

Referenced by Clear(), gnStringSpec::CloneRange(), gnSourceSpec::CloneRange(), gnSourceSpec::gnSourceSpec(), and gnStringSpec::gnStringSpec().


The documentation for this class was generated from the following file:
Generated on Mon Feb 14 19:29:46 2005 for libGenome by doxygen 1.3.8