Class/Object

org.bdgenomics.adam.models

ReferenceRegion

Related Docs: object ReferenceRegion | package models

Permalink

case class ReferenceRegion(referenceName: String, start: Long, end: Long, strand: Strand = Strand.INDEPENDENT) extends Comparable[ReferenceRegion] with Interval[ReferenceRegion] with Product with Serializable

Represents a contiguous region of the reference genome.

referenceName

The name of the sequence (chromosome) in the reference genome

start

The 0-based residue-coordinate for the start of the region

end

The 0-based residue-coordinate for the first residue after the start which is not in the region -- i.e. [start, end) define a 0-based half-open interval.

strand

The strand of the genome that this region exists on.

Linear Supertypes
Serializable, Serializable, Product, Equals, Interval[ReferenceRegion], Comparable[ReferenceRegion], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReferenceRegion
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Interval
  7. Comparable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ReferenceRegion(referenceName: String, start: Long, end: Long, strand: Strand = Strand.INDEPENDENT)

    Permalink

    referenceName

    The name of the sequence (chromosome) in the reference genome

    start

    The 0-based residue-coordinate for the start of the region

    end

    The 0-based residue-coordinate for the first residue after the start which is not in the region -- i.e. [start, end) define a 0-based half-open interval.

    strand

    The strand of the genome that this region exists on.

