Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# gnGenomeSpec Class Reference

This class contains references to the sequence data, annotation, and other related header data for an organism's genome. More...

`#include <gnGenomeSpec.h>`

Inheritance diagram for gnGenomeSpec::

List of all members.

## Public Methods
| gnGenomeSpec ()
| gnGenomeSpec (const gnGenomeSpec &s)
| Copy constructor. More...
virtual | ~gnGenomeSpec ()
| Destructor, frees memory. More...
virtual gnGenomeSpec* | Clone () const
virtual void | Clear ()
| Clears all data from this spec. More...
virtual void | SetReverseComplement (const boolean value)
| Sets the reverse complement bit for this spec. More...
virtual uint32 | GetSpecListLength () const
| Returns the number of subspecs this spec contains. More...
virtual gnFragmentSpec* | GetSpec (const uint32 i) const
| Get the spec at index i in the list of subspecs. More...
virtual gnFragmentSpec* | GetSpecByBase (const gnSeqI baseI) const
| Get the spec from the list of subspecs which contains the specified base pair. More...
virtual void | AddSpec (gnBaseSpec *spec, const uint32 i=UINT32_MAX)
| Add a subspec to this spec. More...
virtual void | RemoveSpec (uint32 i)
| Remove a subspec from this spec. More...
virtual void | MergeFragments (const uint32 startC, const uint32 endC)
virtual uint32 | AddFeature (gnBaseFeature *feat)
| Add a feature to this spec. More...
virtual uint32 | GetFeatureListLength () const
| Returns the number of features this spec contains. More...
virtual gnBaseFeature* | GetFeature (const uint32 i) const
| Get the feature at index i in the list of features. More...
virtual void | GetContainedFeatures (const gnLocation &lt, vector< gnBaseFeature *> &feature_vector, vector< uint32 > &index_vector) const
| Creates a list of all features which are contained by coordinates specified. More...
virtual void | GetIntersectingFeatures (const gnLocation &lt, vector< gnBaseFeature *> &feature_vector, vector< uint32 > &index_vector) const
| Creates a list of all features which intersect the coordinates specified. More...
virtual void | GetBrokenFeatures (const gnLocation &lt, vector< gnBaseFeature *> &feature_vector) const
| Creates a list of features which may have been broken by an edit. More...
virtual void | RemoveFeature (const uint32 i)
| Remove a feature from this spec. More...
virtual gnGenomeSpec* | CloneRange (const gnSeqI startI, const gnSeqI len) const
| Copies a specified range of bases and returns a pointer to the resulting gnGenomeSpec. More...
## Protected Attributes
vector<gnFragmentSpec*> | m_SpecList

## Detailed Description

This class contains references to the sequence data, annotation, and other related header data for an organism's genome.

The genome is organized into a list of sequence fragments (specs), a list of features, and a list of headers.

Definition at line 34 of file gnGenomeSpec.h.

## Constructor & Destructor Documentation

gnGenomeSpec::gnGenomeSpec ( | )

| Definition at line 17 of file gnGenomeSpec.cpp. Referenced by Clone(), and CloneRange().

gnGenomeSpec::gnGenomeSpec ( | const gnGenomeSpec & s )

  | Copy constructor. Parameters:
  s | the gnGenomeSpec to copy.
Definition at line 22 of file gnGenomeSpec.cpp.

gnGenomeSpec::~gnGenomeSpec ( | )`[virtual]`

| Destructor, frees memory. Definition at line 39 of file gnGenomeSpec.cpp.

## Member Function Documentation

uint32 gnGenomeSpec::AddFeature ( | gnBaseFeature * feat )`[virtual]`

  | Add a feature to this spec. Parameters:
  feat | The feature to add.
  i | The feature to insert before
Returns: True if successful Reimplemented from gnMultiSpec. Definition at line 129 of file gnGenomeSpec.cpp. Referenced by gnSequence::addFeature().

void gnGenomeSpec::AddSpec ( | gnBaseSpec * spec,
| const uint32 i = UINT32_MAX )`[inline, virtual]`

  | Add a subspec to this spec. Throws an exception if the insertion index i is out of range Parameters:
  spec | The subspec to add.
  i | The subspec to insert before
