diff --git a/Release-notes.md b/Release-notes.md
new file mode 100644
index 0000000..6291fa6
--- /dev/null
+++ b/Release-notes.md
@@ -0,0 +1,29 @@
+# OBITools release notes
+
+## February $18^th$, 2023. Release 4.0.0
+
+It is the first version of the *OBITools* version 4. I decided to tag then following two weeks
+of intensive data analysis with them allowing to discover many small bugs present in the previous
+non-official version. Obviously other bugs are certainly persent in the code, and you are welcome
+to use the git ticket system to mention them. But they seems to produce now reliable results.
+
+### Corrected bugs
+
+- On some computers the end of the output file was lost, leading to the loose of sequences and
+ to the production of incorrect file because of the last sequence record, sometime truncated in
+ its middle. This was only occurring when more than a single CPU was used. It was affecting every obitools.
+- The `obiparing` software had a bug in the right aligment procedure. This led to the non alignment
+ of very sort barcode during the paring of the forward and reverse reads.
+- The `obipairing` tools had a non deterministic comportment when aligning a paor very low quality reads.
+ This induced that the result of the same low quality read pair was not the same from run to run.
+
+### New functionality
+
+- Adding of a `--compress|-Z` option to every obitools allowing to produce `gz` compressed output. OBITools
+ were already able to deal with gziped input files transparently. They can now produce their résults in the same format.
+- Adding of a `--append|-A` option to the `obidistribute` tool. It allows to append the result of an
+ `obidistribute` execution to preexisting files.
+- Adding of a `--directory|-d` option to the `obidistribute` tool. It allows to declare a secondary
+ classification key over the one defined by the '--category|-c` option. This extra key leads to produce
+ directories in which files produced according to the primary criterion are stored.
+- Adding of the functions `subspc`, `printf`, `int`, `numeric`, and `bool` to the expression language.
\ No newline at end of file
diff --git a/cmd/obitools/obidistribute/main.go b/cmd/obitools/obidistribute/main.go
index 29c6ef8..80e47ae 100644
--- a/cmd/obitools/obidistribute/main.go
+++ b/cmd/obitools/obidistribute/main.go
@@ -16,6 +16,7 @@ func main() {
_, args, _ := optionParser(os.Args)
fs, _ := obiconvert.ReadBioSequences(args...)
+
obidistribute.DistributeSequence(fs)
obiiter.WaitForLastPipe()
diff --git a/doc/_book/commands.html b/doc/_book/commands.html
index 2d0eaa3..0e8d7f0 100644
--- a/doc/_book/commands.html
+++ b/doc/_book/commands.html
@@ -20,6 +20,69 @@ ul.task-list li input[type="checkbox"] {
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+div.sourceCode { margin: 1em 0; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+ { counter-reset: source-line 0; }
+pre.numberSource code > span
+ { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+ { content: counter(source-line);
+ position: relative; left: -1em; text-align: right; vertical-align: baseline;
+ border: none; display: inline-block;
+ -webkit-touch-callout: none; -webkit-user-select: none;
+ -khtml-user-select: none; -moz-user-select: none;
+ -ms-user-select: none; user-select: none;
+ padding: 0 4px; width: 4em;
+ color: #aaaaaa;
+ }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
+div.sourceCode
+ { }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
div.csl-bib-body { }
div.csl-entry {
clear: both;
@@ -175,16 +238,36 @@ div.csl-indent {
4.3.2 Function defined in the language
4.3.3 Accessing to the sequence annotations
- 4.4 Metabarcode design and quality assessment
- 4.5 File format conversions
- 4.6 Sequence annotations
+ 4.4 Metabarcode design and quality assessment
+
+ 4.5 File format conversions
+
+ 4.6 Sequence annotations
+
4.7 Computations on sequences
4.8 Sequence sampling and filtering
+ 4.9 Utilities
+
@@ -268,40 +351,52 @@ div.csl-indent {
Several OBITools (e.g. obigrep, obiannotate) allow the user to specify some simple expressions to compute values or define predicates. This expressions are parsed and evaluated using the gval go package, which allows for evaluating go-Like expression.
Variables usable in the expression
-
- sequence
-sequence is the sequence object on which the expression is evaluated
-
-
+
+sequence
is the sequence object on which the expression is evaluated.
+annotations
is a map object containing every annotations associated to the currently processed sequence.
+
Function defined in the language
-
- len
+
+Instrospection functions
+
+len(x)
is a generic function allowing to retreive the size of a object. It returns the length of a sequences, the number of element in a map like annotations
, the number of elements in an array. The reurned value is an int
.
+
-
- ismap
+
+Cast functions
+
+int(x)
converts if possible the x
value to an integer value. The function returns an int
.
+numeric(x)
converts if possible the x
value to a float value. The function returns a float
.
+bool(x)
converts if possible the x
value to a boolean value. The function returns a bool
.
+
-
-
-
Accessing to the sequence annotations
+The annotations
variable is a map object containing all the annotations associated to the currently processed sequence. Index of the map are the attribute names. It exists to possibillities to retreive an annotation. It is possible to use the classical []
indexing operator, putting the attribute name quoted by double quotes between them.
+
+The above code retreives the direction
annotation. A second notation using the dot (.
) is often more convenient.
+
+Special attributes of the sequence are accessible only by dedicated methods of the sequence
object.
+
+- The sequence identifier :
Id()
+- THe sequence definition :
Definition()
+