Value Members

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

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def compareTo(that: ReferenceRegion): Int

    Permalink

    Compares between two regions using the RegionOrdering.

    Compares between two regions using the RegionOrdering.

    that

    The region to compare against.

    returns

    An ordering depending on which region comes first.

    Definition Classes
    ReferenceRegion → Interval → Comparable
  7. def contains(other: ReferenceRegion): Boolean

    Permalink

    Checks if another region is wholly within our region.

    Checks if another region is wholly within our region.

    other

    The region to compare against.

    returns

    True if the region is wholly contained within our region.

  8. def covers(other: ReferenceRegion, threshold: Long): Boolean

    Permalink

    Checks if our region overlaps or is within a threshold of another region, independent of strand.

    Checks if our region overlaps or is within a threshold of another region, independent of strand.

    other

    The region to compare against.

    threshold

    The threshold within which the region must match.

    returns

    True if any section of the two regions overlap.

  9. def covers(other: ReferenceRegion): Boolean

    Permalink

    Checks if our region overlaps (wholly or partially) another region, independent of strand.

    Checks if our region overlaps (wholly or partially) another region, independent of strand.

    other

    The region to compare against.

    returns

    True if any section of the two regions overlap.

    Definition Classes
    ReferenceRegion → Interval
  10. def coversBy(other: ReferenceRegion): Option[Long]

    Permalink

    Returns the number of bases covering another region.

    Returns the number of bases covering another region.

    A region covers another region if it is overlapping, regardless of strand.

    other

    Region to compare against.

    returns

    Returns an option containing the number of positions of coverage between two points. If the two regions do not cover each other, we return an empty option.

  11. def disorient: ReferenceRegion

    Permalink

    returns

    Returns a copy of this reference region that is on the independent strand.

  12. def distance(other: ReferenceRegion): Option[Long]

    Permalink

    Returns the distance between this reference region and another region in the reference space.

    Returns the distance between this reference region and another region in the reference space.

    other

    Region to compare against.

    returns

    Returns an option containing the distance between two points. If the point is not in our reference space, we return an empty option.

    Definition Classes
    ReferenceRegion → Interval
    Note

    Distance here is defined as the minimum distance between any point within this region, and any point within the other region we are measuring against. If the two sets overlap, the distance will be 0. If the sets abut, the distance will be 1. Else, the distance will be greater.

  13. val end: Long

    Permalink

    The 0-based residue-coordinate for the first residue after the start which is not in the region -- i.e.

    The 0-based residue-coordinate for the first residue after the start which is not in the region -- i.e. [start, end) define a 0-based half-open interval.

    Definition Classes
    ReferenceRegion → Interval
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    ReferenceRegion → AnyRef → Any
  18. def hull(other: ReferenceRegion): ReferenceRegion

    Permalink

    Creates a region corresponding to the convex hull of two regions.

    Creates a region corresponding to the convex hull of two regions. Has no preconditions about the adjacency or overlap of two regions. However, regions must be in the same reference space.

    other

    Other region to compute hull of with this region.

    returns

    The convex hull of both unions.

    Exceptions thrown

    IllegalArgumentException Thrown if regions are in different reference spaces.

    See also

    merge

  19. def intersection(other: ReferenceRegion, minOverlap: Long = 0L): ReferenceRegion

    Permalink

    Calculates the intersection of two reference regions given a minimum overlap.

    Calculates the intersection of two reference regions given a minimum overlap.

    other

    Region to intersect with.

    minOverlap

    Minimum overlap between the two reference regions.

    returns

    A smaller reference region

  20. def isAdjacent(other: ReferenceRegion): Boolean

    Permalink

    Returns whether two regions are adjacent.

    Returns whether two regions are adjacent.

    Adjacent regions do not overlap, but have no separation between start/end.

    other

    Region to compare against.

    returns

    True if regions are adjacent.

  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def isNearby(other: ReferenceRegion, distanceThreshold: Long, requireStranded: Boolean = true): Boolean

    Permalink

    Returns whether two regions are nearby.

    Returns whether two regions are nearby.

    Two regions are near each other if the distance between the two is less than the user provided distanceThreshold.

    other

    Region to compare against.

    distanceThreshold

    The maximum distance of interest.

    requireStranded

    Strandedness is or is not required, true by default.

    returns

    True if regions are nearby.

  23. def length(): Long

    Permalink

    returns

    The length of this region in bases.

  24. def merge(other: ReferenceRegion, distanceThreshold: Long): ReferenceRegion

    Permalink

    Merges two reference regions that are within a threshold of each other.

    Merges two reference regions that are within a threshold of each other.

    other

    Other region to merge with this region.

    returns

    The merger of both unions.

    Exceptions thrown

    IllegalArgumentException Thrown if regions are not within the distance threshold.

    See also

    hull

  25. def merge(other: ReferenceRegion): ReferenceRegion

    Permalink

    Merges two reference regions that are contiguous.

    Merges two reference regions that are contiguous.

    other

    Other region to merge with this region.

    returns

    The merger of both unions.

    Exceptions thrown

    IllegalArgumentException Thrown if regions are not overlapping or adjacent.

    See also

    hull

  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. def overlaps(other: ReferenceRegion, threshold: Long): Boolean

    Permalink

    Checks if our region overlaps (wholly or partially) another region.

    Checks if our region overlaps (wholly or partially) another region.

    other

    The region to compare against.

    threshold

    The threshold within which the region must match.

    returns

    True if any section of the two regions overlap.

  30. def overlaps(other: ReferenceRegion): Boolean

    Permalink

    Checks if our region overlaps or is within a threshold of another region.

    Checks if our region overlaps or is within a threshold of another region.

    other

    The region to compare against.

    returns

    True if any section of the two regions overlap.

    Definition Classes
    ReferenceRegion → Interval
  31. def overlapsBy(other: ReferenceRegion): Option[Long]

    Permalink

    Returns the number of bases overlapping another region.

    Returns the number of bases overlapping another region.

    other

    Region to compare against.

    returns

    Returns an option containing the number of positions of overlap between two points. If the two regions do not overlap, we return an empty option.

  32. def pad(byStart: Long, byEnd: Long): ReferenceRegion

    Permalink

    Extends the current reference region at both the start and end, but by different numbers of bases.

    Extends the current reference region at both the start and end, but by different numbers of bases.

    byStart

    The number of bases to move the start position forward by.

    byEnd

    The number of bases to move the end position back by.

    returns

    Returns a new reference region where the start and/or end have been moved.

  33. def pad(by: Long): ReferenceRegion

    Permalink

    Extends the current reference region at both the start and end.

    Extends the current reference region at both the start and end.

    by

    The number of bases to extend the region by from both the start and the end.

    returns

    Returns a new reference region where the start and end have been moved.

  34. val referenceName: String

    Permalink

    The name of the sequence (chromosome) in the reference genome

  35. final def sameReferenceName(other: ReferenceRegion): Boolean

    Permalink

    Determines if two regions are on the same contig.

    Determines if two regions are on the same contig.

    other

    The other region.

    returns

    True if the two are on the same reference name, false otherwise.

    Annotations
    @inline()
  36. final def sameStrand(other: ReferenceRegion): Boolean

    Permalink

    Determines if two regions are on the same strand.

    Determines if two regions are on the same strand.

    other

    The other region.

    returns

    True if the two are on the same strand, false otherwise

    Annotations
    @inline()
  37. val start: Long

    Permalink

    The 0-based residue-coordinate for the start of the region

    The 0-based residue-coordinate for the start of the region

    Definition Classes
    ReferenceRegion → Interval
  38. val strand: Strand

    Permalink

    The strand of the genome that this region exists on.

  39. def subtract(other: ReferenceRegion, requireStranded: Boolean = false): Iterable[ReferenceRegion]

    Permalink

    Subtracts another region.

    Subtracts another region.

    Subtracting in this case removes the entire region and returns up to two new regions.

    other

    The region to subtract.

    requireStranded

    Whether or not to require other be on same strand.

    returns

    A list containing the regions resulting from the subtraction.

  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def toPredicate: FilterPredicate

    Permalink

    Generates a predicate that can be used with Parquet files.

    Generates a predicate that can be used with Parquet files.

    returns

    A predicate that selects records that overlap a given genomic region.

  42. def unstrandedDistance(other: ReferenceRegion): Option[Long]

    Permalink

    Returns the distance to another region, ignoring strand.

    Returns the distance to another region, ignoring strand.

    other

    Region to compare against.

    returns

    Returns an option containing the distance between two points. If the point is not in our reference space, we return an empty option.

    Note

    Distance here is defined as the minimum distance between any point within this region, and any point within the other region we are measuring against. If the two sets overlap, the distance will be 0. If the sets abut, the distance will be 1. Else, the distance will be greater.

  43. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def width: Long

    Permalink
    Definition Classes
    Interval

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Interval[ReferenceRegion]

Inherited from Comparable[ReferenceRegion]

Inherited from AnyRef

Inherited from Any

Ungrouped