#include <gnLocation.h>
Inheritance diagram for gnLocation::
Public Types | |
enum | intersectRestriction { determinedRegions, undeterminedRegions, allRegions } |
enum | gnLocationType { LT_Standard, LT_BetweenBases, LT_Complement, LT_Order, LT_Group, LT_OneOf, LT_Nothing } |
Public Methods | |
gnLocation () | |
Empty constructor, does nothing. More... | |
gnLocation (const gnLocation &s) | |
Copy constructor, copies a gnLocation. More... | |
gnLocation (const gnSeqI start, const gnSeqI end, const gnLocationType type=LT_Standard, string contigName="") | |
Constructor, creates a gnLocation. More... | |
gnLocation (const gnSeqI start, const gnSeqI startLength, const gnSeqI end, gnSeqI endLength, const gnLocationType type=LT_Standard, string contigName="") | |
Constructor, creates a gnLocation. More... | |
gnLocation* | Clone () const |
void | Clear () |
Resets this location to default values. More... | |
boolean | CropTo (const gnLocation &l) |
Crops this location to fit within the specified location boundaries. More... | |
boolean | CropStart (const gnSeqI start) |
Crops the start location by the specified amount. More... | |
boolean | CropEnd (const gnSeqI end) |
Crops the end location by the specified amount. More... | |
boolean | Intersects (const gnLocation &l, const intersectRestriction ir=allRegions) const |
Returns true if the given location intersects this location in the region specified by the parameter "ir". More... | |
boolean | Contains (const gnLocation &l, const intersectRestriction cr=allRegions) const |
Crops the end location by the specified amount. More... | |
boolean | MovePositive (const gnSeqI diff) |
Increases the location start and end. More... | |
boolean | MoveNegative (const gnSeqI diff) |
Decreases the location start and end. More... | |
boolean | MoveTo (const int direction, const gnSeqI diff) |
Moves the location start and end. More... | |
gnSeqI | GetEnd () const |
Gets the ending base pair. More... | |
gnSeqI | GetEndLength () const |
Gets the ending base pair's definition value. More... | |
gnSeqI | GetLast () const |
gnSeqI | GetStart () const |
Gets the starting base pair. More... | |
gnSeqI | GetStartLength () const |
Gets the starting base pair's definition value. More... | |
gnSeqI | GetFirst () const |
gnLocationType | GetType () const |
Gets the location type. More... | |
void | GetBounds (gnSeqI &s, gnSeqI &sl, gnSeqI &e, gnSeqI &el) const |
Gets the location's boundaries. More... | |
bool | IsEndBoundLonger () const |
Returns true if the end is unbounded to the right. More... | |
bool | IsStartBoundLonger () const |
Returns true if the start is unbounded to the right. More... | |
bool | IsEndBoundShorter () const |
Returns true if the end is unbounded to the left. More... | |
bool | IsStartBoundShorter () const |
Returns true if the start is unbounded to the left. More... | |
void | SetEnd (const gnSeqI end) |
Sets the end location. More... | |
void | SetEnd (const gnSeqI end, const gnSeqI endLength) |
Sets the end location and definition. More... | |
void | SetEndLength (const gnSeqI endLength) |
Sets the end definition. More... | |
void | SetStart (const gnSeqI start) |
Sets the start location/. More... | |
void | SetStart (const gnSeqI start, const gnSeqI startLength) |
Sets the start location and definition. More... | |
void | SetStartLength (const gnSeqI startLength) |
Sets the start definition. More... | |
void | SetType (const gnLocationType lt) |
Sets the location type. More... | |
void | SetBounds (const gnSeqI start, const gnSeqI startLength, const gnSeqI end, const gnSeqI endLength) |
Sets the location's boundaries. More... | |
void | SetBounds (const gnSeqI start, const gnSeqI end) |
Sets the location's boundaries. More... | |
gnLocation | GetUnion (const gnLocation &l) const |
gnLocation | GetIntersection (const gnLocation &l, const intersectRestriction ir) const |
Static Public Attributes | |
const gnSeqI | Defined = 0 |
const gnSeqI | Unknown = GNSEQI_END |
Private Attributes | |
string | m_name |
gnSeqI | m_start |
gnSeqI | m_startLength |
gnSeqI | m_end |
gnSeqI | m_endLength |
gnLocationType | m_type |
gnBaseFeature uses it to track feature locations. gnLocation is capable of representing any GenBank style location qualifier. gnLocation stores the start coordinate and a startLength value which represents the length of an undetermined region of sequence prior to the starting coordinate. A startLength of GNSEQI_END represents an unknown start, whereas a startLength of 0 implies that the start coordinate is unambiguous. Any value other value indicates a range of coordinates for the starting position. The range is bounded by the given start coordinate and extends startLength characters upstream. Likewise, an endLength of GNSEQI_END represents an unknown ambiguous end coordinate, and an endLength of 0 implies that the end coordinate is unambiguous. Any other value for endLength denotes a range of ending coordinates starting at end and continuing for endLength characters.
Definition at line 37 of file gnLocation.h.
|
Definition at line 46 of file gnLocation.h. |
|
Definition at line 40 of file gnLocation.h. |
|
Empty constructor, does nothing.
Definition at line 16 of file gnLocation.cpp. Referenced by Clone().
|
|
Copy constructor, copies a gnLocation.
Definition at line 20 of file gnLocation.cpp. |
|
Constructor, creates a gnLocation.
Definition at line 31 of file gnLocation.cpp. |
|
Constructor, creates a gnLocation.
Definition at line 25 of file gnLocation.cpp. |
|
Resets this location to default values.
Definition at line 43 of file gnLocation.cpp. Referenced by CropTo(), and gnLocation().
|
|
Reimplemented from gnClone. Definition at line 38 of file gnLocation.cpp. |
|
Crops the end location by the specified amount.
Definition at line 166 of file gnLocation.cpp. Referenced by gnBaseFeature::Contains(), and gnBaseFeature::IsContainedBy().
|
|
Crops the end location by the specified amount.
Definition at line 131 of file gnLocation.cpp. Referenced by gnBaseFeature::CropEnd(), gnGenomeSpec::GetBrokenFeatures(), gnGenomeSpec::GetContainedFeatures(), and gnGenomeSpec::GetIntersectingFeatures().
|
|
Crops the start location by the specified amount.
Definition at line 119 of file gnLocation.cpp. Referenced by gnBaseFeature::CropStart().
|
|
Crops this location to fit within the specified location boundaries.
Definition at line 72 of file gnLocation.cpp. |
|
Gets the location's boundaries.
Definition at line 53 of file gnLocation.cpp. |
|
Gets the ending base pair.
Definition at line 275 of file gnLocation.h. Referenced by gnBaseFeature::Contains(), gnBaseFeature::Crop(), CropTo(), LocationEndLessthan(), LocationSizeLessthan(), and gnGBKSource::Write().
|
|
Gets the ending base pair's definition value.
Definition at line 280 of file gnLocation.h. |
|
Definition at line 301 of file gnLocation.h. Referenced by Contains(), CropTo(), GetIntersection(), and Intersects().
|
|
Definition at line 207 of file gnLocation.cpp. |
|
Definition at line 285 of file gnLocation.h. Referenced by Contains(), CropTo(), GetIntersection(), and Intersects().
|
|
Gets the starting base pair.
Definition at line 291 of file gnLocation.h. Referenced by gnBaseFeature::Contains(), gnBaseFeature::Crop(), CropTo(), LocationEndLessthan(), LocationLessthan(), LocationSizeLessthan(), gnGBKSource::Write(), and loc_binary_search().
|
|
Gets the starting base pair's definition value.
Definition at line 296 of file gnLocation.h. |
|
Gets the location type.
Definition at line 307 of file gnLocation.h. Referenced by gnGBKSource::Write().
|
|
Definition at line 200 of file gnLocation.cpp. |
|
Returns true if the given location intersects this location in the region specified by the parameter "ir".
Definition at line 144 of file gnLocation.cpp. Referenced by gnBaseFeature::Intersects().
|
|
Returns true if the end is unbounded to the right.
Definition at line 313 of file gnLocation.h. Referenced by gnGBKSource::Write().
|
|
Returns true if the end is unbounded to the left.
Definition at line 323 of file gnLocation.h. Referenced by gnGBKSource::Write().
|
|
Returns true if the start is unbounded to the right.
Definition at line 318 of file gnLocation.h. Referenced by gnGBKSource::Write().
|
|
Returns true if the start is unbounded to the left.
Definition at line 328 of file gnLocation.h. Referenced by gnGBKSource::Write().
|
|
Decreases the location start and end.
Definition at line 185 of file gnLocation.cpp. Referenced by gnGenomeSpec::GetBrokenFeatures(), gnGenomeSpec::GetContainedFeatures(), gnGenomeSpec::GetIntersectingFeatures(), gnBaseFeature::MoveNegative(), and MoveTo().
|
|
Increases the location start and end.
Definition at line 177 of file gnLocation.cpp. Referenced by gnBaseFeature::MovePositive(), and MoveTo().
|
|
Moves the location start and end.
Definition at line 193 of file gnLocation.cpp. |
|
Sets the location's boundaries.
Definition at line 66 of file gnLocation.cpp. |
|
Sets the location's boundaries.
Definition at line 61 of file gnLocation.cpp. Referenced by gnLocation().
|
|
Sets the end location and definition.
Definition at line 339 of file gnLocation.h. |
|
Sets the end location.
Definition at line 334 of file gnLocation.h. Referenced by gnFragmentSpec::CloneRange(), ComplementLocation(), and SetBounds().
|
|
Sets the end definition.
Definition at line 345 of file gnLocation.h. |
|
Sets the start location and definition.
Definition at line 355 of file gnLocation.h. |
|
Sets the start location/.
Definition at line 350 of file gnLocation.h. Referenced by gnFragmentSpec::CloneRange(), ComplementLocation(), and SetBounds().
|
|
Sets the start definition.
Definition at line 361 of file gnLocation.h. |
|
Sets the location type.
Definition at line 367 of file gnLocation.h. |
|
Definition at line 56 of file gnLocation.h. |
|
Definition at line 57 of file gnLocation.h. |
|
Definition at line 266 of file gnLocation.h. |
|
Definition at line 267 of file gnLocation.h. |
|
Definition at line 263 of file gnLocation.h. |
|
Definition at line 264 of file gnLocation.h. |
|
Definition at line 265 of file gnLocation.h. |
|
Definition at line 269 of file gnLocation.h. |