SamHeader

Represents SAM header

Constructors

this
this()

Construct empty SAM header

this
this(string header_text)

Parse SAM header given in plain text.

Members

Functions

getSequence
SqLine getSequence(size_t index)
getSequenceIndex
int getSequenceIndex(string sequence_name)

Zero-based index of sequence. If such sequence does not exist in the header, returns -1.

sequences
SqLineDictionary sequences()

Dictionary of @SQ lines. Removal is not allowed, you can only replace the whole dictionary.

sequences
void sequences(SqLineDictionary dict)
Undocumented in source. Be warned that the author may not have intended to support it.
text
string text()

Get header text representation in SAM format (includes trailing '\n')

toJson
void toJson(Sink sink)
Undocumented in source. Be warned that the author may not have intended to support it.
toMsgpack
void toMsgpack(Packer packer)

Packs message in the following format:
MsgPack array with elements

  1. format version - string
  2. sorting order - string
  3. @SQ lines - array of dictionaries
  4. @RG lines - array of dictionaries
  5. @PG lines - array of dictionaries


Dictionary keys are the same as in SAM format.

toSam
void toSam(Sink sink)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
void toString(void delegate(const(char)[]) sink, FormatSpec!char fmt)

Header text representation in SAM ("%s") or JSON format ("%j").
Includes trailing '\n'.

Manifest constants

DEFAULT_FORMAT_VERSION
enum DEFAULT_FORMAT_VERSION;

Variables

comments
string[] comments;

Array of @CO lines

format_version
string format_version;

Format version

programs
PgLineDictionary programs;

Dictionary of @PG lines

read_groups
RgLineDictionary read_groups;

Dictionary of @RG lines

sorting_order
SortingOrder sorting_order;

Sorting order

Meta