Skip to content

Commit

Permalink
build based on 22768ca
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Oct 8, 2024
1 parent 7eddf97 commit 60d90c5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.11.0","generation_timestamp":"2024-10-08T13:30:56","documenter_version":"1.7.0"}}
{"documenter":{"julia_version":"1.11.0","generation_timestamp":"2024-10-08T13:30:58","documenter_version":"1.7.0"}}
20 changes: 10 additions & 10 deletions dev/alignments/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
1 3 10 11 16 11 4 15 7 17 5 5 5 3 10 10 18 3 1
14 3 5 15 14 12 4 2 7 14 5 2 17 3 7 21 8 3 10
1 3 21 19 7 16 13 5 7 21 15 5 17 3 5 2 16 3 1
9 3 12 11 14 10 4 18 7 18 15 5 2 3 5 2 19 3 2</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; size(A) # length and number of sequences</code><code class="nohighlight hljs ansi" style="display:block;">(53, 100)</code></pre><p>When reading from FASTA, the choice of the alphabet is made by reading the first five sequences, and comparing the observed characters with the list of default alphabets (see <a href="../alphabets/#The-Alphabet-type">The <code>Alphabet</code> type</a>). If they fit one of the defaults, it will be used. Otherwise, an alphabet will be created <em>ad hoc</em>: </p><pre><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; A = read_fasta(&quot;../../example/strange_characters.fasta&quot;); # warning produced because no default alphabet was found</code><code class="nohighlight hljs ansi" style="display:block;">┌ Warning: Could not find a default alphabet for characters [&#39;!&#39;, &#39;-&#39;, &#39;/&#39;, &#39;0&#39;, &#39;9&#39;, &#39;@&#39;, &#39;A&#39;, &#39;C&#39;, &#39;G&#39;, &#39;T&#39;]
Using Alphabet{Char,Int64}: [&#39;!&#39;, &#39;-&#39;, &#39;/&#39;, &#39;0&#39;, &#39;9&#39;, &#39;@&#39;, &#39;A&#39;, &#39;C&#39;, &#39;G&#39;, &#39;T&#39;]
@ BioSequenceMappings ~/work/BioSequenceMappings.jl/BioSequenceMappings.jl/src/IO.jl:62</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; A.alphabet |&gt; symbols |&gt; prod</code><code class="nohighlight hljs ansi" style="display:block;">&quot;!-/09@ACGT&quot;</code></pre><p>Writing to a FASTA file is just as easy: </p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; write(&quot;new_fasta_file.fasta&quot;, A) # or...</code><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; open(&quot;new_fasta_file.fasta&quot;, &quot;w&quot;) do io
9 3 12 11 14 10 4 18 7 18 15 5 2 3 5 2 19 3 2</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; size(A) # length and number of sequences</code><code class="nohighlight hljs ansi" style="display:block;">(53, 100)</code></pre><p>When reading from FASTA, the choice of the alphabet is made by reading the first five sequences, and comparing the observed characters with the list of default alphabets (see <a href="../alphabets/#The-Alphabet-type">The <code>Alphabet</code> type</a>). If they fit one of the defaults, it will be used. Otherwise, an alphabet will be created <em>ad hoc</em>: </p><pre><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; A = read_fasta(&quot;../../example/strange_characters.fasta&quot;); # warning produced because no default alphabet was found</code><code class="nohighlight hljs ansi" style="display:block;"><span class="sgr33"><span class="sgr1">┌ Warning: </span></span>Could not find a default alphabet for characters [&#39;!&#39;, &#39;-&#39;, &#39;/&#39;, &#39;0&#39;, &#39;9&#39;, &#39;@&#39;, &#39;A&#39;, &#39;C&#39;, &#39;G&#39;, &#39;T&#39;]
<span class="sgr33"><span class="sgr1"></span></span> Using Alphabet{Char,Int64}: [&#39;!&#39;, &#39;-&#39;, &#39;/&#39;, &#39;0&#39;, &#39;9&#39;, &#39;@&#39;, &#39;A&#39;, &#39;C&#39;, &#39;G&#39;, &#39;T&#39;]
<span class="sgr33"><span class="sgr1"></span></span><span class="sgr90">@ BioSequenceMappings ~/work/BioSequenceMappings.jl/BioSequenceMappings.jl/src/IO.jl:62</span></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; A.alphabet |&gt; symbols |&gt; prod</code><code class="nohighlight hljs ansi" style="display:block;">&quot;!-/09@ACGT&quot;</code></pre><p>Writing to a FASTA file is just as easy: </p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; write(&quot;new_fasta_file.fasta&quot;, A) # or...</code><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; open(&quot;new_fasta_file.fasta&quot;, &quot;w&quot;) do io
write(io, A)
end</code><code class="nohighlight hljs ansi" style="display:block;"></code></pre><h2 id="Accessing-and-iterating"><a class="docs-heading-anchor" href="#Accessing-and-iterating">Accessing &amp; iterating</a><a id="Accessing-and-iterating-1"></a><a class="docs-heading-anchor-permalink" href="#Accessing-and-iterating" title="Permalink"></a></h2><p>Sequences can be accessed by indexing. Indexing using a range will return a view in the underlying <code>data</code> matrix. </p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; A[1] # the first sequence of the alignment</code><code class="nohighlight hljs ansi" style="display:block;">53-element view(::Matrix{Int64}, :, 1) with eltype Int64:
1
Expand Down Expand Up @@ -86,14 +86,14 @@
3×10 adjoint(::Matrix{Int64}) with eltype Int64:
4 3 5 3 3 5 5 3 5 1
3 3 5 2 2 1 5 3 1 2
5 3 4 2 4 1 5 1 5 5</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; subsample_random(A, 12) # sampling without replacement: this will error since size(A, 1) &lt; 12</code><code class="nohighlight hljs ansi" style="display:block;">ERROR: AssertionError: Cannot take 12 different sequences from alignment of size 5</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; rand(A) # one random sequence from A (returns a view)</code><code class="nohighlight hljs ansi" style="display:block;">10-element view(::Matrix{Int64}, :, 1) with eltype Int64:
5 3 4 2 4 1 5 1 5 5</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; subsample_random(A, 12) # sampling without replacement: this will error since size(A, 1) &lt; 12</code><code class="nohighlight hljs ansi" style="display:block;">ERROR: AssertionError: Cannot take 12 different sequences from alignment of size 5</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; rand(A) # one random sequence from A (returns a view)</code><code class="nohighlight hljs ansi" style="display:block;">10-element view(::Matrix{Int64}, :, 3) with eltype Int64:
4
3
5
3
4
2
4
1
3
5
1
5
5</code></pre><h2 id="OneHotAlignment"><a class="docs-heading-anchor" href="#OneHotAlignment">OneHotAlignment</a><a id="OneHotAlignment-1"></a><a class="docs-heading-anchor-permalink" href="#OneHotAlignment" title="Permalink"></a></h2><p>TBA</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../alphabets/">« Alphabets</a><a class="docs-footer-nextpage" href="../utilities/">Utilities »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Tuesday 8 October 2024 13:30">Tuesday 8 October 2024</span>. Using Julia version 1.11.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
3
5
1</code></pre><h2 id="OneHotAlignment"><a class="docs-heading-anchor" href="#OneHotAlignment">OneHotAlignment</a><a id="OneHotAlignment-1"></a><a class="docs-heading-anchor-permalink" href="#OneHotAlignment" title="Permalink"></a></h2><p>TBA</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../alphabets/">« Alphabets</a><a class="docs-footer-nextpage" href="../utilities/">Utilities »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Tuesday 8 October 2024 13:30">Tuesday 8 October 2024</span>. Using Julia version 1.11.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 60d90c5

Please sign in to comment.