Interface Location
-
- All Superinterfaces:
Accessioned
,java.lang.Iterable<Location>
- All Known Subinterfaces:
AccesionedLocation
- All Known Implementing Classes:
AbstractLocation
,InsdcLocations.BondLocation
,InsdcLocations.GroupLocation
,InsdcLocations.OneOfLocation
,InsdcLocations.OrderLocation
,SequenceLocation
,SimpleLocation
public interface Location extends java.lang.Iterable<Location>, Accessioned
Sets of integers used to represent the location of features on sequence. A location can be a single set of bounds or composed of multiple sub-locations. Each sub-location is a Location and therefore subject to the same rules.- Author:
- ayates
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Location.Tools
Helper methods for use with the Location classes.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Point
getEnd()
End of the locationint
getLength()
Returns the length of the outer bounds of this locationjava.util.List<Location>
getRelevantSubLocations()
An extension togetSubLocations()
which returns sub-locations of sub-locations; this will continue until it runs out of those locations.<C extends Compound>
Sequence<C>getRelevantSubSequence(Sequence<C> sequence)
Will return a SequenceReader object which offers a view of all resolved locations i.e.Point
getStart()
Start of the locationStrand
getStrand()
Strand which the location is located onjava.util.List<Location>
getSubLocations()
Gives access to the sub locations for this location.<C extends Compound>
Sequence<C>getSubSequence(Sequence<C> sequence)
Will return a SequenceReader object which represents the outer bounds of this Locationboolean
isBetweenCompounds()
Returns true if the position is meant to represent a point between two points such as 78^79.boolean
isCircular()
Indicates if this location is circular.boolean
isComplex()
Returns true if the location is considered to be complex meaning the location is actually composed of sub-locations.-
Methods inherited from interface org.biojava.nbio.core.sequence.template.Accessioned
getAccession
-
-
-
-
Field Detail
-
EMPTY
static final Location EMPTY
Basic location which is set to the minimum and maximum bounds ofInteger
.Strand
is set toStrand.UNDEFINED
.
-
-
Method Detail
-
getStart
Point getStart()
Start of the location
-
getEnd
Point getEnd()
End of the location
-
getLength
int getLength()
Returns the length of the outer bounds of this location
-
getStrand
Strand getStrand()
Strand which the location is located on
-
getSubLocations
java.util.List<Location> getSubLocations()
Gives access to the sub locations for this location. However this does not return sub-locations of sub-locations. For that functionality use#getAllSubLocations()
.- Returns:
- A list of a single level of sub-locations
-
getRelevantSubLocations
java.util.List<Location> getRelevantSubLocations()
An extension togetSubLocations()
which returns sub-locations of sub-locations; this will continue until it runs out of those locations.- Returns:
- List of all sub locations including sub-locations of sub locations
-
isComplex
boolean isComplex()
Returns true if the location is considered to be complex meaning the location is actually composed of sub-locations.
-
isCircular
boolean isCircular()
Indicates if this location is circular.
-
isBetweenCompounds
boolean isBetweenCompounds()
Returns true if the position is meant to represent a point between two points such as 78^79. Only valid if start and stop are next to each other.
-
getSubSequence
<C extends Compound> Sequence<C> getSubSequence(Sequence<C> sequence)
Will return a SequenceReader object which represents the outer bounds of this Location- Parameters:
sequence
- The sequence object to work with- Returns:
- The sequence
-
getRelevantSubSequence
<C extends Compound> Sequence<C> getRelevantSubSequence(Sequence<C> sequence)
Will return a SequenceReader object which offers a view of all resolved locations i.e. those locations which are not complex and define the true Sequence represented- Parameters:
sequence
- The sequence object to work with- Returns:
- The full assembled sequence
-
-