Class Substitution
- java.lang.Object
-
- htsjdk.samtools.cram.encoding.readfeatures.Substitution
-
- All Implemented Interfaces:
ReadFeature,Serializable
public class Substitution extends Object implements Serializable, ReadFeature
A substitution event captured in read coordinates. It is characterized by position in read, read base and reference base. The class is also responsible for converting combinations of read base and reference base into a byte value (code). Both reference and read bases must be ACGTN only.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Substitution()Substitution(int position, byte base, byte referenceBase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)bytegetBase()bytegetCode()bytegetOperator()Read features are distinguished by operator, similar to cigar operator.intgetPosition()bytegetReferenceBase()voidsetBase(byte base)voidsetCode(byte code)voidsetPosition(int position)voidsetReferenceBase(byte referenceBase)StringtoString()
-
-
-
Field Detail
-
NO_CODE
public static final int NO_CODE
- See Also:
- Constant Field Values
-
operator
public static final byte operator
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCode
public byte getCode()
-
setCode
public void setCode(byte code)
-
getOperator
public byte getOperator()
Description copied from interface:ReadFeatureRead features are distinguished by operator, similar to cigar operator.- Specified by:
getOperatorin interfaceReadFeature- Returns:
- type of the read feature
-
getPosition
public int getPosition()
- Specified by:
getPositionin interfaceReadFeature- Returns:
- zero-based position in the read
-
setPosition
public void setPosition(int position)
- Specified by:
setPositionin interfaceReadFeature
-
getBase
public byte getBase()
-
setBase
public void setBase(byte base)
-
getReferenceBase
public byte getReferenceBase()
-
setReferenceBase
public void setReferenceBase(byte referenceBase)
-
-