object Sequences

Utility methods for working with DNA or RNA sequences

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Sequences
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class OffsetAndLength(offset: Int, length: Int) extends Product with Serializable

    Class to store the zero-based offset and length of match for various properties of a sequence.

    Class to store the zero-based offset and length of match for various properties of a sequence. For example, see longestHomopolymer and longestDinuc.

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. val CommonNonAutosomalContigNames: Seq[String]

    Common contig/chrom names for non-autosomal sequences in mammals.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def compatible(base1: Byte, base2: Byte): Boolean

    Returns true if two bases are compatible.

    Returns true if two bases are compatible. Compatibility is defined as having any overlap in the set of acceptable bases. E.g.:

    • compatible('T', 't') == true
    • compatible('T', 'U') == true
    • compatible('A', 'R') == true
    • compatible('M', 'S') == true
    • compatible('A', 'C') == false
    • compatible('M', 'K') == false
    base1

    the first base to be compared

    base2

    the second base to be compared

    returns

    true if the bases share at least one concrete base in common, false otherwise

  8. final def complement(b: Byte): Byte

    Complements a single base.

    Complements a single base. U and u are always complemented to A and a respectively. IUPAC ambiguity codes are handled appropriately - they are complemented to the IUPAC code that represents the set of bases that can pair with the input IUPAC code.

    Any byte that is not a valid upper- or lower-case DNA base, RNA base or IUPAC code will cause an exception to be thrown.

    b

    the base to be complemented

    returns

    the complement of that base

    Annotations
    @inline()
  9. def complement(bs: Array[Byte]): Unit

    Complements the bases in the array in place.

    Complements the bases in the array in place. See complement() for how complementing is performed.

    bs

    an array of bases as bytes to be complemented in place

  10. def complement(s: String): String

    Returns the sequence that is the complement of the provided sequence.

  11. def countMismatches(s1: String, s2: String): Int

    Counts the number of mismatches between two sequences of the same length.

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def gcContent(s: String): Double

    Calculates GC content for a DNA sequence as a fraction (between 0 and 1).

    Calculates GC content for a DNA sequence as a fraction (between 0 and 1).

    s

    a DNA sequence

    returns

    the fraction GC content for the given sequence, zero if the sequence is empty

  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def homopolymers(s: String, minLength: Int): Int

    Returns the number of homopolymers of a given minimum length within the sequence.

    Returns the number of homopolymers of a given minimum length within the sequence.

    s

    a DNA or RNA sequence

    minLength

    the minimum length of homopolymer to count (must be greater than 0)

    returns

    the number of homopolymers of length >= minLength in the sequence

  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def iupacCode(bases: Iterable[Byte]): Byte

    Returns the IUPAC code for the set of bases given.

  21. def longestDinuc(s: String): OffsetAndLength

    Returns the offset (0-based) and length of the longest dinucleotide run in the sequence.

    Returns the offset (0-based) and length of the longest dinucleotide run in the sequence. In the case that there are multiple dinucleotide runs of the same length, the earliest one is returned.

    s

    a DNA or RNA sequence

    returns

    the offset and length of the longest dinucleotide sequence

  22. def longestHomopolymer(s: String): OffsetAndLength

    Returns the offset (0-based) and length of the longest homopolymer in the sequence.

    Returns the offset (0-based) and length of the longest homopolymer in the sequence. In the case that there are multiple homopolymers of the same length, the earliest one is returned.

    s

    a DNA or RNA sequence

    returns

    the offset and length of the longest homopolymer

  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. def revcomp(bs: Array[Byte]): Unit

    Reverse complements an array of bases in place.

    Reverse complements an array of bases in place. See complement() for how bases are complemented.

  27. def revcomp(s: String): String

    Reverse complements a string of bases.

  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped