<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Public · XAM.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css"rel="stylesheet"type="text/css"/><script>documenterBaseURL="../.."</script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"data-main="../../assets/documenter.js"></script><scriptsrc="../../siteinfo.js"></script><scriptsrc="../../../versions.js"></script><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"/><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../../assets/themes/documenter-light.css"data-theme-name="documenter-light"data-theme-primary/><scriptsrc="../../assets/themeswap.js"></script></head><body><divid="documenter"><navclass="docs-sidebar"><divclass="docs-package-name"><spanclass="docs-autofit">XAM.jl</span></div><formclass="docs-search"action="../../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../../">Home</a></li><li><aclass="tocitem"href="../../hts-files/">SAM and BAM</a></li><li><spanclass="tocitem">API Reference</span><ul><liclass="is-active"><aclass="tocitem"href>Public</a><ulclass="internal"><li><aclass="tocitem"href="#Contents-1"><span>Contents</span></a></li><li><aclass="tocitem"href="#SAM-API-1"><span>SAM API</span></a></li><li><aclass="tocitem"href="#BAM-API-1"><span>BAM API</span></a></li></ul></li></ul></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">API Reference</a></li><liclass="is-active"><ahref>Public</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>Public</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/BioJulia/XAM.jl/blob/develop/docs/src/api/public.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="Public-API-Reference-1"><aclass="docs-heading-anchor"href="#Public-API-Reference-1">Public API Reference</a><aclass="docs-heading-anchor-permalink"href="#Public-API-Reference-1"title="Permalink"></a></h1><h2id="Contents-1"><aclass="docs-heading-anchor"href="#Contents-1">Contents</a><aclass="docs-heading-anchor-permalink"href="#Contents-1"title="Permalink"></a></h2><ul><li><ahref="#Public-API-Reference-1">Public API Reference</a></li><ul><li><ahref="#Contents-1">Contents</a></li><li><ahref="#SAM-API-1">SAM API</a></li><li><ahref="#BAM-API-1">BAM API</a></li></ul></ul><ul><li><ahref="#XAM.SAM.FLAG_DUP"><code>XAM.SAM.FLAG_DUP</code></a></li><li><ahref="#XAM.SAM.FLAG_MREVERSE"><code>XAM.SAM.FLAG_MREVERSE</code></a></li><li><ahref="#XAM.SAM.FLAG_MUNMAP"><code>XAM.SAM.FLAG_
"@SQ SN:chr1 LN:12345"</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/BioJulia/XAM.jl/blob/ad65f21faec3bcd7737a9ceae5417477ab52b688/src/sam/metainfo.jl#L45-L70">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="XAM.SAM.MetaInfo-Tuple{AbstractString}"href="#XAM.SAM.MetaInfo-Tuple{AbstractString}"><code>XAM.SAM.MetaInfo</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">MetaInfo(str::AbstractString)</code></pre><p>Create a SAM metainfo from <code>str</code>.</p><p><strong>Examples</strong></p><pre><codeclass="language-none">julia> SAM.MetaInfo("@CO some comment")
value: SN=chr1 LN=12345</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/BioJulia/XAM.jl/blob/ad65f21faec3bcd7737a9ceae5417477ab52b688/src/sam/metainfo.jl#L23-L40">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="XAM.SAM.Reader-Tuple{IO}"href="#XAM.SAM.Reader-Tuple{IO}"><code>XAM.SAM.Reader</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/BioJulia/XAM.jl/blob/ad65f21faec3bcd7737a9ceae5417477ab52b688/src/sam/reader.jl#L16-L23">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="XAM.SAM.Record-Tuple{AbstractString}"href="#XAM.SAM.Record-Tuple{AbstractString}"><code>XAM.SAM.Record</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/BioJulia/XAM.jl/blob/ad65f21faec3bcd7737a9ceae5417477ab52b688/src/sam/record.jl#L63-L68">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="XAM.SAM.Record-Tuple{Array{UInt8,1}}"href="#XAM.SAM.Record-Tuple{Array{UInt8,1}}"><code>XAM.SAM.Record</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/BioJulia/XAM.jl/blob/ad65f21faec3bcd7737a9ceae5417477ab52b688/src/sam/record.jl#L39-L45">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="XAM.SAM.Record-Tuple{}"href="#XAM.SAM.Record-Tuple{}"><code>XAM.SAM.Record</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">SAM.Record()</code></pre><p>Create an unfilled SAM record.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/BioJulia/XAM.jl/blob/ad65f21faec3bcd7737a9ceae5417477ab52b688/src/sam/record.jl#L23-L27">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="XAM.SAM.Writer"href="#XAM.SAM.Writer"><code>XAM.SAM.Writer</code></a> — <spanclass="docstring-category">Type</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/BioJulia/XAM.jl/blob/ad65f21faec3bcd7737a9ceae5417477ab52b688/src/sam/writer.jl#L4-L12">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Base.findall-Tuple{XAM.SAM.Header,AbstractString}"href="#Base.findall-Tuple{XAM.SAM.Header,AbstractString}"><code>Base.findall</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">find(header::Header, key::AbstractString)::Vector{MetaInfo}</code></pre><p>Find metainfo objects satisfying <code>SAM.tag(metainfo) == key</code>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/BioJulia/XAM.jl/blob/ad65f21faec3bcd7737a9ceae5417477ab52b688/src/sam/header.jl#L36-L40">source</a></section></article><article