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:

Inheritance graph
[legend]
Collaboration diagram for gnGenomeSpec:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual uint32 AddFeature (gnBaseFeature *feat)
 Add a feature to this spec.
virtual void Clear ()
 Clears all data from this spec.
virtual gnGenomeSpecClone () const
virtual gnGenomeSpecCloneRange (const gnSeqI startI, const gnSeqI len) const
 Copies a specified range of bases and returns a pointer to the resulting gnGenomeSpec.
virtual void GetBrokenFeatures (const gnLocation &lt, vector< gnBaseFeature * > &feature_vector) const
 Creates a list of features which may have been broken by an edit.
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.
virtual gnBaseFeatureGetFeature (const uint32 i) const
 Get the feature at index i in the list of features.
virtual uint32 GetFeatureListLength () const
 Returns the number of features this spec contains.
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.
 gnGenomeSpec (const gnGenomeSpec &s)
 Copy constructor.
 gnGenomeSpec ()
virtual void MergeFragments (const uint32 startC, const uint32 endC)
virtual void RemoveFeature (const uint32 i)
 Remove a feature from this spec.
virtual void SetReverseComplement (const boolean value)
 Sets the reverse complement bit for this spec.
virtual ~gnGenomeSpec ()
 Destructor, frees memory.

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 33 of file gnGenomeSpec.h.


Constructor & Destructor Documentation

gnGenomeSpec::gnGenomeSpec  ) 
 

Definition at line 16 of file gnGenomeSpec.cpp.

References gnBaseSpec::Clear().

Referenced by Clone(), and CloneRange().

gnGenomeSpec::gnGenomeSpec const gnGenomeSpec s  ) 
 

Copy constructor.

Parameters:
s the gnGenomeSpec to copy.
Definition at line 21 of file gnGenomeSpec.cpp.

References gnBaseSpec::m_circular, gnMultiSpec< SubSpec >::m_headerList, gnBaseSpec::m_name, gnBaseSpec::m_reverseComplement, gnMultiSpec< SubSpec >::m_sourceName, gnMultiSpec< SubSpec >::m_SpecList, and uint32.

gnGenomeSpec::~gnGenomeSpec  )  [virtual]
 

Destructor, frees memory.

Definition at line 38 of file gnGenomeSpec.cpp.

References Clear().


Member Function Documentation

uint32 gnGenomeSpec::AddFeature gnBaseFeature feat  )  [virtual]
 

Add a feature to this spec.

Parameters:
feat The feature to add.
Returns:
True if successful

Reimplemented from gnMultiSpec< gnFragmentSpec >.

Definition at line 128 of file gnGenomeSpec.cpp.

References gnFragmentSpec::AddFeature(), gnFragmentSpec::GetFeatureListLength(), gnMultiSpec< SubSpec >::GetLength(), gnMultiSpec< gnFragmentSpec >::GetSpec(), gnMultiSpec< gnFragmentSpec >::GetSpecListLength(), gnBaseFeature::IsContainedBy(), Throw_gnEx, and uint32.

Referenced by gnSequence::addFeature().

void gnGenomeSpec::Clear  )  [virtual]
 

Clears all data from this spec.

Reimplemented from gnMultiSpec< gnFragmentSpec >.

Definition at line 43 of file gnGenomeSpec.cpp.

References gnMultiSpec< SubSpec >::Clear(), and uint32.

Referenced by ~gnGenomeSpec().

gnGenomeSpec * gnGenomeSpec::Clone  )  const [inline, virtual]
 

Implements gnMultiSpec< gnFragmentSpec >.

Definition at line 84 of file gnGenomeSpec.h.

References gnGenomeSpec().

Referenced by gnSequence::assign(), CloneRange(), gnRAWSource::GetSpec(), gnSEQSource::GetSpec(), gnGBKSource::GetSpec(), gnDNXSource::GetSpec(), gnABISource::GetSpec(), gnDNXSource::gnDNXSource(), gnSequence::gnSequence(), gnSequence::insert(), gnSequence::operator=(), 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

Implements gnBaseSpec.

Definition at line 67 of file gnGenomeSpec.cpp.

