public class SAMTextHeaderCodec extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static String |
COMMENT_PREFIX |
| Constructor | Description |
|---|---|
SAMTextHeaderCodec() |
| Modifier and Type | Method | Description |
|---|---|---|
SAMFileHeader |
decode(LineReader reader,
String source) |
Reads text SAM header and converts to a SAMFileHeader object.
|
void |
encode(Writer writer,
SAMFileHeader header) |
Convert SAMFileHeader from in-memory representation to text representation.
|
void |
encode(Writer writer,
SAMFileHeader header,
boolean keepExistingVersionNumber) |
Convert SAMFileHeader from in-memory representation to text representation.
|
protected String |
getPGLine(SAMProgramRecord programRecord) |
|
protected String |
getRGLine(SAMReadGroupRecord readGroup) |
|
protected String |
getSQLine(SAMSequenceRecord sequenceRecord) |
|
void |
setValidationStringency(ValidationStringency validationStringency) |
public static final String COMMENT_PREFIX
public SAMFileHeader decode(LineReader reader, String source)
reader - Where to get header text from.source - Name of the input file, for error messages. May be null.public void encode(Writer writer, SAMFileHeader header)
writer - where to write the header text.header - object to be converted to text.public void encode(Writer writer, SAMFileHeader header, boolean keepExistingVersionNumber)
writer - where to write the header text.header - object to be converted to text.keepExistingVersionNumber - If true, writes whatever version # was in the header. If false, writes
SAMFileHeader.CURRENT_VERSION.protected String getPGLine(SAMProgramRecord programRecord)
protected String getRGLine(SAMReadGroupRecord readGroup)
protected String getSQLine(SAMSequenceRecord sequenceRecord)
public void setValidationStringency(ValidationStringency validationStringency)