Packages

final case class Block(chr: String, start: Int, end: Int, orientation: Orientation) extends Region with Product with Serializable

A single contiguous block on a chromosome with an Orientation.

chr

Chromosome name. Cannot start with "chr" (otherwise an IllegalArgumentException is thrown). All code in this library automatically strips "chr" from feature chromosome names before instantiating Blocks. For example, format.GTF22Record strips "chr" from GTF2.2 lines before creating Features. Client code that implements new ways to create features will need to do this as well.

start

Zero-based start position (inclusive)

end

Zero-based end position (exclusive)

orientation

Block orientation

Linear Supertypes
Serializable, Serializable, Product, Equals, Region, Ordered[Region], Comparable[Region], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Block
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Region
  7. Ordered
  8. Comparable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Block(chr: String, start: Int, end: Int, orientation: Orientation)

    chr

    Chromosome name. Cannot start with "chr" (otherwise an IllegalArgumentException is thrown). All code in this library automatically strips "chr" from feature chromosome names before instantiating Blocks. For example, format.GTF22Record strips "chr" from GTF2.2 lines before creating Features. Client code that implements new ways to create features will need to do this as well.

    start

    Zero-based start position (inclusive)

    end

    Zero-based end position (exclusive)

    orientation

    Block orientation

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def <(that: Region): Boolean
    Definition Classes
    Ordered
  4. def <=(that: Region): Boolean
    Definition Classes
    Ordered
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def >(that: Region): Boolean
    Definition Classes
    Ordered
  7. def >=(that: Region): Boolean
    Definition Classes
    Ordered
  8. def addBlock(block: Block): Region

    Returns a merged Region representing this plus an additional Block.

    Returns a merged Region representing this plus an additional Block.

    The new Block is merged into this Region as in the Region.union method.

    If this and the new Block have incompatible Orientations or are on different chromosomes, an exception is thrown.

    block

    New Block to add

    returns

    Region representing this with the additional Block merged in

    Definition Classes
    BlockRegion
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def blocks: List[Block]

    Returns a list of the Blocks of this Region.

    Returns a list of the Blocks of this Region.

    Regardless of Orientation, the returned list is in sorted order by chromosome coordinates.

    Definition Classes
    BlockRegion
  11. val chr: String
    Definition Classes
    BlockRegion
  12. def chrPos(relativePos: Int): Int

    Returns the position in chromosome coordinates corresponding to a relative position along this Region.

    Returns the position in chromosome coordinates corresponding to a relative position along this Region.

    The requested relative position counts with respect to the "beginning" or "5-prime end" of this Region. It counts along the Blocks only, ignoring intervening areas ("introns").

    For example, if this Region has Orientation Plus, the relative position zero would map to the start position in chromosome coordinates by this method, and the relative position Region.size minus one would map to the last position (the end position minus one) in chromosome coordinates. If this Region has Orientation Minus, position zero would map to the last position of the Region (the end position minus one) by this method, and Region.size minus one would map to the start position.

    This Region must have Orientation Plus or Minus. The requested relative position must be between zero (inclusive) and Region.size (exclusive). Otherwise, an exception is thrown.

    relativePos

    Zero-based relative position with respect to this Region

    returns

    The zero-based position in chromosome coordinates

    Definition Classes
    BlockRegion
  13. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def compare(that: Region): Int

    Returns the result of comparing this with another Region.

    Returns the result of comparing this with another Region.

    If other Region is Empty, returns a negative integer.

    If other Region is a Block, first compare chromosome, then start position, then end position, then Orientation according to Orientation.ArbitraryOrdering. Return the first non-zero comparison. If all are equal, return zero.

    If other Region is a BlockSet, first compare spans ignoring introns, as if both were Blocks. If they have the same span, return a negative integer.

    that

    Other Region

    returns

    Negative integer if this is less than other, zero if neither is greater, positive integer if this is greater than other

    Definition Classes
    Block → Ordered
  15. def compareTo(that: Region): Int
    Definition Classes
    Ordered → Comparable
  16. def contains(feat: Region): Boolean

    Returns a boolean value representing whether this Region contains another Region.

    Returns a boolean value representing whether this Region contains another Region.

    In order to contain the other, the two Regions must be on the same chromosome, have compatible Orientations, and every block of the other Region must be fully contained in the span of a block of this Region.

    returns

    True if this Region contains the other, false otherwise

    Definition Classes
    BlockRegion
  17. def containsCompatibleIntrons(o: Region): Boolean

    Returns a boolean value representing whether this Region contains another Region and their introns are compatible.

    Returns a boolean value representing whether this Region contains another Region and their introns are compatible.

    That is, no INTERNAL block boundary for one of the Regions can fall strictly within a Block of the other Region.

    o

    Other Region

    returns

    True if this Region contains the other and their introns are compatible, false otherwise

    Definition Classes
    Region
  18. val end: Int
    Definition Classes
    BlockRegion
  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  22. def getIntrons: List[Block]

    Returns a list of Blocks representing the introns of this Region.

    Returns a list of Blocks representing the introns of this Region.

    The returned list is in order from left to right. Each Block in the returned list is the span of a gap between two Blocks of this Region. The returned Blocks have the same Orientation as this Region. The start position of each returned Block is equal to the end position (exclusive) of the previous adjacent Block in this Region. The end position of each returned Block (exclusive) is equal to the start position of the following adjacent Block in this Region.

    If this Region is empty or has only one Block, Nil is returned.

    returns

    A list of Blocks representing the gaps between the Blocks of this Region, or Nil if this Region has less than two Blocks.

    Definition Classes
    Region
  23. def intersection(feat: Region): Region

    Returns a Region representing the intersection of this with another Region.

    Returns a Region representing the intersection of this with another Region.

    If the two Regions overlap (Region.overlaps), a Region is returned whose blocks are the disjoint sections of overlap between the blocks of the two original Regions, and whose Orientation is the consensus (Orientation.consensus) of those of the two original Regions. If the two Regions do not overlap, Empty is returned.

    returns

    Region representing the intersection of this with the other Region

    Definition Classes
    BlockRegion
  24. def isEmpty: Boolean

    Returns a boolean value representing whether this Region is empty.

    Returns a boolean value representing whether this Region is empty.

    The only possible way for a region to be empty (have no blocks) is for it to be equal to Empty.

    Definition Classes
    BlockRegion
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def minus(feat: Region): Region

    Returns a Region representing this minus the overlap with another Region.

    Returns a Region representing this minus the overlap with another Region.

    If the two Regions overlap (Region.overlaps), a Region is returned whose blocks are the sections of this Region's blocks that are not part of the overlap. Otherwise, this is returned. In either case, the returned Region has the same Orientation as this Region.

    returns

    Region representing this minus the other Region

    Definition Classes
    BlockRegion
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  30. def numBlocks: Int

    Returns the number of Blocks in this Region.

    Returns the number of Blocks in this Region.

    Empty has zero Blocks.

    Definition Classes
    BlockRegion
  31. val orientation: Orientation
    Definition Classes
    BlockRegion
  32. def overlaps(feat: Region): Boolean

    Returns a boolean value representing whether this Region overlaps another Region.

    Returns a boolean value representing whether this Region overlaps another Region.

    In order to overlap, the two Regions must be on the same chromosome, have compatible Orientations, and have some pair of respective Blocks with overlapping spans.

    returns

    True if the Regions overlap, false otherwise

    Definition Classes
    BlockRegion
  33. def overlapsCompatibleIntrons(o: Region): Boolean

    Returns a boolean value representing whether this Region overlaps another Region and their introns are compatible.

    Returns a boolean value representing whether this Region overlaps another Region and their introns are compatible.

    That is, no INTERNAL block boundary for one of the Regions can fall strictly within a Block of the other Region.

    o

    Other Region

    returns

    True if the Regions overlap and their introns are compatible, false otherwise

    Definition Classes
    BlockRegion
  34. def overlapsSpan(o: Region): Boolean

    Returns a boolean value representing whether the span of this Region overlaps the span of another Region.

    Returns a boolean value representing whether the span of this Region overlaps the span of another Region. That is, intron/exon structure is ignored and only the full span (from start to end) of the Regions are considered. Orientations must be compatible.

    o

    Other Region

    returns

    True if the spans of the Regions overlap, false otherwise

    Definition Classes
    Region
  35. def relativePos(chrPos: Int): Option[Int]

    Returns the position relative to this Region accounting for splicing and Orientation.

    Returns the position relative to this Region accounting for splicing and Orientation.

    The returned position counts with respect to the "beginning" or "5-prime end" of this Region. It counts along the Blocks only, ignoring intervening areas ("introns").

    For example, if this Region has Orientation Plus, the start position would map to position zero by this method, and the last position (the end position minus one) would map to position Region.size minus one. If this Region has Orientation Minus, the last position of the Region (the end position minus one) would map to position zero by this method, and the start position would map to position Region.size minus one.

    This Region must have Orientation Plus or Minus. Otherwise an exception is thrown.

    If the requested chromosome position does not lie within one of the Blocks of this Region, None is returned.

    chrPos

    Zero-based position in chromosome coordinates

    returns

    The zero-based converted position with respect to this Region, or None if the requested position does not overlap a Block of this Region

    Definition Classes
    BlockRegion
  36. def size: Int

    Returns the sum of the lengths of the Blocks of this Region.

    Returns the sum of the lengths of the Blocks of this Region.

    Block length is the end position minus the start position, where, as always, start position is inclusive and end position is exclusive. Therefore, size is the number of individual genomic positions included in the Region.

    The size of Empty is zero.

    returns

    The sum of the lengths of the Blocks of this Region

    Definition Classes
    Region
  37. val start: Int
    Definition Classes
    BlockRegion
  38. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  39. def toString(): String

    Returns a string representation of this Block.

    Returns a string representation of this Block.

    Definition Classes
    Block → AnyRef → Any
  40. def trim(newStart: Int, newEnd: Int): Region

    Returns a Region resulting from trimming back the start and end positions of this Region.

    Returns a Region resulting from trimming back the start and end positions of this Region.

    This Region is truncated to the new start and end positions in chromosome coordinates. This may mean some Blocks are removed altogether, some are shortened, and some are left intact. If the new start or end position is outside the span of this Region, that parameter will not affect the returned Region.

    As always, start positions are inclusive and end positions are exclusive.

    newStart

    New zero-based start position in chromosome coordinates

    newEnd

    New zero-based end position in chromosome coordinates

    returns

    Region representing this with truncated start and end positions

    Definition Classes
    Region
  41. def union(feat: Region): Region

    Returns a Region representing the union of this with another Region.

    Returns a Region representing the union of this with another Region.

    If the two Regions are on the same chromosome and have compatible Orientations, the blocks will be merged and assigned the consensus Orientation (Orientation.consensus) for the final returned Region.

    If this or the other Region is Empty, the non-empty Region will be returned, or if both are Empty, Empty will be returned.

    Otherwise, an exception is thrown.

    returns

    Region representing the union of this with the other Region

    Definition Classes
    BlockRegion
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Region

Inherited from Ordered[Region]

Inherited from Comparable[Region]

Inherited from AnyRef

Inherited from Any

Ungrouped