#include <gnBaseFeature.h>
Inheritance diagram for gnBaseFeature::
Public Methods | |
gnBaseFeature () | |
gnBaseFeature (string &name, uint32 id=0, gnFragmentSpec *spec=NULL, gnLocation::gnLocationType lt=gnLocation::LT_Nothing, boolean broken=false) | |
~gnBaseFeature () | |
Destructor, frees memory. More... | |
virtual gnBaseFeature* | Clone () const=0 |
virtual string | GetName () const |
Gets the feature name (e.g. More... | |
virtual void | SetName (const string &name) |
Sets the feature name. More... | |
virtual uint32 | GetID () const |
Gets this feature's ID. More... | |
virtual void | SetID (uint32 id) |
Sets this feature's ID. More... | |
virtual gnFragmentSpec* | GetSpec () const |
Gets the gnFragmentSpec to which this feature refers. More... | |
virtual void | SetSpec (gnFragmentSpec *spec) |
Sets the gnFragmentSpec to which this feature refers. More... | |
virtual gnLocation::gnLocationType | GetLocationType () const |
Gets this feature's location type. More... | |
virtual void | SetLocationType (gnLocation::gnLocationType lType) |
Sets this feature's location type. More... | |
virtual uint32 | GetLocationListLength () const |
Returns the number of locations this feature describes. More... | |
virtual boolean | AddLocation (const gnLocation &l, uint32 listI=0) |
Adds a new location before the location at listI. More... | |
virtual gnLocation | GetLocation (uint32 listI) const |
Gets the location at listI. More... | |
virtual boolean | RemoveLocation (uint32 listI) |
Deletes the location at listI. More... | |
virtual boolean | SetLocation (const gnLocation &l, uint32 listI) |
Sets the location at listI to a new location. More... | |
virtual boolean | MovePositive (const gnSeqI i) |
Increases this feature's coordinates by a specific number of bases. More... | |
virtual boolean | MoveNegative (const gnSeqI i) |
Decreases this feature's coordinates by a specific number of bases. More... | |
virtual boolean | CropStart (const gnSeqI i) |
Crops the start locations of this feature by the specified amount. More... | |
virtual boolean | CropEnd (const gnSeqI i) |
Crops the end locations of this feature by the specified amount. More... | |
virtual boolean | Crop (const gnLocation &l) |
Crops the locations of this feature to fit within the given location. More... | |
virtual boolean | IsBroken () const |
Returns true if the feature is broken. More... | |
virtual void | SetBroken (boolean broke) |
Sets whether the feature is broken or not. More... | |
virtual boolean | Contains (gnSeqI i) const |
Checks if the given coordinate is contained by this feature. More... | |
virtual boolean | Contains (const gnLocation &l) const |
Checks if the given location is contained by this feature. More... | |
virtual boolean | Contains (gnBaseFeature *feature) const |
Checks if the given feature is entirely contained by this feature. More... | |
virtual boolean | IsContainedBy (const gnLocation &l) const |
Checks if this feature is entirely contained by the given location. More... | |
virtual boolean | Intersects (const gnLocation &l) const |
Checks if the given location intersects this feature. More... | |
virtual boolean | Intersects (gnBaseFeature *feature) const |
Checks if the given feature intersects this feature. More... | |
virtual uint32 | GetQualifierListLength () const |
Returns the number of qualifiers in this feature. More... | |
virtual boolean | AddQualifier (gnBaseQualifier *qualifier) |
Adds a new qualifier. More... | |
virtual boolean | HasQualifier (const string &name) const |
Looks for a qualifier by name. More... | |
virtual uint32 | FirstIndexOfQualifier (const string &name, uint32 listI) const |
Searches for a qualifier by name, starting at the index listI. More... | |
virtual uint32 | LastIndexOfQualifier (const string &name, uint32 listI) const |
Searches for a qualifier by name, ending at the index listI. More... | |
virtual string | GetQualifierName (uint32 listI) const |
Gets the name of the qualifier at the list index listI. More... | |
virtual string | GetQualifierValue (uint32 listI) const |
Gets the value of the qualifier at the list index listI. More... | |
virtual gnBaseQualifier* | GetQualifier (uint32 listI) |
Gets the qualifier at the list index listI. More... | |
virtual boolean | RemoveQualifier (uint32 listI) |
Deletes the qualifier at the list index listI. More... | |
virtual boolean | SetQualifier (string &name, string &value, uint32 listI) |
Set the name and value of the qualifier at the list index listI. More... | |
virtual boolean | SetQualifierName (string &name, uint32 listI) |
Set the name of the qualifier at the list index listI. More... | |
virtual boolean | SetQualifierValue (string &value, uint32 listI) |
Set the value of the qualifier at the list index listI. More... | |
Protected Attributes | |
uint32 | m_id |
string | m_name |
boolean | m_broken |
gnLocation::gnLocationType | m_locationType |
vector< gnLocation > | m_locationList |
vector< gnBaseQualifier* > | m_qualifierList |
gnFragmentSpec* | m_spec |
gnBaseFeature outlines a basic interface and gives functionality its derived sequence classes, such as gnCDSFeature.
Definition at line 31 of file gnBaseFeature.h.
|
Definition at line 19 of file gnBaseFeature.cpp. |
|
Definition at line 27 of file gnBaseFeature.cpp. |
|
Destructor, frees memory.
Definition at line 35 of file gnBaseFeature.cpp. |
|
Adds a new location before the location at listI.
Definition at line 185 of file gnBaseFeature.cpp. Referenced by gnSEQSource::ParseStream(), and gnGBKSource::ParseStream().
|
|
Adds a new qualifier.
Definition at line 215 of file gnBaseFeature.cpp. Referenced by gnSEQSource::ParseStream(), and gnGBKSource::ParseStream().
|
|
Reimplemented from gnClone. Reimplemented in gnFeature. Referenced by gnFragmentSpec::GetFeature().
|
|
Checks if the given feature is entirely contained by this feature.
Definition at line 145 of file gnBaseFeature.cpp. |
|
Checks if the given location is contained by this feature.
Definition at line 138 of file gnBaseFeature.cpp. |
|
Checks if the given coordinate is contained by this feature.
Definition at line 130 of file gnBaseFeature.cpp. |
|
Crops the locations of this feature to fit within the given location.
Definition at line 329 of file gnBaseFeature.h. |
|
Crops the end locations of this feature by the specified amount.
Definition at line 59 of file gnBaseFeature.cpp. Referenced by Crop(), and gnFragmentSpec::CropEnd().
|
|
Crops the start locations of this feature by the specified amount.
Definition at line 68 of file gnBaseFeature.cpp. Referenced by Crop(), and gnFragmentSpec::CropStart().
|
|
Searches for a qualifier by name, starting at the index listI.
Definition at line 75 of file gnBaseFeature.cpp. |
|
Gets this feature's ID.
Definition at line 292 of file gnBaseFeature.h. |
|
Gets the location at listI.
Definition at line 193 of file gnBaseFeature.cpp. Referenced by Contains(), Intersects(), gnGBKSource::Write(), and main().
|
|
Returns the number of locations this feature describes.
Definition at line 325 of file gnBaseFeature.h. Referenced by Contains(), Intersects(), gnSEQSource::ParseStream(), gnGBKSource::ParseStream(), gnGBKSource::Write(), and main().
|
|
Gets this feature's location type.
Definition at line 317 of file gnBaseFeature.h. Referenced by gnGBKSource::Write().
|
|
Gets the feature name (e.g. CDS, trna...).
Definition at line 284 of file gnBaseFeature.h. Referenced by SetQualifierValue(), gnGBKSource::Write(), and main().
|
|
Gets the qualifier at the list index listI.
Definition at line 242 of file gnBaseFeature.cpp. Referenced by gnGBKSource::Write().
|
|
Returns the number of qualifiers in this feature.
Definition at line 333 of file gnBaseFeature.h. Referenced by gnGBKSource::Write().
|
|
Gets the name of the qualifier at the list index listI.
Definition at line 230 of file gnBaseFeature.cpp. |
|
Gets the value of the qualifier at the list index listI.
Definition at line 236 of file gnBaseFeature.cpp. Referenced by print_feature().
|
|
Gets the gnFragmentSpec to which this feature refers.
Definition at line 300 of file gnBaseFeature.h. |
|
Looks for a qualifier by name.
Definition at line 223 of file gnBaseFeature.cpp. |
|
Checks if the given feature intersects this feature.
Definition at line 172 of file gnBaseFeature.cpp. |
|
Checks if the given location intersects this feature.
Definition at line 165 of file gnBaseFeature.cpp. Referenced by gnFragmentSpec::GetIntersectingFeatures().
|
|
Returns true if the feature is broken.
Definition at line 308 of file gnBaseFeature.h. Referenced by gnFragmentSpec::GetBrokenFeatures().
|
|
Checks if this feature is entirely contained by the given location.
Definition at line 157 of file gnBaseFeature.cpp. Referenced by gnGenomeSpec::AddFeature(), gnFragmentSpec::GetBrokenFeatures(), and gnFragmentSpec::GetContainedFeatures().
|
|
Searches for a qualifier by name, ending at the index listI.
Definition at line 87 of file gnBaseFeature.cpp. |
|
Decreases this feature's coordinates by a specific number of bases.
Definition at line 50 of file gnBaseFeature.cpp. |
|
Increases this feature's coordinates by a specific number of bases.
Definition at line 42 of file gnBaseFeature.cpp. Referenced by gnGenomeSpec::GetFeature().
|
|
Deletes the location at listI.
Definition at line 199 of file gnBaseFeature.cpp. |
|
Deletes the qualifier at the list index listI.
Definition at line 97 of file gnBaseFeature.cpp. |
|
Sets whether the feature is broken or not.
Definition at line 312 of file gnBaseFeature.h. |
|
Sets this feature's ID.
Definition at line 296 of file gnBaseFeature.h. |
|
Sets the location at listI to a new location.
Definition at line 207 of file gnBaseFeature.cpp. |
|
Sets this feature's location type. LT_BetweenBases is not a valid feature location type.
Definition at line 321 of file gnBaseFeature.h. Referenced by gnSEQSource::ParseStream(), and gnGBKSource::ParseStream().
|
|
Sets the feature name.
Definition at line 288 of file gnBaseFeature.h. |
|
Set the name and value of the qualifier at the list index listI.
Definition at line 104 of file gnBaseFeature.cpp. |
|
Set the name of the qualifier at the list index listI.
Definition at line 111 of file gnBaseFeature.cpp. |
|
Set the value of the qualifier at the list index listI.
Definition at line 120 of file gnBaseFeature.cpp. |
|
Sets the gnFragmentSpec to which this feature refers.
Definition at line 304 of file gnBaseFeature.h. Referenced by gnFragmentSpec::AddFeature().
|
|
Definition at line 276 of file gnBaseFeature.h. |
|
Definition at line 274 of file gnBaseFeature.h. |
|
Definition at line 278 of file gnBaseFeature.h. |
|
Definition at line 277 of file gnBaseFeature.h. |
|
Definition at line 275 of file gnBaseFeature.h. |
|
Definition at line 279 of file gnBaseFeature.h. |
|
Definition at line 280 of file gnBaseFeature.h. |