public class LocationHelper extends Object
Constructor and Description |
---|
LocationHelper() |
Modifier and Type | Method and Description |
---|---|
static Location |
circularLocation(int start,
int end,
Strand strand,
int length)
Converts a location which defines the outer bounds of a circular
location and splits it into the required portions.
|
static int |
completeCircularPasses(int index,
int seqLength)
Works in a similar way to modulateCircularLocation but returns
the number of complete passes over a Sequence length a circular
location makes i.e.
|
static boolean |
consistentAccessions(List<Location> subLocations)
Scans a list of locations and returns true if all the given locations
are linked to the same sequence.
|
static boolean |
detectCicular(List<Location> subLocations)
Loops through the given list of locations and returns true if it looks
like they represent a circular location.
|
static Point |
detectEnd(List<Location> subLocations,
boolean isCircular)
This will attempt to find what the last point is and returns that
position.
|
static Point |
detectStart(List<Location> subLocations)
Assumes that the first element is the start & clones it
|
static Strand |
detectStrand(List<Location> subLocations)
Loops through the given list of locations and returns the consensus
Strand class.
|
static Location |
getMax(List<Location> locations)
Scans through a list of locations to find the Location with the
highest end
|
static Location |
getMin(List<Location> locations)
Scans through a list of locations to find the Location with the
lowest start
|
static Location |
location(int start,
int end,
Strand strand,
int length)
Returns a location object which unlike the location constructors
allows you to input reverse coordinates and will convert
these into the right location on the positive strand.
|
static Location |
location(List<Location> subLocations)
Used as a thin wrapper to the
location(java.util.List, java.lang.String)
method to bring the given location list together as a join (the default
type) |
static Location |
location(List<Location> subLocations,
String type)
Builds a location from a List of locations; this can be circular or
linear joins.
|
static int |
modulateCircularIndex(int index,
int seqLength)
Takes a point on a circular location and moves it left until it falls
at the earliest possible point that represents the same base.
|
public static Location location(List<Location> subLocations)
location(java.util.List, java.lang.String)
method to bring the given location list together as a join (the default
type)public static Location location(List<Location> subLocations, String type)
subLocations
- The list of locations to use to build the location.
If given a list of size 1 we will return that location.type
- The type of join for this location; defaults to joinpublic static Location location(int start, int end, Strand strand, int length)
public static Location circularLocation(int start, int end, Strand strand, int length)
location
- The location which currently expresses the outer
bounds of a circular location.length
- The length of the circular genomic unitpublic static Location getMin(List<Location> locations)
public static Location getMax(List<Location> locations)
public static int modulateCircularIndex(int index, int seqLength)
index
- Index of the position to work withseqLength
- Length of the Sequencepublic static int completeCircularPasses(int index, int seqLength)
public static boolean detectCicular(List<Location> subLocations)
public static boolean consistentAccessions(List<Location> subLocations)
subLocations
- The locations to scanpublic static Strand detectStrand(List<Location> subLocations)
public static Point detectStart(List<Location> subLocations)
public static Point detectEnd(List<Location> subLocations, boolean isCircular)
Copyright © 2000–2016 BioJava. All rights reserved.