|
33 | 33 | \newcommand*{\firstbytebox}[2]{\byteboxAux{#1}{#2}{\put(0,0){\line(0,1){\bytetotalheight}}}} |
34 | 34 | \newcommand*{\bytebox}[2]{\byteboxAux{#1}{#2}{}} |
35 | 35 |
|
36 | | -\newcommand*{\cclass}[1]{{\rm\sf :#1:}} |
| 36 | +\newcommand*{\cclass}[1]{[{\rm\sf :#1:}]} |
| 37 | +\newcommand*{\cclassexcept}[2]{[{\rm\sf :#1:}\caret #2]} |
37 | 38 | \newcommand*{\caret}{\textsuperscript{$\wedge$}} |
38 | 39 |
|
39 | 40 | \newcommand*{\memlimited}{\textcolor{gray}{\footnotesize\it limited}} |
@@ -81,7 +82,6 @@ \section{The SAM Format Specification} |
81 | 82 | For example, floating-point values in SAM always use `{\tt .}' for the decimal-point character. |
82 | 83 |
|
83 | 84 | The regular expressions in this specification are written using the POSIX\,/\,IEEE Std 1003.1 extended syntax. |
84 | | -For brevity, named character classes are written as~{\tt [\cclass{class}]} without an additional pair of brackets. |
85 | 85 |
|
86 | 86 | \subsection{An example}\label{sec:example} |
87 | 87 | Suppose we have the following alignment with bases in lowercase |
@@ -213,9 +213,7 @@ \subsubsection{Character set restrictions}\label{sec:charset} |
213 | 213 | {\tt [\verb"0-9A-Za-z!#$%&+./:;?@^_|~-"][\verb"0-9A-Za-z!#$%&*+./:;=?@^_|~-"]*} |
214 | 214 | \end{center} |
215 | 215 |
|
216 | | -% Pedantically this should be [[:rname:]^*=][[:rname:]]*, but we take advantage |
217 | | -% of POSIX (Issue 7) section 9.3.5/8 to elide the excess brackets for clarity. |
218 | | -\newcommand*{\rnameRegexp}{[\cclass{rname}\caret*=][\cclass{rname}]*} |
| 216 | +\newcommand*{\rnameRegexp}{[\cclassexcept{rname}{*=}][\cclass{rname}]*} |
219 | 217 |
|
220 | 218 | \noindent |
221 | 219 | For clarity, elsewhere in this specification we write this set of allowed characters as a character class~{\tt [\cclass{rname}]} and extend the POSIX regular expression notation to use {\tt\caret *=} to indicate the omission of `{\tt *}' and `{\tt =}' from the character class. |
@@ -305,6 +303,7 @@ \subsection{The header section} |
305 | 303 | These alternative names are not used elsewhere within the SAM file; |
306 | 304 | in particular, they must not appear in alignment records' {\sf RNAME} |
307 | 305 | or~{\sf RNEXT} fields. |
| 306 | +\newline |
308 | 307 | \emph{Regular expression}: \emph{name}{\tt (,}\emph{name}{\tt )*} |
309 | 308 | where \emph{name} is {\tt\rnameRegexp}\\\cline{2-3} |
310 | 309 | & {\tt AS} & Genome assembly identifier. \\\cline{2-3} |
|
0 commit comments