Package org.snpeff.nmer
Class Nmer
java.lang.Object
org.snpeff.nmer.Nmer
Binary 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetNmer()Set nmer (binary coded)inthashCode()intlength()Get nmer's lengthintread(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 nmer's sequencevoidsetLength(int length) Set nmer's lengthvoidsetNmer(long nmer) Set nmer (binary coded)toString()longwc()Watson-Cricks complement of this nmer Since {A, C, G, T} is translated into binary {00, 01, 10, 11}.voidwrite(OutputStream outputStream)
-
Field Details
-
MAX_NMER_SIZE
public static final int MAX_NMER_SIZE- See Also:
-
-
Constructor Details
-
Nmer
public Nmer(int length) -
Nmer
-
-
Method Details
-
getNmer
public long getNmer()Set nmer (binary coded)- Parameters:
nmer-
-
hashCode
public int hashCode() -
length
public int length()Get nmer's length- Returns:
-
read
- Throws:
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
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
-
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
- Throws:
IOException
-