Refactoring codes for removing buffer size options. An some other changes...

Former-commit-id: 10b57cc1a27446ade3c444217341e9651e89cdce
This commit is contained in:
2023-03-07 11:12:13 +07:00
parent 9811e440b8
commit d88de15cdc
52 changed files with 1172 additions and 421 deletions

Binary file not shown.

View File

@ -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 */
</style>
@ -215,7 +278,7 @@ ul.task-list li input[type="checkbox"] {
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#sequence-attributes" id="toc-sequence-attributes" class="nav-link active" data-scroll-target="#sequence-attributes"><span class="toc-section-number">A.0.1</span> Sequence attributes</a></li>
<li><a href="#sequence-attributes" id="toc-sequence-attributes" class="nav-link active" data-scroll-target="#sequence-attributes"><span class="toc-section-number">A.1</span> Sequence attributes</a></li>
</ul>
</nav>
</div>
@ -239,84 +302,82 @@ ul.task-list li input[type="checkbox"] {
</header>
<section id="sequence-attributes" class="level3" data-number="A.0.1">
<h3 data-number="A.0.1" class="anchored" data-anchor-id="sequence-attributes"><span class="header-section-number">A.0.1</span> Sequence attributes</h3>
<section id="reserved-sequence-attributes" class="level4" data-number="A.0.1.1">
<h4 data-number="A.0.1.1" class="anchored" data-anchor-id="reserved-sequence-attributes"><span class="header-section-number">A.0.1.1</span> Reserved sequence attributes</h4>
<section id="ali_dir" class="level5" data-number="A.0.1.1.1">
<h5 data-number="A.0.1.1.1" class="anchored" data-anchor-id="ali_dir"><span class="header-section-number">A.0.1.1.1</span> <code>ali_dir</code></h5>
<section id="type-string" class="level6" data-number="A.0.1.1.1.1">
<h6 data-number="A.0.1.1.1.1" class="anchored" data-anchor-id="type-string"><span class="header-section-number">A.0.1.1.1.1</span> Type : <code>string</code></h6>
<p>The attribute can contain 2 string values <code>"left"</code> or <code>"right".</code></p>
</section>
<section id="set-by-the-obipairing-tool" class="level6" data-number="A.0.1.1.1.2">
<h6 data-number="A.0.1.1.1.2" class="anchored" data-anchor-id="set-by-the-obipairing-tool"><span class="header-section-number">A.0.1.1.1.2</span> Set by the <em>obipairing</em> tool</h6>
<section id="sequence-attributes" class="level2" data-number="A.1">
<h2 data-number="A.1" class="anchored" data-anchor-id="sequence-attributes"><span class="header-section-number">A.1</span> Sequence attributes</h2>
<p><strong>ali_dir (<code>string</code>)</strong></p>
<ul>
<li>Set by the <em>obipairing</em> tool</li>
<li>The attribute can contain 2 string values <code>left</code> or <code>right</code>.</li>
</ul>
<p>The alignment generated by <em>obipairing</em> is a 3-end gap free algorithm. Two cases can occur when aligning the forward and reverse reads. If the barcode is long enough, both the reads overlap only on their 3 ends. In such case, the alignment direction <code>ali_dir</code> is set to <em>left</em>. If the barcode is shorter than the read length, the paired reads overlap by their 5 ends, and the complete barcode is sequenced by both the reads. In that later case, <code>ali_dir</code> is set to <em>right</em>.</p>
</section>
</section>
<section id="ali_length" class="level5" data-number="A.0.1.1.2">
<h5 data-number="A.0.1.1.2" class="anchored" data-anchor-id="ali_length"><span class="header-section-number">A.0.1.1.2</span> <code>ali_length</code></h5>
<section id="set-by-the-obipairing-tool-1" class="level6" data-number="A.0.1.1.2.1">
<h6 data-number="A.0.1.1.2.1" class="anchored" data-anchor-id="set-by-the-obipairing-tool-1"><span class="header-section-number">A.0.1.1.2.1</span> Set by the <em>obipairing</em> tool</h6>
<p><strong>ali_length (<code>int</code>)</strong></p>
<ul>
<li>Set by the <em>obipairing</em> tool</li>
</ul>
<p>Length of the aligned parts when merging forward and reverse reads</p>
</section>
</section>
<section id="count-the-number-of-sequence-occurrences" class="level5" data-number="A.0.1.1.3">
<h5 data-number="A.0.1.1.3" class="anchored" data-anchor-id="count-the-number-of-sequence-occurrences"><span class="header-section-number">A.0.1.1.3</span> <code>count</code> : the number of sequence occurrences</h5>
<section id="set-by-the-obiuniq-tool" class="level6" data-number="A.0.1.1.3.1">
<h6 data-number="A.0.1.1.3.1" class="anchored" data-anchor-id="set-by-the-obiuniq-tool"><span class="header-section-number">A.0.1.1.3.1</span> Set by the <em>obiuniq</em> tool</h6>
<p>The <code>count</code> attribute indicates how-many strictly identical sequences have been merged in a single record. It contains an integer value. If it is absent this means that the sequence record represents a single occurrence of the sequence.</p>
</section>
<section id="getter-method-count" class="level6" data-number="A.0.1.1.3.2">
<h6 data-number="A.0.1.1.3.2" class="anchored" data-anchor-id="getter-method-count"><span class="header-section-number">A.0.1.1.3.2</span> Getter : method <code>Count()</code></h6>
<p><strong>count (<code>int</code>)</strong></p>
<ul>
<li>Set by the <em>obiuniq</em> tool</li>
<li>Getter : method <code>Count()</code></li>
<li>Setter : method <code>SetCount(int)</code></li>
</ul>
<p>The <code>count</code> attribute indicates how-many strictly identical reads have been merged in a single record. It contains an integer value. If it is absent this means that the sequence record represents a single occurrence of the sequence.</p>
<p>The <code>Count()</code> method allows to access to the count attribute as an integer value. If the <code>count</code> attribute is not defined for the given sequence, the value <em>1</em> is returned</p>
</section>
</section>
<section id="merged_" class="level5" data-number="A.0.1.1.4">
<h5 data-number="A.0.1.1.4" class="anchored" data-anchor-id="merged_"><span class="header-section-number">A.0.1.1.4</span> <code>merged_*</code></h5>
<section id="type-mapstringint" class="level6" data-number="A.0.1.1.4.1">
<h6 data-number="A.0.1.1.4.1" class="anchored" data-anchor-id="type-mapstringint"><span class="header-section-number">A.0.1.1.4.1</span> Type : <code>map[string]int</code></h6>
</section>
<section id="set-by-the-obiuniq-tool-1" class="level6" data-number="A.0.1.1.4.2">
<h6 data-number="A.0.1.1.4.2" class="anchored" data-anchor-id="set-by-the-obiuniq-tool-1"><span class="header-section-number">A.0.1.1.4.2</span> Set by the <em>obiuniq</em> tool</h6>
<p><strong>merged_* (<code>map[string]int</code>)</strong></p>
<ul>
<li>Set by the <em>obiuniq</em> tool</li>
</ul>
<p>The <code>-m</code> option of the <em>obiuniq</em> tools allows for keeping track of the distribution of the values stored in given attribute of interest. Often this option is used to summarise distribution of a sequence variant accross samples when <em>obiuniq</em> is run after running <em>obimultiplex</em>. The actual name of the attribute depends on the name of the monitored attribute. If <code>-m</code> option is used with the attribute <em>sample</em>, then this attribute names <em>merged_sample</em>.</p>
</section>
</section>
<section id="mode" class="level5" data-number="A.0.1.1.5">
<h5 data-number="A.0.1.1.5" class="anchored" data-anchor-id="mode"><span class="header-section-number">A.0.1.1.5</span> <code>mode</code></h5>
<section id="set-by-the-obipairing-tool-2" class="level6" data-number="A.0.1.1.5.1">
<h6 data-number="A.0.1.1.5.1" class="anchored" data-anchor-id="set-by-the-obipairing-tool-2"><span class="header-section-number">A.0.1.1.5.1</span> Set by the <em>obipairing</em> tool</h6>
<p><strong><code>obitag_ref_index</code></strong></p>
</section>
<section id="set-by-the-obirefidx-tool." class="level6" data-number="A.0.1.1.5.2">
<h6 data-number="A.0.1.1.5.2" class="anchored" data-anchor-id="set-by-the-obirefidx-tool."><span class="header-section-number">A.0.1.1.5.2</span> Set by the <em>obirefidx</em> tool.</h6>
<p><strong>mode (<code>string</code>)</strong></p>
<ul>
<li>Set by the <em>obipairing</em> tool</li>
<li>The attribute can contain 2 string values <code>join</code> or <code>alignment</code>.</li>
</ul>
<p><strong>obitag_ref_index (<code>map[string]string</code>)</strong></p>
<ul>
<li>Set by the <em>obirefidx</em> tool.</li>
</ul>
<p>It resumes to which taxonomic annotation a match to that sequence must lead according to the number of differences existing between the query sequence and the reference sequence having that tag.</p>
</section>
<section id="getter-method-count-1" class="level6" data-number="A.0.1.1.5.3">
<h6 data-number="A.0.1.1.5.3" class="anchored" data-anchor-id="getter-method-count-1"><span class="header-section-number">A.0.1.1.5.3</span> Getter : method <code>Count()</code></h6>
</section>
</section>
<section id="pairing_mismatches" class="level5" data-number="A.0.1.1.6">
<h5 data-number="A.0.1.1.6" class="anchored" data-anchor-id="pairing_mismatches"><span class="header-section-number">A.0.1.1.6</span> <code>pairing_mismatches</code></h5>
<section id="set-by-the-obipairing-tool-3" class="level6" data-number="A.0.1.1.6.1">
<h6 data-number="A.0.1.1.6.1" class="anchored" data-anchor-id="set-by-the-obipairing-tool-3"><span class="header-section-number">A.0.1.1.6.1</span> Set by the <em>obipairing</em> tool</h6>
</section>
</section>
<section id="score" class="level5" data-number="A.0.1.1.7">
<h5 data-number="A.0.1.1.7" class="anchored" data-anchor-id="score"><span class="header-section-number">A.0.1.1.7</span> <code>score</code></h5>
<section id="set-by-the-obipairing-tool-4" class="level6" data-number="A.0.1.1.7.1">
<h6 data-number="A.0.1.1.7.1" class="anchored" data-anchor-id="set-by-the-obipairing-tool-4"><span class="header-section-number">A.0.1.1.7.1</span> Set by the <em>obipairing</em> tool</h6>
</section>
</section>
<section id="score_norm" class="level5" data-number="A.0.1.1.8">
<h5 data-number="A.0.1.1.8" class="anchored" data-anchor-id="score_norm"><span class="header-section-number">A.0.1.1.8</span> <code>score_norm</code></h5>
<section id="set-by-the-obipairing-tool-5" class="level6" data-number="A.0.1.1.8.1">
<h6 data-number="A.0.1.1.8.1" class="anchored" data-anchor-id="set-by-the-obipairing-tool-5"><span class="header-section-number">A.0.1.1.8.1</span> Set by the <em>obipairing</em> tool</h6>
<div class="sourceCode" id="cb1"><pre class="sourceCode json code-with-copy"><code class="sourceCode json"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span><span class="dt">"0"</span><span class="fu">:</span><span class="st">"9606@Homo sapiens@species"</span><span class="fu">,</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">"2"</span><span class="fu">:</span><span class="st">"207598@Homininae@subfamily"</span><span class="fu">,</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">"3"</span><span class="fu">:</span><span class="st">"9604@Hominidae@family"</span><span class="fu">,</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">"8"</span><span class="fu">:</span><span class="st">"314295@Hominoidea@superfamily"</span><span class="fu">,</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">"10"</span><span class="fu">:</span><span class="st">"9526@Catarrhini@parvorder"</span><span class="fu">,</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">"12"</span><span class="fu">:</span><span class="st">"1437010@Boreoeutheria@clade"</span><span class="fu">,</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">"16"</span><span class="fu">:</span><span class="st">"9347@Eutheria@clade"</span><span class="fu">,</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">"17"</span><span class="fu">:</span><span class="st">"40674@Mammalia@class"</span><span class="fu">,</span></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">"22"</span><span class="fu">:</span><span class="st">"117571@Euteleostomi@clade"</span><span class="fu">,</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">"25"</span><span class="fu">:</span><span class="st">"7776@Gnathostomata@clade"</span><span class="fu">,</span></span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> <span class="dt">"29"</span><span class="fu">:</span><span class="st">"33213@Bilateria@clade"</span><span class="fu">,</span></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> <span class="dt">"30"</span><span class="fu">:</span><span class="st">"6072@Eumetazoa@clade"</span><span class="fu">}</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p><strong>pairing_mismatches (<code>map[string]string</code>)</strong></p>
<ul>
<li>Set by the <em>obipairing</em> tool</li>
</ul>
<p><strong>seq_a_single (<code>int</code>)</strong></p>
<ul>
<li>Set by the <em>obipairing</em> tool</li>
</ul>
<p><strong>seq_ab_match (<code>int</code>)</strong></p>
<ul>
<li>Set by the <em>obipairing</em> tool</li>
</ul>
<p><strong>seq_b_single (<code>int</code>)</strong></p>
<ul>
<li>Set by the <em>obipairing</em> tool</li>
</ul>
<p><strong>score (<code>int</code>)</strong></p>
<ul>
<li>Set by the <em>obipairing</em> tool</li>
</ul>
<p><strong>score_norm (<code>float</code>)</strong></p>
<ul>
<li>Set by the <em>obipairing</em> tool</li>
<li>The value ranges between 0 and 1.</li>
</ul>
<p>Score of the alignment between forward and reverse reads expressed as a fraction of identity.</p>
</section>
</section>
</section>
</section>
</main> <!-- /main -->

View File

@ -314,6 +314,23 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<section id="selecting-sequences-based-on-their-caracteristics" class="level4" data-number="12.1.1.1">
<h4 data-number="12.1.1.1" class="anchored" data-anchor-id="selecting-sequences-based-on-their-caracteristics"><span class="header-section-number">12.1.1.1</span> Selecting sequences based on their caracteristics</h4>
<p>Sequences can be selected on several of their caracteristics, their length, their id, their sequence. Options allow for specifying the condition if selection.</p>
<p><strong>Selection based on the sequence</strong></p>
<p>Sequence records can be selected according if they match or not with a pattern. The simplest pattern is as short sequence (<em>e.g</em> <code>AACCTT</code>). But the usage of regular patterns allows for looking for more complex pattern. As example, <code>A[TG]C+G</code> matches a <code>A</code>, followed by a <code>T</code> or a <code>G</code>, then one or several <code>C</code> and endly a <code>G</code>.</p>
<dl>
<dt><strong>--sequence</strong>|<strong>-s</strong> <em>PATTERN</em></dt>
<dd>
<p>Regular expression pattern to be tested against the sequence itself. The pattern is case insensitive. A complete description of the regular pattern grammar is available <a href="https://yourbasic.org/golang/regexp-cheat-sheet/#cheat-sheet">here</a>.</p>
</dd>
<dt><em>Examples:</em></dt>
<dd>
<p>Selects only the sequence records that contain an <em>EcoRI</em> restriction site.</p>
</dd>
</dl>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">obigrep</span> <span class="at">-s</span> <span class="st">'GAATTC'</span> seq1.fasta <span class="op">&gt;</span> seq2.fasta</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>: Selects only the sequence records that contain a stretch of at least 10 <code>A</code>.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">obigrep</span> <span class="at">-s</span> <span class="st">'A{10,}'</span> seq1.fasta <span class="op">&gt;</span> seq2.fasta</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>: Selects only the sequence records that do not contain ambiguous nucleotides.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">obigrep</span> <span class="at">-s</span> <span class="st">'^[ACGT]+$'</span> seq1.fasta <span class="op">&gt;</span> seq2.fasta</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<dl>
<dt><strong>--min-count</strong> | <strong>-c</strong> <em>COUNT</em></dt>
<dd>
@ -323,12 +340,12 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<dd>
<p>only sequences reprensenting no more than <em>COUNT</em> reads will be selected. That option rely on the <code>count</code> attribute. If the <code>count</code> attribute is not defined for a sequence record, it is assumed equal to <span class="math inline">\(1\)</span>.</p>
</dd>
<dt>Example</dt>
<dt><em>Examples</em></dt>
<dd>
<p>Selecting sequence records representing at least five reads in the dataset.</p>
</dd>
</dl>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">obigrep</span> <span class="at">-c</span> 5 data_SPER01.fasta <span class="op">&gt;</span> data_norare_SPER01.fasta</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="sourceCode" id="cb4"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">obigrep</span> <span class="at">-c</span> 5 data_SPER01.fasta <span class="op">&gt;</span> data_norare_SPER01.fasta</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</section>

View File

@ -124,6 +124,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
}
}</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
@ -284,6 +285,8 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<li><a href="#instrospection-functions" id="toc-instrospection-functions" class="nav-link" data-scroll-target="#instrospection-functions">Instrospection functions</a></li>
<li><a href="#cast-functions" id="toc-cast-functions" class="nav-link" data-scroll-target="#cast-functions">Cast functions</a></li>
<li><a href="#string-related-functions" id="toc-string-related-functions" class="nav-link" data-scroll-target="#string-related-functions">String related functions</a></li>
<li><a href="#condition-function" id="toc-condition-function" class="nav-link" data-scroll-target="#condition-function">Condition function</a></li>
<li><a href="#sequence-analysis-related-function" id="toc-sequence-analysis-related-function" class="nav-link" data-scroll-target="#sequence-analysis-related-function"><span class="toc-section-number">7.2.1</span> Sequence analysis related function</a></li>
</ul></li>
<li><a href="#accessing-to-the-sequence-annotations" id="toc-accessing-to-the-sequence-annotations" class="nav-link" data-scroll-target="#accessing-to-the-sequence-annotations"><span class="toc-section-number">7.3</span> Accessing to the sequence annotations</a></li>
</ul>
@ -321,24 +324,67 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<h2 data-number="7.2" class="anchored" data-anchor-id="function-defined-in-the-language"><span class="header-section-number">7.2</span> Function defined in the language</h2>
<section id="instrospection-functions" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="instrospection-functions">Instrospection functions</h3>
<ul>
<li><code>len(x)</code>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 <code>annotations</code>, the number of elements in an array. The reurned value is an <code>int</code>.</li>
</ul>
<dl>
<dt><strong><code>len(x)</code></strong></dt>
<dd>
<p>It 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 <code>annotations</code>, the number of elements in an array. The reurned value is an <code>int</code>.</p>
</dd>
</dl>
</section>
<section id="cast-functions" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="cast-functions">Cast functions</h3>
<ul>
<li><code>int(x)</code> converts if possible the <code>x</code> value to an integer value. The function returns an <code>int</code>.</li>
<li><code>numeric(x)</code> converts if possible the <code>x</code> value to a float value. The function returns a <code>float</code>.</li>
<li><code>bool(x)</code> converts if possible the <code>x</code> value to a boolean value. The function returns a <code>bool</code>.</li>
</ul>
<dl>
<dt><strong><code>int(x)</code></strong></dt>
<dd>
<p>Converts if possible the <code>x</code> value to an integer value. The function returns an <code>int</code>.</p>
</dd>
<dt><strong><code>numeric(x)</code></strong></dt>
<dd>
<p>Converts if possible the <code>x</code> value to a float value. The function returns a <code>float</code>.</p>
</dd>
<dt><strong><code>bool(x)</code></strong></dt>
<dd>
<p>Converts if possible the <code>x</code> value to a boolean value. The function returns a <code>bool</code>.</p>
</dd>
</dl>
</section>
<section id="string-related-functions" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="string-related-functions">String related functions</h3>
<ul>
<li><code>printf(format,...)</code> allows to combine several values to build a string. <code>format</code> follows the classical C <code>printf</code> syntax. The function returns a <code>string</code>.</li>
<li><code>subspc(x)</code> substitutes every space in the <code>x</code> string by the underscore (<code>_</code>) character. The function returns a <code>string</code>.</li>
</ul>
<dl>
<dt><strong><code>printf(format,...)</code></strong></dt>
<dd>
<p>Allows to combine several values to build a string. <code>format</code> follows the classical C <code>printf</code> syntax. The function returns a <code>string</code>.</p>
</dd>
<dt><strong><code>subspc(x)</code></strong></dt>
<dd>
<p>substitutes every space in the <code>x</code> string by the underscore (<code>_</code>) character. The function returns a <code>string</code>.</p>
</dd>
</dl>
</section>
<section id="condition-function" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="condition-function">Condition function</h3>
<dl>
<dt><strong><code>ifelse(condition,val1,val2)</code></strong></dt>
<dd>
<p>The <code>condition</code> value has to be a <code>bool</code> value. If it is <code>true</code> the function returns <code>val1</code>, otherwise, it is returning <code>val2</code>.</p>
</dd>
</dl>
</section>
<section id="sequence-analysis-related-function" class="level3" data-number="7.2.1">
<h3 data-number="7.2.1" class="anchored" data-anchor-id="sequence-analysis-related-function"><span class="header-section-number">7.2.1</span> Sequence analysis related function</h3>
<dl>
<dt><strong><code>composition(sequence)</code></strong></dt>
<dd>
<p>The nucleotide composition of the sequence is returned as as map indexed by <code>a</code>, <code>c</code>, <code>g</code>, or <code>t</code> and each value is the number of occurrences of that nucleotide. A fifth key <code>others</code> accounts for all others symboles.</p>
</dd>
<dt><strong><code>gcskew(sequence)</code></strong></dt>
<dd>
<p>Computes the excess of g compare to c of the sequence, known as the GC skew.</p>
<p><span class="math display">\[
Skew_{GC}=\frac{G-C}{G+C}
\]</span></p>
</dd>
</dl>
</section>
</section>
<section id="accessing-to-the-sequence-annotations" class="level2" data-number="7.3">
@ -352,6 +398,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<li>The sequence identifier : <code>Id()</code></li>
<li>THe sequence definition : <code>Definition()</code></li>
</ul>
<div class="sourceCode" id="cb3"><pre class="sourceCode go code-with-copy"><code class="sourceCode go"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>sequence<span class="op">.</span>Id<span class="op">()</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</section>

View File

@ -174,14 +174,22 @@ selected.
That option rely on the \f[V]count\f[R] attribute.
If the \f[V]count\f[R] attribute is not defined for a sequence record,
it is assumed equal to 1.
.PP
.TP
\f[B]--max-length\f[R] | \f[B]-L\f[R] \f[I]LENGTH\f[R]
.PP
Keeps sequence records whose sequence length is equal or shorter than
\f[I]LENGTH\f[R].
.TP
\f[B]--min-length\f[R] | \f[B]-l\f[R] \f[I]LENGTH\f[R]
Keeps sequence records whose sequence length is equal or longer than
\f[I]LENGTH\f[R].
.PP
\f[B]--predicate\f[R]|\f[B]-p\f[R] \f[I]EXPRESSION\f[R]
.PP
.TP
\f[B]--sequence\f[R]|\f[B]-s\f[R] \f[I]PATTERN\f[R]
Regular expression pattern to be tested against the sequence itself.
The pattern is case insensitive.
A complete description of the regular pattern grammar is available
here (https://yourbasic.org/golang/regexp-cheat-sheet/#cheat-sheet).
.PP
\f[B]--inverse-match\f[R] | \f[B]-v\f[R]
.PP