References gnMultiSpec< SubSpec >::AddSpec(), Clone(), gnFragmentSpec::CloneRange(), gnMultiSpec< SubSpec >::GetLength(), gnMultiSpec< gnFragmentSpec >::GetLength(), gnMultiSpec< gnFragmentSpec >::GetSpec(), gnMultiSpec< gnFragmentSpec >::GetSpecIndexByBase(), gnMultiSpec< gnFragmentSpec >::GetSpecListLength(), gnMultiSpec< gnFragmentSpec >::GetSpecStartBase(), gnGenomeSpec(), gnSeqI, GNSEQI_END, and uint32.

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.

Implements gnMultiSpec< gnFragmentSpec >.

Definition at line 214 of file gnGenomeSpec.cpp.

References gnLocation::CropEnd(), gnFragmentSpec::GetBrokenFeatures(), gnFragmentSpec::GetFeatureListLength(), gnMultiSpec< SubSpec >::GetLength(), gnMultiSpec< gnFragmentSpec >::GetSpec(), gnMultiSpec< gnFragmentSpec >::GetSpecListLength(), gnSeqI, gnLocation::MoveNegative(), and uint32.

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.

Implements gnMultiSpec< gnFragmentSpec >.

Definition at line 171 of file gnGenomeSpec.cpp.

References gnLocation::CropEnd(), gnFragmentSpec::GetContainedFeatures(), gnFragmentSpec::GetFeatureListLength(), gnMultiSpec< SubSpec >::GetLength(), gnMultiSpec< gnFragmentSpec >::GetSpec(), gnMultiSpec< gnFragmentSpec >::GetSpecListLength(), gnSeqI, gnLocation::MoveNegative(), and uint32.

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.

Implements gnMultiSpec< gnFragmentSpec >.

Definition at line 155 of file gnGenomeSpec.cpp.

References gnFragmentSpec::GetFeature(), gnFragmentSpec::GetFeatureListLength(), gnMultiSpec< gnFragmentSpec >::GetSpec(), gnMultiSpec< gnFragmentSpec >::GetSpecListLength(), gnMultiSpec< gnFragmentSpec >::GetSpecStartBase(), gnBaseFeature::MovePositive(), Throw_gnEx, and uint32.

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.

Implements gnMultiSpec< gnFragmentSpec >.

Definition at line 147 of file gnGenomeSpec.cpp.

References gnFragmentSpec::GetFeatureListLength(), gnMultiSpec< gnFragmentSpec >::GetSpec(), gnMultiSpec< gnFragmentSpec >::GetSpecListLength(), and uint32.

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.

Implements gnMultiSpec< gnFragmentSpec >.

Definition at line 193 of file gnGenomeSpec.cpp.

References gnLocation::CropEnd(), gnFragmentSpec::GetFeatureListLength(), gnFragmentSpec::GetIntersectingFeatures(), gnMultiSpec< SubSpec >::GetLength(), gnMultiSpec< gnFragmentSpec >::GetSpec(), gnMultiSpec< gnFragmentSpec >::GetSpecListLength(), gnSeqI, gnLocation::MoveNegative(), and uint32.

Referenced by gnSequence::getIntersectingFeatures().

void gnGenomeSpec::MergeFragments const uint32  startC,
const uint32  endC
[virtual]
 

Definition at line 112 of file gnGenomeSpec.cpp.

References gnMultiSpec< SubSpec >::AddSpec(), gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecListLength(), Throw_gnEx, and uint32.

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

Implements gnMultiSpec< gnFragmentSpec >.

Definition at line 234 of file gnGenomeSpec.cpp.

References gnFragmentSpec::GetFeatureListLength(), gnMultiSpec< gnFragmentSpec >::GetSpec(), gnMultiSpec< gnFragmentSpec >::GetSpecListLength(), gnFragmentSpec::RemoveFeature(), Throw_gnEx, and uint32.

Referenced by gnSequence::removeFeature().

void gnGenomeSpec::SetReverseComplement const boolean  value  )  [virtual]
 

Sets the reverse complement bit for this spec.

Parameters:
value True for reverse complement, false otherwise.

Implements gnBaseSpec.

Definition at line 52 of file gnGenomeSpec.cpp.

References gnMultiSpec< gnFragmentSpec >::GetSpec(), gnMultiSpec< gnFragmentSpec >::GetSpecListLength(), gnBaseSpec::IsReverseComplement(), gnFragmentSpec::SetReverseComplement(), and uint32.

Referenced by gnSequence::setReverseComplement().


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