Package htsjdk.samtools
Class SAMTextHeaderCodec
java.lang.Object
htsjdk.samtools.SAMTextHeaderCodec
Parser for a SAM text header, and a generator of SAM text header.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(LineReader reader, String source) Reads text SAM header and converts to a SAMFileHeader object.voidencode(Writer writer, SAMFileHeader header) Convert SAMFileHeader from in-memory representation to text representation.voidencode(Writer writer, SAMFileHeader header, boolean keepExistingVersionNumber) Convert SAMFileHeader from in-memory representation to text representation.protected StringgetPGLine(SAMProgramRecord programRecord) protected StringgetRGLine(SAMReadGroupRecord readGroup) protected StringgetSQLine(SAMSequenceRecord sequenceRecord) voidsetValidationStringency(ValidationStringency validationStringency)
-
Field Details
-
COMMENT_PREFIX
-
-
Constructor Details
-
SAMTextHeaderCodec
public SAMTextHeaderCodec()
-
-
Method Details
-
decode
Reads text SAM header and converts to a SAMFileHeader object.- Parameters:
reader- Where to get header text from.source- Name of the input file, for error messages. May be null.- Returns:
- complete header object.
-
encode
Convert SAMFileHeader from in-memory representation to text representation. Always writes SAMFileHeader.CURRENT_VERSION as the version in the header.- Parameters:
writer- where to write the header text.header- object to be converted to text.
-
encode
Convert SAMFileHeader from in-memory representation to text representation.- Parameters:
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.
-
getPGLine
-
getRGLine
-
getSQLine
-
setValidationStringency
-