Returns: True if successful Reimplemented from gnMultiSpec. Definition at line 106 of file gnGenomeSpec.h. Referenced by CloneRange(), gnFASSource::GetSpec(), gnSEQSource::ParseStream(), gnRAWSource::ParseStream(), gnGBKSource::ParseStream(), gnDNXSource::ParseStream(), gnSequence::gnSequence(), and gnSequence::insert().

void gnGenomeSpec::Clear ( | )`[virtual]`

| Clears all data from this spec. Reimplemented from gnMultiSpec. Definition at line 44 of file gnGenomeSpec.cpp. Referenced by gnGenomeSpec(), and ~gnGenomeSpec().

gnGenomeSpec * gnGenomeSpec::Clone ( | ) const`[inline, virtual]`

| Reimplemented from gnMultiSpec. Definition at line 84 of file gnGenomeSpec.h. Referenced by gnSEQSource::GetSpec(), gnRAWSource::GetSpec(), gnGBKSource::GetSpec(), gnDNXSource::GetSpec(), gnABISource::GetSpec(), gnGenomeSpec(), gnSequence::gnSequence(), gnSequence::insert(), and gnSequence::splitContig().

gnGenomeSpec * gnGenomeSpec::CloneRange ( | const gnSeqI startI,
| const gnSeqI len ) const`[virtual]`

  | Copies a specified range of bases and returns a pointer to the resulting gnGenomeSpec. You must delete the copy when you are finished with it. Parameters:
  startI | The first base pair to copy
  len | The length of the piece to copy
Returns: A copy of the gnGenomeSpec containing only the specified bases Definition at line 68 of file gnGenomeSpec.cpp. Referenced by gnSequence::erase(), and gnSequence::subseq().

void gnGenomeSpec::GetBrokenFeatures ( | const gnLocation & lt,
| vector< gnBaseFeature *> & feature_vector ) const`[virtual]`

  | Creates a list of features which may have been broken by an edit. Parameters:
  lt | The coordinates containing the features to return.
  feature_vector | The vector to store features in.
Reimplemented from gnMultiSpec. Definition at line 215 of file gnGenomeSpec.cpp. Referenced by gnSequence::getBrokenFeatures().

void gnGenomeSpec::GetContainedFeatures ( | const gnLocation & lt,
| vector< gnBaseFeature *> & feature_vector,
| vector< uint32 > & index_vector ) const`[virtual]`

  | Creates a list of all features which are contained by coordinates specified. Parameters:
  lt | The coordinates containing the features to return.
  feature_vector | The vector to store features in.
  index_vector | A vector of indices which correspond to the features.
Reimplemented from gnMultiSpec. Definition at line 172 of file gnGenomeSpec.cpp. Referenced by gnSequence::getContainedFeatures().

gnBaseFeature * gnGenomeSpec::GetFeature ( | const uint32 i ) const`[virtual]`

  | Get the feature at index i in the list of features. Parameters:
  i | The index of the feature
Returns: The feature. Reimplemented from gnMultiSpec. Definition at line 156 of file gnGenomeSpec.cpp. Referenced by gnSequence::getFeature().

uint32 gnGenomeSpec::GetFeatureListLength ( | ) const`[virtual]`

| Returns the number of features this spec contains. Returns: The number of features this spec contains. Reimplemented from gnMultiSpec. Definition at line 148 of file gnGenomeSpec.cpp. Referenced by gnSequence::getFeatureListLength().

void gnGenomeSpec::GetIntersectingFeatures ( | const gnLocation & lt,
| vector< gnBaseFeature *> & feature_vector,
| vector< uint32 > & index_vector ) const`[virtual]`

  | Creates a list of all features which intersect the coordinates specified. Parameters:
  lt | The coordinates intersecting the features to return.
  feature_vector | The vector to store features in.
  index_vector | A vector of indices which correspond to the features.
