public final class CramHeader extends Object
CramHeader
holds 2 things: 1. File format definition, including content id and
version information 2. SAM file headerModifier and Type | Field | Description |
---|---|---|
static byte[] |
MAGIC |
Constructor | Description |
---|---|
CramHeader(Version version,
String id,
SAMFileHeader samFileHeader) |
Create a new
CramHeader object with the specified version, id and SAM file header. |
Modifier and Type | Method | Description |
---|---|---|
CramHeader |
clone() |
Copy the CRAM header into a new
CramHeader object. |
boolean |
equals(Object obj) |
Checks if content of a header is the same as this one.
|
byte[] |
getId() |
|
SAMFileHeader |
getSamFileHeader() |
Get the
SAMFileHeader object associated with this CRAM file header. |
Version |
getVersion() |
|
void |
setID(String stringID) |
Set the id of the header.
|
void |
setVersion(Version version) |
public CramHeader(Version version, String id, SAMFileHeader samFileHeader)
CramHeader
object with the specified version, id and SAM file header.
The id field by default is guaranteed to be byte[20].version
- the CRAM version to assumeid
- an identifier of the content associated with this headersamFileHeader
- the SAM file headerpublic void setID(String stringID)
stringID
- a new id; only first 20 bytes from byte representation of java String
will be used.public CramHeader clone()
CramHeader
object.public boolean equals(Object obj)
public SAMFileHeader getSamFileHeader()
SAMFileHeader
object associated with this CRAM file header.public byte[] getId()
public Version getVersion()
public void setVersion(Version version)