Skip to content

Commit 9bdcdbc

Browse files
Yossi Farjounjmarshall
authored andcommitted
New OA tag for storing Original Alignment when modifying record (PR #193)
Deprecate OC and OP as they're superseded by the more general OA.
1 parent 840f4f4 commit 9bdcdbc

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

SAMtags.tex

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ \section{Standard tags}
9292
{\tt MQ} & i & Mapping quality of the mate/next segment \\
9393
{\tt NH} & i & Number of reported alignments that contain the query in the current record \\
9494
{\tt NM} & i & Edit distance to the reference \\
95-
{\tt OC} & Z & Original CIGAR \\
96-
{\tt OP} & i & Original mapping position \\
95+
{\tt OA} & Z & Original alignment \\
96+
{\tt OC} & Z & Original CIGAR (deprecated; use {\tt OA} instead) \\
97+
{\tt OP} & i & Original mapping position (deprecated; use {\tt OA} instead) \\
9798
{\tt OQ} & Z & Original base quality \\
9899
{\tt OX} & Z & Original unique molecular barcode bases \\
99100
{\tt PG} & Z & Program \\
@@ -346,11 +347,30 @@ \subsection{Barcodes}
346347
\subsection{Original data}
347348

348349
\begin{description}
350+
\item[OA:Z:\tagregex{(\metavar{RNAME},\metavar{POS},\metavar{strand},\metavar{CIGAR},\metavar{MAPQ},\metavar{NM};)+}]
351+
The original alignment information of the record prior to realignment or unalignment by a subsequent tool.
352+
Each original alignment entry contains the following six field values from the original record, generally in their textual SAM representations, separated by commas (`{\tt ,}') and terminated by a semicolon (`{\tt ;}'):
353+
{\sf RNAME}, which must be explicit (unlike {\sf RNEXT}, `{\tt =}' may not be used here);
354+
1-based {\sf POS};
355+
`{\tt +}' or `{\tt -}', indicating forward/reverse strand respectively (as per bit~0x10 of {\sf FLAG});
356+
{\sf CIGAR};
357+
{\sf MAPQ};
358+
{\tt NM} tag value, which may be omitted (though the preceding comma must be retained).
359+
360+
In the presence of an existing {\tt OA} tag, a subsequent tool may append another original alignment entry after the semicolon,
361+
adding to---rather than replacing---the existing {\tt OA} information.
362+
363+
The {\tt OA} field is designed to provide record-level information that can be useful for understanding the provenance of the information in a record.
364+
It is not designed to provide a complete history of the template alignment information.
365+
In particular, realignments resulting in the the removal of Secondary or Supplementary records will cause the loss of all tags associated with those records, and may also leave the {\tt SA} tag in an invalid state.
366+
349367
\item[OC:Z:\tagvalue{cigar}]
350368
Original CIGAR, usually before realignment.
369+
Deprecated in favour of the more general {\tt OA}.
351370

352371
\item[OP:i:\tagvalue{pos}]
353-
Original 1-based mapping position, usually before realignment.
372+
Original 1-based {\sf POS}, usually before realignment.
373+
Deprecated in favour of the more general {\tt OA}.
354374

355375
\item[OQ:Z:\tagvalue{qualities}]
356376
Original base quality, usually before recalibration.
@@ -453,6 +473,11 @@ \section{Tag History}
453473
\setlength{\parindent}{0pt}
454474
\newcommand*{\gap}{\vspace*{2ex}}
455475

476+
\subsubsection*{January 2019}
477+
Added the OA tag for recording original/previous alignment information.
478+
479+
Deprecated the OC and OP tags.
480+
456481
\subsubsection*{July 2018}
457482

458483
Clarified the calculation of NM score.

0 commit comments

Comments
 (0)