#include <gnMultiSpec.h>
Inheritance diagram for gnMultiSpec< SubSpec >:
Public Member Functions | |
uint32 | AddFeature (gnBaseFeature *feat) |
Add a feature to this spec. | |
virtual void | AddHeader (gnBaseHeader *head, const uint32 i=UINT32_MAX) |
Add a header to this spec, adds to the end of the header list by default. | |
virtual void | AddSpec (SubSpec *spec, const uint32 i=UINT32_MAX) |
Add a subspec to this spec. | |
virtual void | Clear () |
Clears all data from this spec. | |
virtual gnMultiSpec * | Clone () const =0 |
virtual void | CropEnd (gnSeqI cropLen) |
Crop the last cropLen bases from the sequence. | |
virtual void | CropStart (gnSeqI cropLen) |
Crop the first cropLen bases from the sequence. | |
virtual void | GetBrokenFeatures (const gnLocation <, vector< gnBaseFeature * > &feature_vector) const =0 |
Creates a list of features which may have been broken by an edit. | |
virtual void | GetContainedFeatures (const gnLocation <, vector< gnBaseFeature * > &feature_vector, vector< uint32 > &index_vector) const =0 |
Creates a list of all features which are contained by coordinates specified. | |
virtual gnBaseFeature * | GetFeature (const uint32 i) const =0 |
Get the feature at index i in the list of features. | |
virtual uint32 | GetFeatureListLength () const =0 |
Returns the number of features this spec contains. | |
virtual gnBaseHeader * | GetHeader (const string &name, uint32 &i) const |
Find the first header with the specified name, starting at index i. | |
virtual gnBaseHeader * | GetHeader (const uint32 i) const |
Get the headers at index i in the list of headers. | |
virtual uint32 | GetHeaderListLength () const |
Returns the number of headers this spec contains. | |
virtual void | GetIntersectingFeatures (const gnLocation <, vector< gnBaseFeature * > &feature_vector, vector< uint32 > &index_vector) const =0 |
Creates a list of all features which intersect the coordinates specified. | |
virtual gnSeqI | GetLength () const |
Get the length of all the sequence data covered by this spec. | |
virtual string | GetSourceName () const |
virtual SubSpec * | GetSpec (const uint32 i) const |
Get the spec at index i in the list of subspecs. | |
virtual SubSpec * | GetSpecByBase (const gnSeqI baseI) const |
Get the spec from the list of subspecs which contains the specified base pair. | |
virtual gnSeqI | GetSpecEndBase (const uint32 specI) const |
Get the ending base pair, in this spec's sequence, of the given subspec. | |
virtual uint32 | GetSpecIndexByBase (const gnSeqI baseI) const |
Get the index of the subspec which contains the specified base pair. | |
virtual uint32 | GetSpecIndexByName (const string &name) const |
Get the index of the spec which has the given name. | |
virtual uint32 | GetSpecListLength () const |
Returns the number of subspecs this spec contains. | |
virtual gnSeqI | GetSpecStartBase (const uint32 specI) const |
Get the starting base pair, in this spec's sequence, of the given subspec. | |
gnMultiSpec () | |
virtual void | RemoveFeature (const uint32 i)=0 |
Remove a feature from this spec. | |
virtual void | RemoveHeader (uint32 i) |
Remove a header from this spec. | |
virtual void | RemoveSpec (uint32 i) |
Remove a subspec from this spec. | |
virtual boolean | SeqRead (const gnSeqI start, gnSeqC *buf, gnSeqI &bufLen, const uint32 contigI) const |
Reads sequence data from this spec. | |
virtual void | SetSourceName (const string &sourceName) |
virtual | ~gnMultiSpec () |
Destructor, frees memory. | |
Protected Attributes | |
vector< gnBaseHeader * > | m_headerList |
string | m_sourceName |
vector< SubSpec * > | m_SpecList |
Definition at line 31 of file gnMultiSpec.h.
|
Definition at line 34 of file gnMultiSpec.h. |
|
Destructor, frees memory. Definition at line 38 of file gnMultiSpec.h. |
|
Add a feature to this spec.
Reimplemented in gnFragmentSpec, and gnGenomeSpec.
|
|
Add a header to this spec, adds to the end of the header list by default.
References gnMultiSpec< SubSpec >::m_headerList, uint32, and UINT32_MAX. Referenced by gnSequence::addHeader(), gnFASSource::GetSpec(), gnSEQSource::ParseStream(), and gnGBKSource::ParseStream(). |
|
Add a subspec to this spec. Throws an exception if the insertion index i is out of range
References gnMultiSpec< SubSpec >::m_SpecList, uint32, and UINT32_MAX. Referenced by gnGenomeSpec::CloneRange(), gnFragmentSpec::CloneRange(), gnFASSource::GetSpec(), gnSequence::gnSequence(), gnSequence::insert(), gnGenomeSpec::MergeFragments(), gnSEQSource::ParseStream(), gnRAWSource::ParseStream(), gnGBKSource::ParseStream(), and gnDNXSource::ParseStream(). |
|
Clears all data from this spec.
Reimplemented from gnBaseSpec.
Reimplemented in gnFragmentSpec, and gnGenomeSpec. Definition at line 256 of file gnMultiSpec.h. References gnBaseSpec::Clear(), gnMultiSpec< SubSpec >::m_headerList, and uint32. Referenced by gnGenomeSpec::Clear(), and gnFragmentSpec::Clear(). |
|
Implements gnBaseSpec.
Implemented in gnFragmentSpec, and gnGenomeSpec.
|
|
Crop the last cropLen bases from the sequence. CropEnd will delete features and headers associated with the cropped bases.
Implements gnBaseSpec.
Reimplemented in gnFragmentSpec. Definition at line 344 of file gnMultiSpec.h. References gnMultiSpec< SubSpec >::GetLength(), gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecListLength(), gnSeqI, gnMultiSpec< SubSpec >::RemoveSpec(), and uint32. Referenced by gnFragmentSpec::CropEnd(), gnSequence::erase(), gnSequence::insert(), and gnSequence::splitContig(). |
|
Crop the first cropLen bases from the sequence. CropStart will delete features and headers associated with the cropped bases.
Implements gnBaseSpec.
Reimplemented in gnFragmentSpec. Definition at line 324 of file gnMultiSpec.h. References gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecListLength(), gnSeqI, gnMultiSpec< SubSpec >::RemoveSpec(), and uint32. Referenced by gnFragmentSpec::CropStart(), gnSequence::insert(), and gnSequence::splitContig(). |
|
Creates a list of features which may have been broken by an edit.
Implemented in gnFragmentSpec, and gnGenomeSpec.
|
|
Creates a list of all features which are contained by coordinates specified.
Implemented in gnFragmentSpec, and gnGenomeSpec.
|
|
Get the feature at index i in the list of features.
Implemented in gnFragmentSpec, and gnGenomeSpec.
|
|
Returns the number of features this spec contains.
Implemented in gnFragmentSpec, and gnGenomeSpec.
|
|
Find the first header with the specified name, starting at index i.
References gnMultiSpec< SubSpec >::m_headerList, Throw_gnEx, and uint32. |
|
Get the headers at index i in the list of headers. Throws a HeaderIndexOutOfBounds exception if a nonexistant header is referenced
References gnMultiSpec< SubSpec >::m_headerList, and uint32. Referenced by gnSequence::getHeader(), gnGBKSource::Write(), gnFASSource::Write(), gnDNXSource::Write(), and WriteHeader(). |
|
Returns the number of headers this spec contains.
References uint32. Referenced by gnSequence::getHeaderListLength(), gnSEQSource::ParseStream(), gnGBKSource::ParseStream(), and gnGBKSource::Write(). |
|
Creates a list of all features which intersect the coordinates specified.
Implemented in gnFragmentSpec, and gnGenomeSpec.
|
|
Get the length of all the sequence data covered by this spec.
Implements gnBaseSpec. Definition at line 266 of file gnMultiSpec.h. References gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecListLength(), gnSeqI, and uint32. Referenced by gnGenomeSpec::AddFeature(), gnGenomeSpec::CloneRange(), gnSequence::contigLength(), gnMultiSpec< SubSpec >::CropEnd(), gnSequence::erase(), gnGenomeSpec::GetBrokenFeatures(), gnGenomeSpec::GetContainedFeatures(), gnSEQSource::GetContigSeqLength(), gnGBKSource::GetContigSeqLength(), gnDNXSource::GetContigSeqLength(), gnGenomeSpec::GetIntersectingFeatures(), gnSequence::insert(), gnSequence::length(), gnSequence::size(), and gnGBKSource::Write(). |
|
Definition at line 213 of file gnMultiSpec.h. References gnMultiSpec< SubSpec >::m_sourceName. Referenced by gnDNXSource::Write(). |
|
|
Get the spec from the list of subspecs which contains the specified base pair.
References gnMultiSpec< SubSpec >::GetSpecIndexByBase(), gnSeqI, and gnMultiSpec< SubSpec >::m_SpecList. Referenced by gnSequence::contigByBase(). |
|
Get the ending base pair, in this spec's sequence, of the given subspec.
References gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecListLength(), gnSeqI, Throw_gnEx, and uint32. |
|
Get the index of the subspec which contains the specified base pair.
References gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecListLength(), gnSeqI, Throw_gnEx, and uint32. Referenced by gnSequence::contigIndexByBase(), gnMultiSpec< SubSpec >::GetSpecByBase(), and gnSequence::globalToSource(). |
|
Get the index of the spec which has the given name.
References gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecListLength(), Throw_gnEx, and uint32. Referenced by gnSequence::contigByName(), and gnSequence::contigIndexByName(). |
|
Returns the number of subspecs this spec contains.
References gnMultiSpec< SubSpec >::m_SpecList, and uint32. Referenced by gnSequence::contigListLength(), gnSequence::contigListSize(), gnMultiSpec< SubSpec >::CropEnd(), gnMultiSpec< SubSpec >::CropStart(), gnDNXSource::GetContigID(), gnDNXSource::GetContigListLength(), gnDNXSource::GetContigName(), gnDNXSource::GetContigSeqLength(), gnMultiSpec< SubSpec >::GetLength(), gnMultiSpec< SubSpec >::GetSpecEndBase(), gnMultiSpec< SubSpec >::GetSpecIndexByBase(), gnMultiSpec< SubSpec >::GetSpecIndexByName(), gnMultiSpec< SubSpec >::GetSpecStartBase(), gnDNXSource::HasContig(), gnSequence::insert(), gnGenomeSpec::MergeFragments(), gnSEQSource::ParseStream(), gnGBKSource::ParseStream(), gnDNXSource::ParseStream(), gnMultiSpec< SubSpec >::RemoveSpec(), gnMultiSpec< SubSpec >::SeqRead(), gnGBKSource::Write(), and gnDNXSource::Write(). |
|
Get the starting base pair, in this spec's sequence, of the given subspec.
References gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecListLength(), gnSeqI, Throw_gnEx, and uint32. Referenced by gnSequence::contigStart(), and gnSequence::globalToSource(). |
|
Remove a feature from this spec.
Implemented in gnFragmentSpec, and gnGenomeSpec.
|
|
Remove a header from this spec. Throws a HeaderIndexOutOfBounds exception if a nonexistant header is referenced
References gnMultiSpec< SubSpec >::m_headerList, Throw_gnEx, and uint32. Referenced by gnSequence::removeHeader(). |
|
Remove a subspec from this spec.
References gnMultiSpec< SubSpec >::GetSpecListLength(), gnMultiSpec< SubSpec >::m_SpecList, and uint32. Referenced by gnMultiSpec< SubSpec >::CropEnd(), gnMultiSpec< SubSpec >::CropStart(), gnSEQSource::ParseStream(), and gnGBKSource::ParseStream(). |
|
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.
Implements gnBaseSpec. Definition at line 391 of file gnMultiSpec.h. References gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecListLength(), gnSeqC, gnSeqI, Throw_gnEx, and uint32. Referenced by gnSequence::GetSeqC(), gnDNXSource::SeqRead(), gnSequence::ToArray(), and gnSequence::ToString(). |
|
Definition at line 219 of file gnMultiSpec.h. References gnMultiSpec< SubSpec >::m_sourceName. Referenced by gnFASSource::GetSpec(), and gnDNXSource::ParseStream(). |
|
Definition at line 189 of file gnMultiSpec.h. Referenced by gnMultiSpec< SubSpec >::AddHeader(), gnMultiSpec< SubSpec >::Clear(), gnMultiSpec< SubSpec >::GetHeader(), gnFragmentSpec::gnFragmentSpec(), gnGenomeSpec::gnGenomeSpec(), and gnMultiSpec< SubSpec >::RemoveHeader(). |
|
Reimplemented from gnBaseSpec. Definition at line 186 of file gnMultiSpec.h. Referenced by gnMultiSpec< SubSpec >::GetSourceName(), gnFragmentSpec::gnFragmentSpec(), gnGenomeSpec::gnGenomeSpec(), and gnMultiSpec< SubSpec >::SetSourceName(). |
|
Definition at line 188 of file gnMultiSpec.h. Referenced by gnMultiSpec< SubSpec >::AddSpec(), gnMultiSpec< SubSpec >::GetSpec(), gnMultiSpec< SubSpec >::GetSpecByBase(), gnMultiSpec< SubSpec >::GetSpecListLength(), gnFragmentSpec::gnFragmentSpec(), gnGenomeSpec::gnGenomeSpec(), and gnMultiSpec< SubSpec >::RemoveSpec(). |