|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcalhoun.seq.KmerHasher
public class KmerHasher
Class for computing kmer hashes. You instantiate the class with the length of the kmer to hash and the alphabet to use. The hashing functions then compute hashes for individual kmers. This class does not stored any hashes, which are just ints.
| Nested Class Summary | |
|---|---|
static interface |
KmerHasher.CharacterHash
|
| Field Summary | |
|---|---|
static KmerHasher.CharacterHash |
ACGTN
Character hash function to use with DNA bases which included the ambiguity code "N". |
static KmerHasher.CharacterHash |
ACGTNcomp
Character hash function to use with DNA bases which included the ambiguity code "N". |
static KmerHasher.CharacterHash |
ACGTother
Character hash function to use with DNA bases which included the ambiguity code "N". |
static KmerHasher.CharacterHash |
ACGTotherRC
Character hash function to use with DNA bases which included the ambiguity code "N". |
static KmerHasher.CharacterHash |
DNA
Character hash function to use with DNA bases. |
static KmerHasher.CharacterHash |
LETTERS
Character hash function to use with any letters. |
| Constructor Summary | |
|---|---|
KmerHasher(KmerHasher.CharacterHash charHash,
int length)
Creates a hash from a given character hash and length. |
|
| Method Summary | |
|---|---|
int |
hash(char c)
|
int |
hash(char[] chr)
Computes a hash given a character array. |
int |
hash(char[] chr,
int start)
Computes a hash given a character array. |
int |
hash(java.lang.String str,
int pos)
Computes hash given a 0-based position on the string. |
boolean |
hashable(char a)
|
int |
range()
|
static java.lang.String |
reverseComplement(java.lang.String forward)
|
int |
reverseShiftHash(char chr,
int hash)
Updates an existing hash. |
int |
shiftHash(char chr,
int hash)
Updates an existing hash. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static KmerHasher.CharacterHash DNA
public static KmerHasher.CharacterHash ACGTN
public static KmerHasher.CharacterHash ACGTNcomp
public static KmerHasher.CharacterHash ACGTother
public static KmerHasher.CharacterHash ACGTotherRC
public static KmerHasher.CharacterHash LETTERS
| Constructor Detail |
|---|
public KmerHasher(KmerHasher.CharacterHash charHash,
int length)
| Method Detail |
|---|
public static java.lang.String reverseComplement(java.lang.String forward)
public int range()
public int hash(java.lang.String str,
int pos)
public int hash(char[] chr)
public int hash(char[] chr,
int start)
public int shiftHash(char chr,
int hash)
public int reverseShiftHash(char chr,
int hash)
public int hash(char c)
public boolean hashable(char a)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||