1
0
Fork 0
mirror of https://github.com/MillironX/XAM.jl.git synced 2024-11-15 14:53:11 +00:00
XAM.jl/dev/man/api/index.html
2021-11-27 01:37:34 +00:00

24 lines
56 KiB
HTML

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>API Reference · XAM.jl</title><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="XAM.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">XAM.jl</a></span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../hts-files/">SAM and BAM</a></li><li class="is-active"><a class="tocitem" href>API Reference</a><ul class="internal"><li><a class="tocitem" href="#SAM-API"><span>SAM API</span></a></li><li><a class="tocitem" href="#BAM-API"><span>BAM API</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>API Reference</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API Reference</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/BioJulia/XAM.jl/blob/develop/docs/src/man/api.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="API-Reference"><a class="docs-heading-anchor" href="#API-Reference">API Reference</a><a id="API-Reference-1"></a><a class="docs-heading-anchor-permalink" href="#API-Reference" title="Permalink"></a></h1><h2 id="SAM-API"><a class="docs-heading-anchor" href="#SAM-API">SAM API</a><a id="SAM-API-1"></a><a class="docs-heading-anchor-permalink" href="#SAM-API" title="Permalink"></a></h2><h3 id="Public"><a class="docs-heading-anchor" href="#Public">Public</a><a id="Public-1"></a><a class="docs-heading-anchor-permalink" href="#Public" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_DUP" href="#XAM.SAM.FLAG_DUP"><code>XAM.SAM.FLAG_DUP</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_DUP</code></pre><p>SAM/BAM flag: optical or PCR duplicate</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_MREVERSE" href="#XAM.SAM.FLAG_MREVERSE"><code>XAM.SAM.FLAG_MREVERSE</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_MREVERSE</code></pre><p>SAM/BAM flag: the mate is mapped to the reverse strand</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_MUNMAP" href="#XAM.SAM.FLAG_MUNMAP"><code>XAM.SAM.FLAG_MUNMAP</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_MUNMAP</code></pre><p>SAM/BAM flag: the mate is unmapped</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_PAIRED" href="#XAM.SAM.FLAG_PAIRED"><code>XAM.SAM.FLAG_PAIRED</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_PAIRED</code></pre><p>SAM/BAM flag: the read is paired in sequencing, no matter whether it is mapped in a pair</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_PROPER_PAIR" href="#XAM.SAM.FLAG_PROPER_PAIR"><code>XAM.SAM.FLAG_PROPER_PAIR</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_PROPER_PAIR</code></pre><p>SAM/BAM flag: the read is mapped in a proper pair</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_QCFAIL" href="#XAM.SAM.FLAG_QCFAIL"><code>XAM.SAM.FLAG_QCFAIL</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_QCFAIL</code></pre><p>SAM/BAM flag: QC failure</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_READ1" href="#XAM.SAM.FLAG_READ1"><code>XAM.SAM.FLAG_READ1</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_READ1</code></pre><p>SAM/BAM flag: this is read1</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_READ2" href="#XAM.SAM.FLAG_READ2"><code>XAM.SAM.FLAG_READ2</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_READ2</code></pre><p>SAM/BAM flag: this is read2</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_REVERSE" href="#XAM.SAM.FLAG_REVERSE"><code>XAM.SAM.FLAG_REVERSE</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_REVERSE</code></pre><p>SAM/BAM flag: the read is mapped to the reverse strand</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_SECONDARY" href="#XAM.SAM.FLAG_SECONDARY"><code>XAM.SAM.FLAG_SECONDARY</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_SECONDARY</code></pre><p>SAM/BAM flag: not primary alignment</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_SUPPLEMENTARY" href="#XAM.SAM.FLAG_SUPPLEMENTARY"><code>XAM.SAM.FLAG_SUPPLEMENTARY</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_SUPPLEMENTARY</code></pre><p>SAM/BAM flag: supplementary alignment</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.FLAG_UNMAP" href="#XAM.SAM.FLAG_UNMAP"><code>XAM.SAM.FLAG_UNMAP</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia hljs">FLAG_UNMAP</code></pre><p>SAM/BAM flag: the read itself is unmapped; conflictive with SAM.FLAG<em>PROPER</em>PAIR</p><p>See also: <a href="../hts-files/#XAM.flag"><code>flag</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/flags.jl#L27-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.Header-Tuple{}" href="#XAM.SAM.Header-Tuple{}"><code>XAM.SAM.Header</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">SAM.Header()</code></pre><p>Create an empty header.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/header.jl#L8-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.MetaInfo-Tuple{AbstractString, Any}" href="#XAM.SAM.MetaInfo-Tuple{AbstractString, Any}"><code>XAM.SAM.MetaInfo</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">MetaInfo(tag::AbstractString, value)</code></pre><p>Create a SAM metainfo with <code>tag</code> and <code>value</code>.</p><p><code>tag</code> is a two-byte ASCII string. If <code>tag</code> is <code>&quot;CO&quot;</code>, <code>value</code> must be a string; otherwise, <code>value</code> is an iterable object with key and value pairs.</p><p><strong>Examples</strong></p><pre><code class="nohighlight hljs">julia&gt; SAM.MetaInfo(&quot;CO&quot;, &quot;some comment&quot;)
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)
&quot;@SQ SN:chr1 LN:12345&quot;</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/metainfo.jl#L54-L79">source</a></section></article><article 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></header><section><div><pre><code class="language-julia hljs">MetaInfo(str::AbstractString)</code></pre><p>Create a SAM metainfo from <code>str</code>.</p><p><strong>Examples</strong></p><pre><code class="nohighlight hljs">julia&gt; SAM.MetaInfo(&quot;@CO some comment&quot;)
BioAlignments.SAM.MetaInfo:
tag: CO
value: some comment
julia&gt; SAM.MetaInfo(&quot;@SQ SN:chr1 LN:12345&quot;)
BioAlignments.SAM.MetaInfo:
tag: SQ
value: SN=chr1 LN=12345</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/metainfo.jl#L32-L49">source</a></section></article><article 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></header><section><div><pre><code class="language-julia hljs">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><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/reader.jl#L26-L33">source</a></section></article><article 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></header><section><div><pre><code class="language-julia hljs">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><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L66-L71">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.Record-Tuple{Vector{UInt8}}" href="#XAM.SAM.Record-Tuple{Vector{UInt8}}"><code>XAM.SAM.Record</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">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><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L42-L48">source</a></section></article><article 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></header><section><div><pre><code class="language-julia hljs">SAM.Record()</code></pre><p>Create an unfilled SAM record.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L26-L30">source</a></section></article><article 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></header><section><div><pre><code class="language-julia hljs">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><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/writer.jl#L4-L12">source</a></section></article><article 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></header><section><div><pre><code class="language-julia hljs">find(header::Header, key::AbstractString)::Vector{MetaInfo}</code></pre><p>Find metainfo objects satisfying <code>SAM.tag(metainfo) == key</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/header.jl#L40-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.read!-Tuple{XAM.SAM.Reader, XAM.SAM.Record}" href="#Base.read!-Tuple{XAM.SAM.Reader, XAM.SAM.Record}"><code>Base.read!</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read!(rdr::Reader, rec::Record)</code></pre><p>Read a <code>Record</code> into <code>rec</code>; overwriting or adding to existing field values. It is assumed that <code>rec</code> is already initialized or empty.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/reader.jl#L95-L100">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="BioGenerics.header-Tuple{XAM.SAM.Reader}" href="#BioGenerics.header-Tuple{XAM.SAM.Reader}"><code>BioGenerics.header</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">header(reader::Reader)::Header</code></pre><p>Get the header of <code>reader</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/reader.jl#L54-L58">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.alignlength-Tuple{XAM.SAM.Record}" href="#XAM.SAM.alignlength-Tuple{XAM.SAM.Record}"><code>XAM.SAM.alignlength</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">alignlength(record::Record)::Int</code></pre><p>Get the alignment length of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L328-L332">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.alignment-Tuple{XAM.SAM.Record}" href="#XAM.SAM.alignment-Tuple{XAM.SAM.Record}"><code>XAM.SAM.alignment</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">alignment(record::Record)::BioAlignments.Alignment</code></pre><p>Get the alignment of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L310-L314">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.auxdata-Tuple{XAM.SAM.Record}" href="#XAM.SAM.auxdata-Tuple{XAM.SAM.Record}"><code>XAM.SAM.auxdata</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">auxdata(record::Record)::Dict{String,Any}</code></pre><p>Get the auxiliary data (optional fields) of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L467-L471">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.cigar-Tuple{XAM.SAM.Record}" href="#XAM.SAM.cigar-Tuple{XAM.SAM.Record}"><code>XAM.SAM.cigar</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">cigar(record::Record)::String</code></pre><p>Get the CIGAR string of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L292-L296">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.iscomment-Tuple{XAM.SAM.MetaInfo}" href="#XAM.SAM.iscomment-Tuple{XAM.SAM.MetaInfo}"><code>XAM.SAM.iscomment</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">iscomment(metainfo::MetaInfo)::Bool</code></pre><p>Test if <code>metainfo</code> is a comment (i.e. its tag is &quot;CO&quot;).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/metainfo.jl#L162-L166">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.ismapped-Tuple{XAM.SAM.Record}" href="#XAM.SAM.ismapped-Tuple{XAM.SAM.Record}"><code>XAM.SAM.ismapped</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">ismapped(record::Record)::Bool</code></pre><p>Test if <code>record</code> is mapped.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L162-L166">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.isnextmapped-Tuple{XAM.SAM.Record}" href="#XAM.SAM.isnextmapped-Tuple{XAM.SAM.Record}"><code>XAM.SAM.isnextmapped</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">isnextmapped(record::Record)::Bool</code></pre><p>Test if the mate/next read of <code>record</code> is mapped.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L230-L234">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.isprimary-Tuple{XAM.SAM.Record}" href="#XAM.SAM.isprimary-Tuple{XAM.SAM.Record}"><code>XAM.SAM.isprimary</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">isprimary(record::Record)::Bool</code></pre><p>Test if <code>record</code> is a primary line of the read.</p><p>This is equivalent to <code>flag(record) &amp; 0x900 == 0</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L171-L177">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.keyvalues-Tuple{XAM.SAM.MetaInfo}" href="#XAM.SAM.keyvalues-Tuple{XAM.SAM.MetaInfo}"><code>XAM.SAM.keyvalues</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">keyvalues(metainfo::MetaInfo)::Vector{Pair{String,String}}</code></pre><p>Get the values of <code>metainfo</code> as string pairs.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/metainfo.jl#L191-L195">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.mappingquality-Tuple{XAM.SAM.Record}" href="#XAM.SAM.mappingquality-Tuple{XAM.SAM.Record}"><code>XAM.SAM.mappingquality</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">mappingquality(record::Record)::UInt8</code></pre><p>Get the mapping quality of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L274-L278">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.nextposition-Tuple{XAM.SAM.Record}" href="#XAM.SAM.nextposition-Tuple{XAM.SAM.Record}"><code>XAM.SAM.nextposition</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">nextposition(record::Record)::Int</code></pre><p>Get the position of the mate/next read of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L256-L260">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.nextrefname-Tuple{XAM.SAM.Record}" href="#XAM.SAM.nextrefname-Tuple{XAM.SAM.Record}"><code>XAM.SAM.nextrefname</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">nextrefname(record::Record)::String</code></pre><p>Get the reference name of the mate/next read of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L239-L243">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.position-Tuple{XAM.SAM.Record}" href="#XAM.SAM.position-Tuple{XAM.SAM.Record}"><code>XAM.SAM.position</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">position(record::Record)::Int</code></pre><p>Get the 1-based leftmost mapping position of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L199-L203">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.quality-Tuple{Type{String}, XAM.SAM.Record}" href="#XAM.SAM.quality-Tuple{Type{String}, XAM.SAM.Record}"><code>XAM.SAM.quality</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">quality(::Type{String}, record::Record)::String</code></pre><p>Get the ASCII-encoded base quality of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L457-L461">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.quality-Tuple{XAM.SAM.Record}" href="#XAM.SAM.quality-Tuple{XAM.SAM.Record}"><code>XAM.SAM.quality</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">quality(record::Record)::Vector{UInt8}</code></pre><p>Get the Phred-scaled base quality of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L436-L440">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.refname-Tuple{XAM.SAM.Record}" href="#XAM.SAM.refname-Tuple{XAM.SAM.Record}"><code>XAM.SAM.refname</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">refname(record::Record)::String</code></pre><p>Get the reference sequence name of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L182-L186">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.rightposition-Tuple{XAM.SAM.Record}" href="#XAM.SAM.rightposition-Tuple{XAM.SAM.Record}"><code>XAM.SAM.rightposition</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">rightposition(record::Record)::Int</code></pre><p>Get the 1-based rightmost mapping position of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L217-L221">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.seqlength-Tuple{XAM.SAM.Record}" href="#XAM.SAM.seqlength-Tuple{XAM.SAM.Record}"><code>XAM.SAM.seqlength</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">seqlength(record::Record)::Int</code></pre><p>Get the sequence length of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L419-L423">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.sequence-Tuple{Type{String}, XAM.SAM.Record}" href="#XAM.SAM.sequence-Tuple{Type{String}, XAM.SAM.Record}"><code>XAM.SAM.sequence</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">sequence(::Type{String}, record::Record)::String</code></pre><p>Get the segment sequence of <code>record</code> as <code>String</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L409-L413">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.sequence-Tuple{XAM.SAM.Record}" href="#XAM.SAM.sequence-Tuple{XAM.SAM.Record}"><code>XAM.SAM.sequence</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">sequence(record::Record)::BioSequences.LongDNASeq</code></pre><p>Get the segment sequence of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L389-L393">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.tag-Tuple{XAM.SAM.MetaInfo}" href="#XAM.SAM.tag-Tuple{XAM.SAM.MetaInfo}"><code>XAM.SAM.tag</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">tag(metainfo::MetaInfo)::String</code></pre><p>Get the tag of <code>metainfo</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/metainfo.jl#L171-L175">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.templength-Tuple{XAM.SAM.Record}" href="#XAM.SAM.templength-Tuple{XAM.SAM.Record}"><code>XAM.SAM.templength</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">templength(record::Record)::Int</code></pre><p>Get the template length of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L371-L375">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.tempname-Tuple{XAM.SAM.Record}" href="#XAM.SAM.tempname-Tuple{XAM.SAM.Record}"><code>XAM.SAM.tempname</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">tempname(record::Record)::String</code></pre><p>Get the query template name of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/record.jl#L354-L358">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.SAM.value-Tuple{XAM.SAM.MetaInfo}" href="#XAM.SAM.value-Tuple{XAM.SAM.MetaInfo}"><code>XAM.SAM.value</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">value(metainfo::MetaInfo)::String</code></pre><p>Get the value of <code>metainfo</code> as a string.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/sam/metainfo.jl#L181-L185">source</a></section></article><h3 id="Internal"><a class="docs-heading-anchor" href="#Internal">Internal</a><a id="Internal-1"></a><a class="docs-heading-anchor-permalink" href="#Internal" title="Permalink"></a></h3><h2 id="BAM-API"><a class="docs-heading-anchor" href="#BAM-API">BAM API</a><a id="BAM-API-1"></a><a class="docs-heading-anchor-permalink" href="#BAM-API" title="Permalink"></a></h2><h3 id="Public-2"><a class="docs-heading-anchor" href="#Public-2">Public</a><a class="docs-heading-anchor-permalink" href="#Public-2" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.BAI-Tuple{AbstractString}" href="#XAM.BAM.BAI-Tuple{AbstractString}"><code>XAM.BAM.BAI</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">BAI(filename::AbstractString)</code></pre><p>Load a BAI index from <code>filename</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/bai.jl#L16-L20">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.BAI-Tuple{IO}" href="#XAM.BAM.BAI-Tuple{IO}"><code>XAM.BAM.BAI</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">BAI(input::IO)</code></pre><p>Load a BAI index from <code>input</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/bai.jl#L25-L29">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.Reader" href="#XAM.BAM.Reader"><code>XAM.BAM.Reader</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">BAM.Reader(input::IO; index=nothing)</code></pre><p>Create a data reader of the BAM file format.</p><p><strong>Arguments</strong></p><ul><li><code>input</code>: data source</li><li><code>index=nothing</code>: filepath to a random access index (currently <em>bai</em> is supported)</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/reader.jl#L4-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.Record" href="#XAM.BAM.Record"><code>XAM.BAM.Record</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">BAM.Record()</code></pre><p>Create an unfilled BAM record.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L4-L8">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.Writer" href="#XAM.BAM.Writer"><code>XAM.BAM.Writer</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">BAM.Writer(output::BGZFStream, header::SAM.Header)</code></pre><p>Create a data writer of the BAM file format.</p><p><strong>Arguments</strong></p><ul><li><code>output</code>: data sink</li><li><code>header</code>: SAM header object</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/writer.jl#L4-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="BioGenerics.header-Tuple{XAM.BAM.Reader}" href="#BioGenerics.header-Tuple{XAM.BAM.Reader}"><code>BioGenerics.header</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">header(reader::Reader; fillSQ::Bool=false)::SAM.Header</code></pre><p>Get the header of <code>reader</code>.</p><p>If <code>fillSQ</code> is <code>true</code>, this function fills missing &quot;SQ&quot; metainfo in the header.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/reader.jl#L46-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.alignlength-Tuple{XAM.BAM.Record}" href="#XAM.BAM.alignlength-Tuple{XAM.BAM.Record}"><code>XAM.BAM.alignlength</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">alignlength(record::Record)::Int</code></pre><p>Get the alignment length of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L460-L464">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.alignment-Tuple{XAM.BAM.Record}" href="#XAM.BAM.alignment-Tuple{XAM.BAM.Record}"><code>XAM.BAM.alignment</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">alignment(record::Record)::BioAlignments.Alignment</code></pre><p>Get the alignment of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L427-L431">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.auxdata-Tuple{XAM.BAM.Record}" href="#XAM.BAM.auxdata-Tuple{XAM.BAM.Record}"><code>XAM.BAM.auxdata</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">auxdata(record::Record)::BAM.AuxData</code></pre><p>Get the auxiliary data of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L562-L566">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.cigar" href="#XAM.BAM.cigar"><code>XAM.BAM.cigar</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">cigar(record::Record)::String</code></pre><p>Get the CIGAR string of <code>record</code>.</p><p>Note that in the BAM specification, the field called <code>cigar</code> typically stores the cigar string of the record. However, this is not always true, sometimes the true cigar is very long, and due to some constraints of the BAM format, the actual cigar string is stored in an extra tag: <code>CG:B,I</code>, and the <code>cigar</code> field stores a pseudo-cigar string.</p><p>Calling this method with <code>checkCG</code> set to <code>true</code> (default) this method will always yield the true cigar string, because this is probably what you want the vast majority of the time.</p><p>If you have a record that stores the true cigar in a <code>CG:B,I</code> tag, but you still want to access the pseudo-cigar that is stored in the <code>cigar</code> field of the BAM record, then you can set checkCG to <code>false</code>.</p><p>See also <code>BAM.cigar_rle</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L342-L355">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.cigar_rle" href="#XAM.BAM.cigar_rle"><code>XAM.BAM.cigar_rle</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">cigar_rle(record::Record, checkCG::Bool = true)::Tuple{Vector{BioAlignments.Operation},Vector{Int}}</code></pre><p>Get a run-length encoded tuple <code>(ops, lens)</code> of the CIGAR string in <code>record</code>.</p><p>Note that in the BAM specification, the field called <code>cigar</code> typically stores the cigar string of the record. However, this is not always true, sometimes the true cigar is very long, and due to some constraints of the BAM format, the actual cigar string is stored in an extra tag: <code>CG:B,I</code>, and the <code>cigar</code> field stores a pseudo-cigar string.</p><p>Calling this method with <code>checkCG</code> set to <code>true</code> (default) this method will always yield the true cigar string, because this is probably what you want the vast majority of the time.</p><p>If you have a record that stores the true cigar in a <code>CG:B,I</code> tag, but you still want to access the pseudo-cigar that is stored in the <code>cigar</code> field of the BAM record, then you can set checkCG to <code>false</code>.</p><p>See also <code>BAM.cigar</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L364-L377">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.ismapped-Tuple{XAM.BAM.Record}" href="#XAM.BAM.ismapped-Tuple{XAM.BAM.Record}"><code>XAM.BAM.ismapped</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">ismapped(record::Record)::Bool</code></pre><p>Test if <code>record</code> is mapped.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L140-L144">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.isnextmapped-Tuple{XAM.BAM.Record}" href="#XAM.BAM.isnextmapped-Tuple{XAM.BAM.Record}"><code>XAM.BAM.isnextmapped</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">isnextmapped(record::Record)::Bool</code></pre><p>Test if the mate/next read of <code>record</code> is mapped.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L256-L260">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.ispositivestrand-Tuple{XAM.BAM.Record}" href="#XAM.BAM.ispositivestrand-Tuple{XAM.BAM.Record}"><code>XAM.BAM.ispositivestrand</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">ispositivestrand(record::Record)::Bool</code></pre><p>Test if <code>record</code> is aligned to the positive strand.</p><p>This is equivalent to <code>flag(record) &amp; 0x10 == 0</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L160-L166">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.isprimary-Tuple{XAM.BAM.Record}" href="#XAM.BAM.isprimary-Tuple{XAM.BAM.Record}"><code>XAM.BAM.isprimary</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">isprimary(record::Record)::Bool</code></pre><p>Test if <code>record</code> is a primary line of the read.</p><p>This is equivalent to <code>flag(record) &amp; 0x900 == 0</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L149-L155">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.mappingquality-Tuple{XAM.BAM.Record}" href="#XAM.BAM.mappingquality-Tuple{XAM.BAM.Record}"><code>XAM.BAM.mappingquality</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">mappingquality(record::Record)::UInt8</code></pre><p>Get the mapping quality of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L313-L317">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.n_cigar_op" href="#XAM.BAM.n_cigar_op"><code>XAM.BAM.n_cigar_op</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">n_cigar_op(record::Record, checkCG::Bool = true)</code></pre><p>Return the number of operations in the CIGAR string of <code>record</code>.</p><p>Note that in the BAM specification, the field called <code>cigar</code> typically stores the cigar string of the record. However, this is not always true, sometimes the true cigar is very long, and due to some constraints of the BAM format, the actual cigar string is stored in an extra tag: <code>CG:B,I</code>, and the <code>cigar</code> field stores a pseudo-cigar string.</p><p>Calling this method with <code>checkCG</code> set to <code>true</code> (default) this method will always yield the number of operations in the true cigar string, because this is probably what you want, the vast majority of the time.</p><p>If you have a record that stores the true cigar in a <code>CG:B,I</code> tag, but you still want to get the number of operations in the <code>cigar</code> field of the BAM record, then set <code>checkCG</code> to <code>false</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L326-L337">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.nextposition-Tuple{XAM.BAM.Record}" href="#XAM.BAM.nextposition-Tuple{XAM.BAM.Record}"><code>XAM.BAM.nextposition</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">nextposition(record::Record)::Int</code></pre><p>Get the 1-based leftmost mapping position of the next/mate read of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L299-L303">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.nextrefid-Tuple{XAM.BAM.Record}" href="#XAM.BAM.nextrefid-Tuple{XAM.BAM.Record}"><code>XAM.BAM.nextrefid</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">nextrefid(record::Record)::Int</code></pre><p>Get the next/mate reference sequence ID of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L265-L269">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.nextrefname-Tuple{XAM.BAM.Record}" href="#XAM.BAM.nextrefname-Tuple{XAM.BAM.Record}"><code>XAM.BAM.nextrefname</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">nextrefname(record::Record)::String</code></pre><p>Get the reference name of the mate/next read of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L279-L283">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.position-Tuple{XAM.BAM.Record}" href="#XAM.BAM.position-Tuple{XAM.BAM.Record}"><code>XAM.BAM.position</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">position(record::Record)::Int</code></pre><p>Get the 1-based leftmost mapping position of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L228-L232">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.quality-Tuple{XAM.BAM.Record}" href="#XAM.BAM.quality-Tuple{XAM.BAM.Record}"><code>XAM.BAM.quality</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">quality(record::Record)</code></pre><p>Get the base quality of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L546-L550">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.refid-Tuple{XAM.BAM.Record}" href="#XAM.BAM.refid-Tuple{XAM.BAM.Record}"><code>XAM.BAM.refid</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">refid(record::Record)::Int</code></pre><p>Get the reference sequence ID of <code>record</code>.</p><p>The ID is 1-based (i.e. the first sequence is 1) and is 0 for a record without a mapping position.</p><p>See also: <code>BAM.rname</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L171-L179">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.reflen-Tuple{XAM.BAM.Record}" href="#XAM.BAM.reflen-Tuple{XAM.BAM.Record}"><code>XAM.BAM.reflen</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">reflen(record::Record)::Int</code></pre><p>Get the length of the reference sequence this record applies to.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L213-L217">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.refname-Tuple{XAM.BAM.Record}" href="#XAM.BAM.refname-Tuple{XAM.BAM.Record}"><code>XAM.BAM.refname</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">refname(record::Record)::String</code></pre><p>Get the reference sequence name of <code>record</code>.</p><p>See also: <code>BAM.refid</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L200-L206">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.rightposition-Tuple{XAM.BAM.Record}" href="#XAM.BAM.rightposition-Tuple{XAM.BAM.Record}"><code>XAM.BAM.rightposition</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">rightposition(record::Record)::Int</code></pre><p>Get the 1-based rightmost mapping position of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L242-L246">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.seqlength-Tuple{XAM.BAM.Record}" href="#XAM.BAM.seqlength-Tuple{XAM.BAM.Record}"><code>XAM.BAM.seqlength</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">seqlength(record::Record)::Int</code></pre><p>Get the sequence length of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L532-L536">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.sequence-Tuple{XAM.BAM.Record}" href="#XAM.BAM.sequence-Tuple{XAM.BAM.Record}"><code>XAM.BAM.sequence</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">sequence(record::Record)::BioSequences.LongDNASeq</code></pre><p>Get the segment sequence of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L507-L511">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.templength-Tuple{XAM.BAM.Record}" href="#XAM.BAM.templength-Tuple{XAM.BAM.Record}"><code>XAM.BAM.templength</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">templength(record::Record)::Int</code></pre><p>Get the template length of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L493-L497">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="XAM.BAM.tempname-Tuple{XAM.BAM.Record}" href="#XAM.BAM.tempname-Tuple{XAM.BAM.Record}"><code>XAM.BAM.tempname</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">tempname(record::Record)::String</code></pre><p>Get the query template name of <code>record</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/XAM.jl/blob/c7114bce16c331804b748cbbede224d4c35b906f/src/bam/record.jl#L478-L482">source</a></section></article><h3 id="Internal-2"><a class="docs-heading-anchor" href="#Internal-2">Internal</a><a class="docs-heading-anchor-permalink" href="#Internal-2" title="Permalink"></a></h3></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../hts-files/">« SAM and BAM</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.10 on <span class="colophon-date" title="Saturday 27 November 2021 01:37">Saturday 27 November 2021</span>. Using Julia version 1.6.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>