public static class RichLocation.Tools extends Object
| Modifier and Type | Method and Description | 
|---|---|
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. 
 | 
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 mergepublic static Collection<Location> flatten(RichLocation location)
location - the location to flattenpublic static Collection<Location> flatten(Collection<Location> members)
members - the locations to flattenpublic 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
            locationpublic 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
            locationpublic static int modulateCircularIndex(int index, int seqLength)
index - the point on the location to shiftseqLength - the size of the circular locationpublic static RichLocation enrich(Location l)
l - the location to convertCopyright © 2020 BioJava. All rights reserved.