java.lang.Object
org.broadinstitute.hellbender.tools.spark.sv.utils.SVKmer
org.broadinstitute.hellbender.tools.spark.sv.utils.SVKmerLong
All Implemented Interfaces:
Comparable<SVKmerLong>
Direct Known Subclasses:
KmerAndCount, KmerAndInterval

public class SVKmerLong extends SVKmer implements Comparable<SVKmerLong>
An immutable SVKmerLong. K must be between 1 and 63 (but it's silly to use this class for K < 33). Canonicalization is unimplemented for even K.
  • Constructor Details

    • SVKmerLong

      public SVKmerLong()
    • SVKmerLong

      public SVKmerLong(int kSize)
      Makes an empty SVKmerLong. If you call toString on it, it'll look like poly-A.
    • SVKmerLong

      public SVKmerLong(SVKmerLong that)
    • SVKmerLong

      public SVKmerLong(SVKmer that)
    • SVKmerLong

      protected SVKmerLong(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
  • Method Details

    • serialize

      protected void serialize(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
    • successor

      public final SVKmerLong successor(SVKmer.Base base, int kSize)
      Returns a new SVKmerLong that's like this one, but with its leading base discarded and a new one added to the end. E.g., if kmer.toString(5) is "ACTGA", then kmer.successor(SVKmerLong.Base.C,5).toString(5) is "CTGAC".
      Specified by:
      successor in class SVKmer
      Parameters:
      base - must be 0, 1, 2, or 3, corresponding to A, C, G, or T.
    • predecessor

      public final SVKmerLong predecessor(SVKmer.Base base, int kSize)
      Returns a new SVKmerLong that's like this one, but with its trailing base discarded and a new one added to the start. E.g., if kmer.toString(5) is "ACTGA", then kmer.predecessor(SVKmerLong.Base.T,5).toString(5) is "TACTG".
      Specified by:
      predecessor in class SVKmer
      Parameters:
      base - must be 0, 1, 2, or 3, corresponding to A, C, G, or T.
    • reverseComplement

      public final SVKmerLong reverseComplement(int kSize)
      Returns a new SVKmerLong that's the reverse-complement of this one. E.g., if kmer.toString(5) is "ACTGA", then kmer.rc(5).toString(5) is "TCAGT".
      Specified by:
      reverseComplement in class SVKmer
    • canonical

      public SVKmerLong canonical(int kSize)
      Returns a SVKmerLong that is a canonical representation of this one. An odd-K SVKmerLong is in canonical form if its middle base is A or C. The reverse-complement of a non-canonical SVKmerLong is a canonical SVKmerLong, and vice versa. (Think about it.) Canonical form is not defined for even-K Kmers (too expensive to compute routinely).
      Specified by:
      canonical in class SVKmer
    • firstBase

      public final SVKmer.Base firstBase(int kSize)
      Specified by:
      firstBase in class SVKmer
    • lastBase

      public final SVKmer.Base lastBase()
      Specified by:
      lastBase in class SVKmer
    • firstTrimer

      public final int firstTrimer(int kSize)
      Specified by:
      firstTrimer in class SVKmer
    • lastTrimer

      public final int lastTrimer()
      Specified by:
      lastTrimer in class SVKmer
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public final boolean equals(SVKmerLong that)
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public final int compareTo(SVKmerLong that)
      SVKmerLong comparison is consistent with equals. It's also the same as the lexicographic ordering you'd get using toString on the Kmers.
      Specified by:
      compareTo in interface Comparable<SVKmerLong>
    • toString

      public final String toString(int kSize)
      Not an override. An SVKmerLong doesn't know what K is, so it has to be supplied.
      Specified by:
      toString in class SVKmer