1
0
Fork 0
mirror of https://github.com/MillironX/XAM.jl.git synced 2024-12-27 01:53:17 -05:00
XAM.jl/dev/api/public/index.html

25 lines
59 KiB
HTML
Raw Normal View History

2019-08-12 03:25:08 -04:00
<!DOCTYPE html>
2019-08-22 21:49:56 -04:00
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Public · XAM.jl</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link href="../../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>XAM.jl</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../../">Home</a></li><li><a class="toctext" href="../../hts-files/">SAM and BAM</a></li><li><span class="toctext">API Reference</span><ul><li class="current"><a class="toctext" href>Public</a><ul class="internal"><li><a class="toctext" href="#Contents-1">Contents</a></li><li><a class="toctext" href="#SAM-API-1">SAM API</a></li><li><a class="toctext" href="#BAM-API-1">BAM API</a></li></ul></li></ul></li></ul></nav><article id="docs"><header><nav><ul><li>API Reference</li><li><a href>Public</a></li></ul><a class="edit-page" href="https://github.com/BioJulia/XAM.jl/blob/develop/docs/src/api/public.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Public</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Public-API-Reference-1" href="#Public-API-Reference-1">Public API Reference</a></h1><h2><a class="nav-anchor" id="Contents-1" href="#Contents-1">Contents</a></h2><ul><li><a href="#Public-API-Reference-1">Public API Reference</a></li><ul><li><a href="#Contents-1">Contents</a></li><li><a href="#SAM-API-1">SAM API</a></li><li><a href="#BAM-API-1">BAM API</a></li></ul></ul><ul><li><a href="#XAM.SAM.FLAG_DUP"><code>XAM.SAM.FLAG_DUP</code></a></li><li><a href="#XAM.SAM.FLAG_MREVERSE"><code>XAM.SAM.FLAG_MREVERSE</code></a></li><li><a href="#XAM.SAM.FLAG_MUNMAP"><code>XAM.SAM.FLAG_MUNMAP</code></a></li><li><a href="#XAM.SAM.FLAG_PAIRED"><code>XAM.SAM.FLAG_PAIRED</code></a></li><li><a href="#XAM.SAM.FLAG_PROPER_PAIR"><code>XAM.SAM.FLAG_PROPER_PAIR</code></a></li><li><a href="#XAM.SAM.FLAG_QCFAIL"><code>XAM.SAM.FLAG_QCFAIL</code></a></li><li><a href="#XAM.SAM.FLAG_READ1"><code>XAM.SAM.FLAG_READ1</code></a></li><li><a href="#XAM.SAM.FLAG_READ2"><code>XAM.SAM.FLAG_READ2</code></a></li><li><a href="#XAM.SAM.FLAG_REVERSE"><code>XAM.SAM.FLAG_REVERSE</code></a></li><li><a href="#XAM.SAM.FLAG_SECONDARY"><code>XAM.SAM.FLAG_SECONDARY</code></a></li><li><a href="#XAM.SAM.FLAG_SUPPLEMENTARY"><code>XAM.SAM.FLAG_SUPPLEMENTARY</code></a></li><li><a href="#XAM.SAM.FLAG_UNMAP"><code>XAM.SAM.FLAG_UNMAP</code></a></li><li><a href="#XAM.BAM.BAI-Tuple{AbstractString}"><code>XAM.BAM.BAI</code></a></li><li><a href="#XAM.BAM.BAI-Tuple{IO}"><code>XAM.BAM.BAI</code></a></li><li><a href="#XAM.BAM.Reader"><code>XAM.BAM.Reader</code></a></li><li><a href="#XAM.BAM.Record"><code>XAM.BAM.Record</code></a></li><li><a href="#XAM.BAM.Writer"><code>XAM.BAM.Writer</code></a></li><li><a href="#XAM.SAM.Header-Tuple{}"><code>XAM.SAM.Header</code></a></li><li><a href="#XAM.SAM.MetaInfo-Tuple{AbstractString}"><code>XAM.SAM.MetaInfo</code></a></li><li><a href="#XAM.SAM.MetaInfo-Tuple{AbstractString,Any}"><code>XAM.SAM.MetaInfo</code></a></li><li><a href="#XAM.SAM.Reader-Tuple{IO}"><code>XAM.SAM.Reader</code></a></li><li><a href="#XAM.SAM.R
2019-08-12 03:25:08 -04:00
BioAlignments.SAM.MetaInfo:
tag: CO
value: some comment
julia&gt; string(ans)
&quot;@CO some comment&quot;
julia&gt; SAM.MetaInfo(&quot;SQ&quot;, [&quot;SN&quot; =&gt; &quot;chr1&quot;, &quot;LN&quot; =&gt; 12345])
BioAlignments.SAM.MetaInfo:
tag: SQ
value: SN=chr1 LN=12345
julia&gt; string(ans)
2019-08-22 21:49:56 -04:00
&quot;@SQ SN:chr1 LN:12345&quot;</code></pre></div></div><a class="source-link" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/1cf0cdc19028d57a8839a7a95fad7abbeddb2db6/src/sam/metainfo.jl#L45-L71">source</a></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="XAM.SAM.MetaInfo-Tuple{AbstractString}" href="#XAM.SAM.MetaInfo-Tuple{AbstractString}"><code>XAM.SAM.MetaInfo</code></a><span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">MetaInfo(str::AbstractString)</code></pre><p>Create a SAM metainfo from <code>str</code>.</p><p><strong>Examples</strong></p><pre><code class="language-none">julia&gt; SAM.MetaInfo(&quot;@CO some comment&quot;)
2019-08-12 03:25:08 -04:00
BioAlignments.SAM.MetaInfo:
tag: CO
value: some comment
julia&gt; SAM.MetaInfo(&quot;@SQ SN:chr1 LN:12345&quot;)
BioAlignments.SAM.MetaInfo:
tag: SQ
2019-08-22 21:49:56 -04:00
value: SN=chr1 LN=12345</code></pre></div></div><a class="source-link" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/1cf0cdc19028d57a8839a7a95fad7abbeddb2db6/src/sam/metainfo.jl#L23-L40">source</a></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="XAM.SAM.Reader-Tuple{IO}" href="#XAM.SAM.Reader-Tuple{IO}"><code>XAM.SAM.Reader</code></a><span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">SAM.Reader(input::IO)</code></pre><p>Create a data reader of the SAM file format.</p><p><strong>Arguments</strong></p><ul><li><code>input</code>: data source</li></ul></div></div><a class="source-link" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/1cf0cdc19028d57a8839a7a95fad7abbeddb2db6/src/sam/reader.jl#L16-L23">source</a></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="XAM.SAM.Record-Tuple{AbstractString}" href="#XAM.SAM.Record-Tuple{AbstractString}"><code>XAM.SAM.Record</code></a><span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">SAM.Record(str::AbstractString)</code></pre><p>Create a SAM record from <code>str</code>. This function verifies the format and indexes fields for accessors.</p></div></div><a class="source-link" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/1cf0cdc19028d57a8839a7a95fad7abbeddb2db6/src/sam/record.jl#L63-L68">source</a></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="XAM.SAM.Record-Tuple{Array{UInt8,1}}" href="#XAM.SAM.Record-Tuple{Array{UInt8,1}}"><code>XAM.SAM.Record</code></a><span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">SAM.Record(data::Vector{UInt8})</code></pre><p>Create a SAM record from <code>data</code>. This function verifies the format and indexes fields for accessors. Note that the ownership of <code>data</code> is transferred to a new record object.</p></div></div><a class="source-link" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/1cf0cdc19028d57a8839a7a95fad7abbeddb2db6/src/sam/record.jl#L39-L45">source</a></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="XAM.SAM.Record-Tuple{}" href="#XAM.SAM.Record-Tuple{}"><code>XAM.SAM.Record</code></a><span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">SAM.Record()</code></pre><p>Create an unfilled SAM record.</p></div></div><a class="source-link" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/1cf0cdc19028d57a8839a7a95fad7abbeddb2db6/src/sam/record.jl#L23-L27">source</a></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="XAM.SAM.Writer" href="#XAM.SAM.Writer"><code>XAM.SAM.Writer</code></a><span class="docstring-category">Type</span>.</div><div><div><pre><code class="language-julia">Writer(output::IO, header::Header=Header())</code></pre><p>Create a data writer of the SAM file format.</p><p><strong>Arguments</strong></p><ul><li><code>output</code>: data sink</li><li><code>header=Header()</code>: SAM header object</li></ul></div></div><a class="source-link" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/1cf0cdc19028d57a8839a7a95fad7abbeddb2db6/src/sam/writer.jl#L4-L12">source</a></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.findall-Tuple{XAM.SAM.Header,AbstractString}" href="#Base.findall-Tuple{XAM.SAM.Header,AbstractString}"><code>Base.findall</code></a><span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">find(header::Header, key::AbstractString)::Vector{MetaInfo}</code></pre><p>Find metainfo objects satisfying <code>SAM.tag(metainfo) == key</code>.</p></div></div><a class="source-link" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/1cf0cdc19028d57a8839a7a95fad7abbeddb2db6/src/sam/header.j