Package org.biojavax.bio.seq
Interface Position
-
- All Known Implementing Classes:
SimplePosition
public interface PositionHolds info about base positions.- Since:
- 1.5
- Author:
- Richard Holland
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBETWEEN_BASESA symbol representing a position that falls in between two bases, eg.static PositionEMPTY_POSITIONThe empty position lies nowhere.static java.lang.StringIN_RANGEA symbol representing a position that occupies a single base somewhere in a range, eg.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetEnd()Returns the end of the range of bases this base could lie in.booleangetFuzzyEnd()Returns true if the position has a fuzzy end.booleangetFuzzyStart()Returns true if the position has a fuzzy start.intgetStart()Returns the beginning of the range of bases this base could lie in.java.lang.StringgetType()Returns the type of this position if it is not a point/single position.Positiontranslate(int distance)Takes this position and returns a copy translated by 'distance' bases.
-
-
-
Field Detail
-
EMPTY_POSITION
static final Position EMPTY_POSITION
The empty position lies nowhere.
-
BETWEEN_BASES
static final java.lang.String BETWEEN_BASES
A symbol representing a position that falls in between two bases, eg. 2^3 falls somewhere in the gap between 2 and 3.- See Also:
- Constant Field Values
-
IN_RANGE
static final java.lang.String IN_RANGE
A symbol representing a position that occupies a single base somewhere in a range, eg. 5.10 falls on some base between 5 and 10.- See Also:
- Constant Field Values
-
-
Method Detail
-
getFuzzyStart
boolean getFuzzyStart()
Returns true if the position has a fuzzy start.- Returns:
- the fuzziness of the start.
-
getFuzzyEnd
boolean getFuzzyEnd()
Returns true if the position has a fuzzy end.- Returns:
- the fuzziness of the end.
-
getStart
int getStart()
Returns the beginning of the range of bases this base could lie in. If this position is a single position, then start=end.- Returns:
- the start of this position.
-
getEnd
int getEnd()
Returns the end of the range of bases this base could lie in. If this position is a single position, then start=end.- Returns:
- the end of this position.
-
translate
Position translate(int distance)
Takes this position and returns a copy translated by 'distance' bases.- Parameters:
distance- the distance to translate it.- Returns:
- the translated position.
-
getType
java.lang.String getType()
Returns the type of this position if it is not a point/single position. Types are usually BETWEEN_BASES or IN_RANGE but could be any string value.- Returns:
- the type of this position.
-
-