Package org.snpeff.nmer
Class Nmer
- java.lang.Object
-
- org.snpeff.nmer.Nmer
-
public class Nmer extends java.lang.ObjectBinary packed N-mer (i.e. DNA sequence of length N) In this implementation N has to be less than 32- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_NMER_SIZE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetNmer()Set nmer (binary coded)inthashCode()intlength()Get nmer's lengthintread(java.io.InputStream outputStream)voidrol(char base)Rotate sequence left and append a base at the end Note: The first base is dropped, so the total length is still 'n'voidset(java.lang.String seqStr)Set nmer's sequencevoidsetLength(int length)Set nmer's lengthvoidsetNmer(long nmer)Set nmer (binary coded)java.lang.StringtoString()longwc()Watson-Cricks complement of this nmer Since {A, C, G, T} is translated into binary {00, 01, 10, 11}.voidwrite(java.io.OutputStream outputStream)
-
-
-
Field Detail
-
MAX_NMER_SIZE
public static final int MAX_NMER_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNmer
public long getNmer()
Set nmer (binary coded)- Parameters:
nmer-
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
length
public int length()
Get nmer's length- Returns:
-
read
public int read(java.io.InputStream outputStream) throws java.io.IOException- Throws:
java.io.IOException
-
rol
public void rol(char base)
Rotate sequence left and append a base at the end Note: The first base is dropped, so the total length is still 'n'- Parameters:
cq-
-
set
public void set(java.lang.String seqStr)
Set nmer's sequence- Parameters:
seqStr-
-
setLength
public void setLength(int length)
Set nmer's length- Parameters:
length-
-
setNmer
public void setNmer(long nmer)
Set nmer (binary coded)- Parameters:
nmer-
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
wc
public long wc()
Watson-Cricks complement of this nmer Since {A, C, G, T} is translated into binary {00, 01, 10, 11}. The complement is: baseWc = XOR(11, base)- Returns:
-
write
public void write(java.io.OutputStream outputStream) throws java.io.IOException- Throws:
java.io.IOException
-
-