Class SVKmerLong
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
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.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.broadinstitute.hellbender.tools.spark.sv.utils.SVKmer
SVKmer.Base
-
Field Summary
Fields inherited from class org.broadinstitute.hellbender.tools.spark.sv.utils.SVKmer
BYTEWISE_REVERSE_COMPLEMENT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionSVKmerLong
(int kSize) Makes an empty SVKmerLong.protected
SVKmerLong
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) SVKmerLong
(SVKmer that) SVKmerLong
(SVKmerLong that) -
Method Summary
Modifier and TypeMethodDescriptioncanonical
(int kSize) Returns a SVKmerLong that is a canonical representation of this one.final int
compareTo
(SVKmerLong that) SVKmerLong comparison is consistent with equals.boolean
final boolean
equals
(SVKmerLong that) final SVKmer.Base
firstBase
(int kSize) final int
firstTrimer
(int kSize) final int
hashCode()
final SVKmer.Base
lastBase()
final int
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.final SVKmerLong
reverseComplement
(int kSize) Returns a new SVKmerLong that's the reverse-complement of this one.protected void
serialize
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) 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.final String
toString
(int kSize) Not an override.Methods inherited from class org.broadinstitute.hellbender.tools.spark.sv.utils.SVKmer
reverseComplement, reverseComplementByteValueAsLong
-
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
-
SVKmerLong
-
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
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". -
predecessor
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 classSVKmer
- Parameters:
base
- must be 0, 1, 2, or 3, corresponding to A, C, G, or T.
-
reverseComplement
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 classSVKmer
-
canonical
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). -
firstBase
-
lastBase
-
firstTrimer
public final int firstTrimer(int kSize) - Specified by:
firstTrimer
in classSVKmer
-
lastTrimer
public final int lastTrimer()- Specified by:
lastTrimer
in classSVKmer
-
equals
-
equals
-
hashCode
public final int hashCode() -
compareTo
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 interfaceComparable<SVKmerLong>
-
toString
Not an override. An SVKmerLong doesn't know what K is, so it has to be supplied.
-