Google

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

gnFragmentSpec Class Reference

gnFragmentSpec contains a list of specs which make up a sequence fragment. More...

#include <gnFragmentSpec.h>

Inheritance diagram for gnFragmentSpec::

gnMultiSpec gnBaseSpec gnClone List of all members.

Public Methods

 gnFragmentSpec ()
virtual ~gnFragmentSpec ()
 Destructor, frees memory. More...

 gnFragmentSpec (const gnFragmentSpec &s)
 Copy constructor. More...

virtual gnFragmentSpec* 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 gnContigSpecGetSpec (const uint32 i) const
 Get the spec at index i in the list of subspecs. More...

virtual gnContigSpecGetSpecByBase (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 CropStart (gnSeqI cropLen)
 Crop the first cropLen bases from the sequence. More...

virtual void CropEnd (gnSeqI cropLen)
 Crop the last cropLen bases from the sequence. More...

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 gnBaseFeatureGetFeature (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 gnFragmentSpec* CloneRange (const gnSeqI startI, const gnSeqI len) const
 Copies a specified range of bases and returns a pointer to the resulting gnFragmentSpec. More...


Protected Attributes

vector<gnContigSpec*> m_SpecList
vector<gnBaseFeature*> m_featureList

Detailed Description

gnFragmentSpec contains a list of specs which make up a sequence fragment.

It also contains a list of features which relate to the sequence fragment. Finally it contains a list of sequence related header data. This class is usually created and filled by a file reader class like gnGBKSource.

Definition at line 35 of file gnFragmentSpec.h.


Constructor & Destructor Documentation

gnFragmentSpec::gnFragmentSpec ( )
 

Definition at line 17 of file gnFragmentSpec.cpp.

Referenced by Clone(), and CloneRange().

gnFragmentSpec::~gnFragmentSpec ( ) [virtual]
 

Destructor, frees memory.

Definition at line 45 of file gnFragmentSpec.cpp.

gnFragmentSpec::gnFragmentSpec ( const gnFragmentSpec & s )
 

Copy constructor.

Parameters:
s   the gnGenomeSpec to copy.

Definition at line 22 of file gnFragmentSpec.cpp.


Member Function Documentation

uint32 gnFragmentSpec::AddFeature ( gnBaseFeature * feat ) [inline, 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 126 of file gnFragmentSpec.h.

Referenced by gnGenomeSpec::AddFeature(), gnSEQSource::ParseStream(), and gnGBKSource::ParseStream().

void gnFragmentSpec::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 110 of file gnFragmentSpec.h.

Referenced by CloneRange(), gnFASSource::GetSpec(), gnGenomeSpec::MergeFragments(), gnSEQSource::ParseStream(), gnRAWSource::ParseStream(), gnGBKSource::ParseStream(), gnDNXSource::ParseStream(), and gnSequence::gnSequence().

void gnFragmentSpec::Clear ( ) [virtual]
 

Clears all data from this spec.

Reimplemented from gnMultiSpec.

Definition at line 50 of file gnFragmentSpec.cpp.

Referenced by gnFragmentSpec(), and ~gnFragmentSpec().

gnFragmentSpec * gnFragmentSpec::Clone ( ) const [inline, virtual]
 

Reimplemented from gnMultiSpec.

Definition at line 88 of file gnFragmentSpec.h.

Referenced by gnGenomeSpec::CloneRange(), GetBrokenFeatures(), GetContainedFeatures(), GetIntersectingFeatures(), gnFragmentSpec(), gnSequence::gnSequence(), and gnSequence::insert().

gnFragmentSpec * gnFragmentSpec::CloneRange ( const gnSeqI startI,
const gnSeqI len ) const [virtual]
 

Copies a specified range of bases and returns a pointer to the resulting gnFragmentSpec.

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 gnFragmentSpec containing only the specified bases

Definition at line 100 of file gnFragmentSpec.cpp.

Referenced by gnGenomeSpec::CloneRange().

void gnFragmentSpec::CropEnd ( gnSeqI cropLen ) [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.

Reimplemented from gnMultiSpec.

Definition at line 92 of file gnFragmentSpec.cpp.

void gnFragmentSpec::CropStart ( gnSeqI cropLen ) [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.

Reimplemented from gnMultiSpec.

Definition at line 84 of file gnFragmentSpec.cpp.

void gnFragmentSpec::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 77 of file gnFragmentSpec.cpp.

Referenced by gnGenomeSpec::GetBrokenFeatures().

void gnFragmentSpec::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 63 of file gnFragmentSpec.cpp.

Referenced by gnGenomeSpec::GetContainedFeatures().

gnBaseFeature * gnFragmentSpec::GetFeature ( const uint32 i ) const [inline, 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 138 of file gnFragmentSpec.h.

Referenced by gnGenomeSpec::GetFeature(), and gnGBKSource::Write().

uint32 gnFragmentSpec::GetFeatureListLength ( ) const [inline, virtual]
 

Returns the number of features this spec contains.

Returns:
The number of features this spec contains.

Reimplemented from gnMultiSpec.

Definition at line 133 of file gnFragmentSpec.h.

Referenced by gnGenomeSpec::AddFeature(), gnGenomeSpec::GetBrokenFeatures(), gnGenomeSpec::GetContainedFeatures(), gnGenomeSpec::GetFeature(), gnGenomeSpec::GetFeatureListLength(), gnGenomeSpec::GetIntersectingFeatures(), gnSEQSource::ParseStream(), gnGBKSource::ParseStream(), and gnGenomeSpec::RemoveFeature().

void gnFragmentSpec::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 70 of file gnFragmentSpec.cpp.

Referenced by CloneRange(), and gnGenomeSpec::GetIntersectingFeatures().

gnContigSpec * gnFragmentSpec::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 98 of file gnFragmentSpec.h.

Referenced by CloneRange(), gnGenomeSpec::MergeFragments(), SetReverseComplement(), gnDNXSource::Write(), and gnSequence::globalToSource().

gnContigSpec * gnFragmentSpec::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 105 of file gnFragmentSpec.h.

uint32 gnFragmentSpec::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 93 of file gnFragmentSpec.h.

Referenced by CloneRange(), gnDNXSource::ParseStream(), SetReverseComplement(), and gnDNXSource::Write().

void gnFragmentSpec::RemoveFeature ( const uint32 i ) [inline, 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 143 of file gnFragmentSpec.h.

Referenced by gnGenomeSpec::RemoveFeature().

void gnFragmentSpec::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 118 of file gnFragmentSpec.h.

void gnFragmentSpec::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 152 of file gnFragmentSpec.cpp.

Referenced by gnGenomeSpec::SetReverseComplement(), and gnSequence::setReverseComplement().


Member Data Documentation

vector< gnContigSpec *> gnFragmentSpec::m_SpecList<gnContigSpec*> [protected]
 

Definition at line 81 of file gnFragmentSpec.h.

vector< gnBaseFeature *> gnFragmentSpec::m_featureList<gnBaseFeature*> [protected]
 

Definition at line 83 of file gnFragmentSpec.h.


The documentation for this class was generated from the following files:
Generated at Fri Nov 30 15:36:55 2001 for libGenome by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001