Reimplemented from gnMultiSpec. Definition at line 194 of file gnGenomeSpec.cpp. Referenced by gnSequence::getIntersectingFeatures().

gnFragmentSpec * gnGenomeSpec::GetSpec ( | const uint32 i ) const`[inline, virtual]`

  | Get the spec at index i in the list of subspecs. Parameters:
  i | The index of the spec
Returns: The spec. Reimplemented from gnMultiSpec. Definition at line 94 of file gnGenomeSpec.h. Referenced by AddFeature(), CloneRange(), GetBrokenFeatures(), GetContainedFeatures(), gnDNXSource::GetContigID(), gnDNXSource::GetContigName(), gnDNXSource::GetContigSeqLength(), GetFeature(), GetFeatureListLength(), GetIntersectingFeatures(), gnDNXSource::HasContig(), RemoveFeature(), SetReverseComplement(), gnGBKSource::Write(), gnFASSource::Write(), gnDNXSource::Write(), gnSequence::addHeader(), gnSequence::contig(), gnSequence::contigByName(), gnSequence::contigLength(), gnSequence::contigName(), gnSequence::getHeader(), gnSequence::getHeaderListLength(), gnSequence::globalToSource(), gnSequence::insert(), gnSequence::isReverseComplement(), gnSequence::removeHeader(), gnSequence::setContigName(), and gnSequence::setReverseComplement().

gnFragmentSpec * gnGenomeSpec::GetSpecByBase ( | const gnSeqI baseI ) const`[inline, virtual]`

  | Get the spec from the list of subspecs which contains the specified base pair. Parameters:
  baseI | The base pair index.
Returns: The spec. Reimplemented from gnMultiSpec. Definition at line 101 of file gnGenomeSpec.h. Referenced by gnSequence::contigByBase().

uint32 gnGenomeSpec::GetSpecListLength ( | ) const`[inline, virtual]`

| Returns the number of subspecs this spec contains. Returns: The number of subspecs this spec contains. Reimplemented from gnMultiSpec. Definition at line 89 of file gnGenomeSpec.h. Referenced by AddFeature(), CloneRange(), GetBrokenFeatures(), GetContainedFeatures(), gnDNXSource::GetContigListLength(), GetFeature(), GetFeatureListLength(), GetIntersectingFeatures(), MergeFragments(), gnSEQSource::ParseStream(), gnGBKSource::ParseStream(), RemoveFeature(), SetReverseComplement(), gnSequence::contigListLength(), gnSequence::contigListSize(), and gnSequence::insert().

void gnGenomeSpec::MergeFragments ( | const uint32 startC,
| const uint32 endC )`[virtual]`

| Definition at line 113 of file gnGenomeSpec.cpp. Referenced by gnSequence::mergeContigs().

void gnGenomeSpec::RemoveFeature ( | const uint32 i )`[virtual]`

  | Remove a feature from this spec. Parameters:
  i | The index of the feature to remove.
Returns: True if successful Reimplemented from gnMultiSpec. Definition at line 235 of file gnGenomeSpec.cpp. Referenced by gnSequence::removeFeature().

void gnGenomeSpec::RemoveSpec ( | uint32 i )`[inline, virtual]`

  | Remove a subspec from this spec. Parameters:
  i | The index of the subspec to remove.
Reimplemented from gnMultiSpec. Definition at line 114 of file gnGenomeSpec.h. Referenced by gnSEQSource::ParseStream(), and gnGBKSource::ParseStream().

void gnGenomeSpec::SetReverseComplement ( | const boolean value )`[virtual]`

  | Sets the reverse complement bit for this spec. Parameters:
  value | True for reverse complement, false otherwise.
Reimplemented from gnBaseSpec. Definition at line 53 of file gnGenomeSpec.cpp. Referenced by gnSequence::setReverseComplement().

## Member Data Documentation

vector< gnFragmentSpec *> gnGenomeSpec::m_SpecList<gnFragmentSpec*>`[protected]`

| Definition at line 79 of file gnGenomeSpec.h.

The documentation for this class was generated from the following files:

- gnGenomeSpec.h
- gnGenomeSpec.cpp