|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojavax.bio.seq.RichLocation.Tools
public static class RichLocation.Tools
Some useful tools for working with Locations.
Method Summary | |
---|---|
static RichLocation |
construct(Collection<Location> members)
Constructs a RichLocation object based on the given collection of members. |
static RichLocation |
enrich(Location l)
Attempts to convert a plain Location into a RichLocation. |
static Collection<Location> |
flatten(Collection<Location> members)
Takes a set of locations and returns the set of all members. |
static Collection<Location> |
flatten(RichLocation location)
Takes a location and returns the set of all members. |
static boolean |
isMultiSource(Collection<Location> members)
Returns false if all the locations in the set are from the same strand of the same sequence. |
static Collection<Location> |
merge(Collection<Location> members)
Takes a set of locations and tries to merge all pairs where the union operation results in a simple rich location, not a compound one. |
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. |
static int[] |
modulateCircularLocation(int start,
int end,
int seqLength)
Takes a start and end position on a circular location of given length, and shifts them left along the sequence until they sit at the earliest possible point where they still would represent the same sequence. |
static int[] |
modulateCircularLocationPair(Location a,
Location b,
int seqLength)
Takes two circular locations of given length, and shifts them left along the sequence until they sit at the earliest possible point where they still would represent the same sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static RichLocation construct(Collection<Location> members)
members
- the members to construct a location from.
public static boolean isMultiSource(Collection<Location> members)
members
- the set of locations to check.
public static Collection<Location> merge(Collection<Location> members)
members
- the members to merge
public static Collection<Location> flatten(RichLocation location)
location
- the location to flatten
public static Collection<Location> flatten(Collection<Location> members)
members
- the locations to flatten
public static int[] modulateCircularLocation(int start, int end, int seqLength)
start
- the start of the circular locationend
- the end of the circular locationseqLength
- the circular length of the sequence underlying the
location
public static int[] modulateCircularLocationPair(Location a, Location b, int seqLength)
a
- the first location to shiftb
- the second location to shiftseqLength
- the circular length of the sequence underlying the
location
public static int modulateCircularIndex(int index, int seqLength)
index
- the point on the location to shiftseqLength
- the size of the circular location
public static RichLocation enrich(Location l)
l
- the location to convert
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |