Skip to content

Commit

Permalink
Fix the SAM header requirements. Also clarify slice MD5 value zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbonfield committed Oct 6, 2017
1 parent b59a958 commit 367f372
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CRAMv3.tex
Original file line number Diff line number Diff line change
Expand Up @@ -563,10 +563,6 @@ \subsection{\textbf{BAM header block}}
\begin{itemize}
\item The SQ:MD5 checksum is required unless the reference sequence has been embedded
into the file.

\item At least one RG record is required.

\item The HD:SO sort order is always POS.
\end{itemize}

\subsection{\textbf{Compression header block}}
Expand Down Expand Up @@ -736,6 +732,13 @@ \subsection{\textbf{Slice header block}}
the same slice similarly to BAM file. Slices with unsorted reads must not contain
any other types of reads.

A slice containing data that does not use the external reference in
any sequence may set the reference MD5 sum to zero. This can happen
because it has an embedded reference, the data is unmapped, or the
sequence has been stored verbatim instead of via reference-differcing.
This latter scenario is recommended for unsorted or non-coordinate
sorted data.

The slice header block contains the following fields.

\begin{tabular}{|l|l|>{\raggedright}p{200pt}|}
Expand Down Expand Up @@ -763,7 +766,7 @@ \subsection{\textbf{Slice header block}}
reference sequence bases or -1 for none\tabularnewline
\hline
byte[16] & reference md5 & MD5 checksum of the reference bases within the slice
boundaries or 16 \textbackslash{}0 bytes for unmapped or unsorted reads\tabularnewline
boundaries or 16 \textbackslash{}0 bytes when unused\tabularnewline
\hline
byte[] & optional tags & a series of tag,type,value tuples encoded as
per BAM auxiliary fields.\tabularnewline
Expand Down

0 comments on commit 367f372

Please sign in to comment.