public class SubstitutionMatrix
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BASES_SIZE |
Constructor and Description |
---|
SubstitutionMatrix(byte[] matrix)
Create a SubstitutionMatrix from a serialized byte array
|
SubstitutionMatrix(java.util.List<CRAMCompressionRecord> records)
Create a SubstitutionMatrix given a list of CramCompressionRecord
|
Modifier and Type | Method and Description |
---|---|
byte |
base(byte refBase,
byte code)
Given a reference base and a substitution code, return the corresponding substitution base.
|
byte |
code(byte refBase,
byte readBase)
Given a reference base and a read base, find the corresponding substitution code
|
byte[] |
getEncodedMatrix()
Return this substitution matrix as a byte array in a form suitable for serialization.
|
java.lang.String |
toString() |
public SubstitutionMatrix(java.util.List<CRAMCompressionRecord> records)
records
- array of CramCompressionRecord with Substitutionspublic SubstitutionMatrix(byte[] matrix)
matrix
- serialized substitution matrix from a CRAM streampublic byte code(byte refBase, byte readBase)
refBase
- reference base being substitutedreadBase
- read base to substitute for the reference basepublic byte base(byte refBase, byte code)
refBase
- reference base being substitutedcode
- substitution codepublic byte[] getEncodedMatrix()
public java.lang.String toString()
toString
in class java.lang.Object