# Interval

#### trait Interval[T <: Interval[T]] extends Comparable[T]

An interval is a 2-dimensional 0-based coordinate consisting of a closed start value and open end value. Each 2-dimensional coordinate has a defined width. This can be used to express a region of a genome, a transcript, a gene, etc.

T

Recursive type extending Interval. Used for return type of functions overlap() and compareTo()

Linear Supertypes
Comparable[T], AnyRef, Any
Ordering
1. Alphabetic
2. By inheritance
Inherited
1. Interval
2. Comparable
3. AnyRef
4. Any
1. Hide All
2. Show all
Visibility
1. Public
2. All

### Abstract Value Members

1. #### abstract def compareTo(interval: T): Int

Compares the distance between this interval and the specified interval.

Compares the distance between this interval and the specified interval.

interval

Another interval to compare against.

returns

Greater than/equal to/less than comparison.

Definition Classes
Interval → Comparable
2. #### abstract def covers(interval: T): Boolean

Return true if the range of positions covered by this interval intersects the range of positions the specified interval covers.

Return true if the range of positions covered by this interval intersects the range of positions the specified interval covers.

In many cases, this function is identical to the overlaps function. However, some coordinate spaces may allow two intervals to cover the same start/end interval, while not truly overlapping. E.g., in a genomic coordinate space, two objects may cover the same range on a chromosome, but may have opposite strandedness.

Essentially, this is a relaxed variant of overlaps where we have projected a complex coordinate space down to a set of 1D ranges. Two intervals cover each other if they are on the same 1D range out of the sets, and if their start/end coordinates overlap.

interval

Another interval to compare against.

returns

True if two intervals cover intersecting indices in a coordinate space.

overlaps

3. #### abstract def distance(interval: T): Option[Long]

Provides an absolute distance, if defined, between this interval and the specified interval.

Provides an absolute distance, if defined, between this interval and the specified interval.

interval

Another interval to compare against.

returns

Absolute distance between this interval and the specified interval, or None if not defined

4. #### abstract def end: Long

returns

The end of this interval.

5. #### abstract def overlaps(interval: T): Boolean

Determines whether Interval intersects with another Interval T.

Determines whether Interval intersects with another Interval T.

interval

Another interval to compare against.

returns

True if this interval overlaps with the specified interval.

covers

6. #### abstract def start: Long

returns

The start of this interval.

### Concrete Value Members

1. #### final def !=(arg0: Any): Boolean

Definition Classes
AnyRef → Any
2. #### final def ##(): Int

Definition Classes
AnyRef → Any
3. #### final def ==(arg0: Any): Boolean

Definition Classes
AnyRef → Any
4. #### final def asInstanceOf[T0]: T0

Definition Classes
Any
5. #### def clone(): AnyRef

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )
6. #### final def eq(arg0: AnyRef): Boolean

Definition Classes
AnyRef
7. #### def equals(arg0: Any): Boolean

Definition Classes
AnyRef → Any
8. #### def finalize(): Unit

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
9. #### final def getClass(): Class[_]

Definition Classes
AnyRef → Any
10. #### def hashCode(): Int

Definition Classes
AnyRef → Any
11. #### final def isInstanceOf[T0]: Boolean

Definition Classes
Any
12. #### final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef
13. #### final def notify(): Unit

Definition Classes
AnyRef
14. #### final def notifyAll(): Unit

Definition Classes
AnyRef
15. #### final def synchronized[T0](arg0: ⇒ T0): T0

Definition Classes
AnyRef
16. #### def toString(): String

Definition Classes
AnyRef → Any
17. #### final def wait(): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
18. #### final def wait(arg0: Long, arg1: Int): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
19. #### final def wait(arg0: Long): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
20. #### def width: Long

A width is the key property of an interval, which can represent a genomic region, a transcript, a gene, etc.

A width is the key property of an interval, which can represent a genomic region, a transcript, a gene, etc.

returns

The width of this interval.