- Author
- engreitz This class contains multiple non-overlapping intervals on an arbitrary integer coordinate space. Intervals are stored using red-black trees so O(log n) performance is guaranteed.
| umms.core.annotation.CompoundInterval.CompoundInterval |
( |
| ) |
|
| umms.core.annotation.CompoundInterval.CompoundInterval |
( |
int |
start, |
|
|
int |
end |
|
) |
| |
| umms.core.annotation.CompoundInterval.CompoundInterval |
( |
CompoundInterval |
other | ) |
|
| void umms.core.annotation.CompoundInterval.addInterval |
( |
SingleInterval |
newInterval | ) |
|
Adds an interval, updating the compound interval to reflect the intersection of its previous state and the new interval.
- Author
- engreitz
- Parameters
-
| void umms.core.annotation.CompoundInterval.addInterval |
( |
int |
start, |
|
|
int |
end |
|
) |
| |
- Returns
- a new CompoundInterval containing the gaps between the blocks in this interval
| CompoundInterval umms.core.annotation.CompoundInterval.complement |
( |
int |
start, |
|
|
int |
end |
|
) |
| |
| boolean umms.core.annotation.CompoundInterval.contains |
( |
CompoundInterval |
other | ) |
|
- Parameters
-
- Returns
- returns true if all blocks in "other" are contained in blocks of this object
| boolean umms.core.annotation.CompoundInterval.containsExactInterval |
( |
SingleInterval |
i | ) |
|
- Parameters
-
- Returns
- true if an interval with these exact boundaries is present in the CompoundInterval
| boolean umms.core.annotation.CompoundInterval.containsInterval |
( |
SingleInterval |
i | ) |
|
- Parameters
-
- Returns
- true if i is entirely contained within a block (i can be smaller than the block)
- Parameters
-
- Returns
- true if all contained intervals are equal
| final SortedSet<SingleInterval> umms.core.annotation.CompoundInterval.getBlocks |
( |
| ) |
|
- Returns
- individual SingleIntervals. should not be modified
| int umms.core.annotation.CompoundInterval.getCoordinateAtPosition |
( |
int |
positionInInterval | ) |
|
- Parameters
-
| positionInInterval | 0-based position in the compound interval |
- Returns
- reference coordinate at the given interval position. e.g. for positionInInterval=0, returns getStart()
| int umms.core.annotation.CompoundInterval.getEnd |
( |
| ) |
|
| int umms.core.annotation.CompoundInterval.getPositionAtCoordinate |
( |
int |
coordinateInReference | ) |
|
- Parameters
-
- Returns
- 0-based interval position at given reference coordinate
| int umms.core.annotation.CompoundInterval.getSpan |
( |
| ) |
|
| int umms.core.annotation.CompoundInterval.getStart |
( |
| ) |
|
- Parameters
-
- Returns
- new CompoundInterval containing intersections of the blocks of the two objects
| int umms.core.annotation.CompoundInterval.length |
( |
| ) |
|
| void umms.core.annotation.CompoundInterval.moveToCoordinate |
( |
int |
coordinateInReference | ) |
|
Move an annotation, preserving the relationships between its blocks, to a new coordinate.
- Parameters
-
| int umms.core.annotation.CompoundInterval.numBlocks |
( |
| ) |
|
| boolean umms.core.annotation.CompoundInterval.overlaps |
( |
CompoundInterval |
other | ) |
|
- Parameters
-
- Returns
- returns true if any block in "other" overlaps with any block of this object
| boolean umms.core.annotation.CompoundInterval.overlaps |
( |
CompoundInterval |
other, |
|
|
int |
buffer, |
|
|
boolean |
ignoreBlocks |
|
) |
| |
- Parameters
-
| other | |
| ignoreBlocks | if true, then overlap will consider only the start and end boundaries, ignoring blocks |
- Returns
- true if the two intervals overlap
| boolean umms.core.annotation.CompoundInterval.overlaps |
( |
CompoundInterval |
other, |
|
|
boolean |
ignoreBlocks |
|
) |
| |
- Parameters
-
- Returns
- true if the boundaries of the intervals overlap
| boolean umms.core.annotation.CompoundInterval.overlaps |
( |
CompoundInterval |
other, |
|
|
int |
buffer |
|
) |
| |
- Parameters
-
- Returns
- true if any of the blocks come within the buffer distance of each other
| boolean umms.core.annotation.CompoundInterval.overlaps |
( |
SingleInterval |
interval | ) |
|
- Parameters
-
- Returns
- returns true if "interval" overlaps with any block of this object
| boolean umms.core.annotation.CompoundInterval.overlaps |
( |
SingleInterval |
interval, |
|
|
int |
buffer |
|
) |
| |
- Parameters
-
- Returns
- true if any block comes within the buffer distance from the given interval
| void umms.core.annotation.CompoundInterval.removeInterval |
( |
SingleInterval |
i | ) |
|
Remove an interval. Throws exception if the interval does not exist - so check first.
- Parameters
-
| void umms.core.annotation.CompoundInterval.setEnd |
( |
int |
end | ) |
|
Extends or trims the end coordinate. If trimming, removes blocks that fall after the new end coordinate. If expanding, extends the last block to the new end coordinate.
- Parameters
-
| void umms.core.annotation.CompoundInterval.setStart |
( |
int |
start | ) |
|
Extends or trims the start coordinate. If trimming, removes any blocks that fall before the new start position and truncates the block that overlaps the start position, if it exists. If expanding, extends the first block to the new start position.
- Parameters
-
| start | new start coordinate |
| void umms.core.annotation.CompoundInterval.shift |
( |
int |
delta | ) |
|
Shift all blocks in the compound interval by a given delta
- Parameters
-
| String umms.core.annotation.CompoundInterval.toString |
( |
| ) |
|
- Parameters
-
- Returns
- new CompoundInterval containing the (blocked) union of the two objects
The documentation for this class was generated from the following file: