Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a setter method for seq in ntHash #120

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/classbtllib_1_1NtHash-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
<tr><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html#a8c17ba730f3539ab9673186cd556d742">peek_back</a>(char char_in)</td><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html">btllib::NtHash</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html#a244c0c11655b6e1c52dd7c4528b8ed05">roll</a>()</td><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html">btllib::NtHash</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html#ae4417f1829a2eaa3a19559ee68df1091">roll_back</a>()</td><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html">btllib::NtHash</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>sub</b>(const std::vector&lt; unsigned &gt; &amp;positions, const std::vector&lt; unsigned char &gt; &amp;new_bases) (defined in <a class="el" href="classbtllib_1_1NtHash.html">btllib::NtHash</a>)</td><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html">btllib::NtHash</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html#a419ba8aaab69033241dece2511082ad7">set_seq</a>(const std::string &amp;seq, size_t pos=0)</td><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html">btllib::NtHash</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>sub</b>(const std::vector&lt; unsigned &gt; &amp;positions, const std::vector&lt; unsigned char &gt; &amp;new_bases) (defined in <a class="el" href="classbtllib_1_1NtHash.html">btllib::NtHash</a>)</td><td class="entry"><a class="el" href="classbtllib_1_1NtHash.html">btllib::NtHash</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down
43 changes: 43 additions & 0 deletions docs/classbtllib_1_1NtHash.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
<tr class="memitem:a02580f5bf9c028283228e8148ffc10e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02580f5bf9c028283228e8148ffc10e5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>NtHash</b> (<a class="el" href="classbtllib_1_1NtHash.html">NtHash</a> &amp;&amp;)=default</td></tr>
<tr class="separator:a02580f5bf9c028283228e8148ffc10e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a419ba8aaab69033241dece2511082ad7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbtllib_1_1NtHash.html#a419ba8aaab69033241dece2511082ad7">set_seq</a> (const std::string &amp;seq, size_t pos=0)</td></tr>
<tr class="separator:a419ba8aaab69033241dece2511082ad7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a244c0c11655b6e1c52dd7c4528b8ed05"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbtllib_1_1NtHash.html#a244c0c11655b6e1c52dd7c4528b8ed05">roll</a> ()</td></tr>
<tr class="separator:a244c0c11655b6e1c52dd7c4528b8ed05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4417f1829a2eaa3a19559ee68df1091"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbtllib_1_1NtHash.html#ae4417f1829a2eaa3a19559ee68df1091">roll_back</a> ()</td></tr>
Expand Down Expand Up @@ -559,6 +561,47 @@ <h2 class="groupheader">Member Function Documentation</h2>
<p>Like the <a class="el" href="classbtllib_1_1NtHash.html#a244c0c11655b6e1c52dd7c4528b8ed05">roll()</a> function, but advance backwards. </p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success and <code>false</code> otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a419ba8aaab69033241dece2511082ad7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void btllib::NtHash::set_seq </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>seq</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>pos</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reset iterator on a new sequence. Useful for re-using <a class="el" href="classbtllib_1_1NtHash.html">NtHash</a> objects. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">seq</td><td>New sequence for hashing </td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
Expand Down
1 change: 1 addition & 0 deletions docs/classbtllib_1_1SeedNtHash-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
<tr class="even"><td class="entry"><a class="el" href="classbtllib_1_1SeedNtHash.html#ac37315348fc391ab9e795e4e700fdb21">SeedNtHash</a>(const std::string &amp;seq, const std::vector&lt; std::vector&lt; unsigned &gt;&gt; &amp;seeds, hashing_internals::NUM_HASHES_TYPE num_hashes_per_seed, hashing_internals::K_TYPE k, size_t pos=0)</td><td class="entry"><a class="el" href="classbtllib_1_1SeedNtHash.html">btllib::SeedNtHash</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>SeedNtHash</b>(const SeedNtHash &amp;obj) (defined in <a class="el" href="classbtllib_1_1SeedNtHash.html">btllib::SeedNtHash</a>)</td><td class="entry"><a class="el" href="classbtllib_1_1SeedNtHash.html">btllib::SeedNtHash</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>SeedNtHash</b>(SeedNtHash &amp;&amp;)=default (defined in <a class="el" href="classbtllib_1_1SeedNtHash.html">btllib::SeedNtHash</a>)</td><td class="entry"><a class="el" href="classbtllib_1_1SeedNtHash.html">btllib::SeedNtHash</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classbtllib_1_1SeedNtHash.html#a49ff99a34ead2b1571a05806607746d0">set_seq</a>(const std::string &amp;seq, size_t pos=0)</td><td class="entry"><a class="el" href="classbtllib_1_1SeedNtHash.html">btllib::SeedNtHash</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down
43 changes: 43 additions & 0 deletions docs/classbtllib_1_1SeedNtHash.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
<tr class="memitem:aef7d081543cac6f9357b17a05214a0f5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef7d081543cac6f9357b17a05214a0f5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>SeedNtHash</b> (<a class="el" href="classbtllib_1_1SeedNtHash.html">SeedNtHash</a> &amp;&amp;)=default</td></tr>
<tr class="separator:aef7d081543cac6f9357b17a05214a0f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49ff99a34ead2b1571a05806607746d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbtllib_1_1SeedNtHash.html#a49ff99a34ead2b1571a05806607746d0">set_seq</a> (const std::string &amp;seq, size_t pos=0)</td></tr>
<tr class="separator:a49ff99a34ead2b1571a05806607746d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa817b8acaf7c57d7be8ce47fcf5ac758"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbtllib_1_1SeedNtHash.html#aa817b8acaf7c57d7be8ce47fcf5ac758">roll</a> ()</td></tr>
<tr class="separator:aa817b8acaf7c57d7be8ce47fcf5ac758"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a293e694de84eafbb19bf7123749f9ba6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbtllib_1_1SeedNtHash.html#a293e694de84eafbb19bf7123749f9ba6">roll_back</a> ()</td></tr>
Expand Down Expand Up @@ -734,6 +736,47 @@ <h2 class="groupheader">Member Function Documentation</h2>
<p>Like the <a class="el" href="classbtllib_1_1SeedNtHash.html#aa817b8acaf7c57d7be8ce47fcf5ac758">roll()</a> function, but advance backwards. </p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success and <code>false</code> otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a49ff99a34ead2b1571a05806607746d0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void btllib::SeedNtHash::set_seq </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>seq</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>pos</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reset iterator on a new sequence. Useful for re-using <a class="el" href="classbtllib_1_1NtHash.html">NtHash</a> objects. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">seq</td><td>New sequence for hashing </td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
Expand Down
4 changes: 2 additions & 2 deletions docs/counting__bloom__filter-inl_8hpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@
<div class="ttc" id="classbtllib_1_1CountingBloomFilter_html"><div class="ttname"><a href="classbtllib_1_1CountingBloomFilter.html">btllib::CountingBloomFilter</a></div><div class="ttdef"><b>Definition:</b> counting_bloom_filter.hpp:42</div></div>
<div class="ttc" id="namespacebtllib_html_a60a36f4583a7eb03001f8bdb7b395507"><div class="ttname"><a href="namespacebtllib.html#a60a36f4583a7eb03001f8bdb7b395507">btllib::check_warning</a></div><div class="ttdeci">void check_warning(bool condition, const std::string &amp;msg)</div></div>
<div class="ttc" id="classbtllib_1_1KmerCountingBloomFilter_html_a1593f904f0bd79534b1527ae20fe375f"><div class="ttname"><a href="classbtllib_1_1KmerCountingBloomFilter.html#a1593f904f0bd79534b1527ae20fe375f">btllib::KmerCountingBloomFilter::clear</a></div><div class="ttdeci">void clear(const char *seq, size_t seq_len)</div><div class="ttdef"><b>Definition:</b> counting_bloom_filter-inl.hpp:289</div></div>
<div class="ttc" id="classbtllib_1_1NtHash_html_ad3b51e8a4a12d4136783fc40fb5b0439"><div class="ttname"><a href="classbtllib_1_1NtHash.html#ad3b51e8a4a12d4136783fc40fb5b0439">btllib::NtHash::hashes</a></div><div class="ttdeci">const uint64_t * hashes() const </div><div class="ttdef"><b>Definition:</b> nthash_kmer.hpp:443</div></div>
<div class="ttc" id="classbtllib_1_1NtHash_html_ad3b51e8a4a12d4136783fc40fb5b0439"><div class="ttname"><a href="classbtllib_1_1NtHash.html#ad3b51e8a4a12d4136783fc40fb5b0439">btllib::NtHash::hashes</a></div><div class="ttdeci">const uint64_t * hashes() const </div><div class="ttdef"><b>Definition:</b> nthash_kmer.hpp:463</div></div>
<div class="ttc" id="classbtllib_1_1CountingBloomFilter_html_a1d73900df10374cbc08a8eb5f8e0ffa3"><div class="ttname"><a href="classbtllib_1_1CountingBloomFilter.html#a1d73900df10374cbc08a8eb5f8e0ffa3">btllib::CountingBloomFilter::remove</a></div><div class="ttdeci">void remove(const uint64_t *hashes)</div><div class="ttdef"><b>Definition:</b> counting_bloom_filter-inl.hpp:89</div></div>
<div class="ttc" id="classbtllib_1_1KmerCountingBloomFilter_html_a69331bd22706ca7676a1ca08867f42e2"><div class="ttname"><a href="classbtllib_1_1KmerCountingBloomFilter.html#a69331bd22706ca7676a1ca08867f42e2">btllib::KmerCountingBloomFilter::contains_insert_thresh</a></div><div class="ttdeci">T contains_insert_thresh(const char *seq, size_t seq_len, T threshold)</div><div class="ttdef"><b>Definition:</b> counting_bloom_filter-inl.hpp:350</div></div>
<div class="ttc" id="classbtllib_1_1NtHash_html"><div class="ttname"><a href="classbtllib_1_1NtHash.html">btllib::NtHash</a></div><div class="ttdef"><b>Definition:</b> nthash_kmer.hpp:236</div></div>
Expand All @@ -531,7 +531,7 @@
<div class="ttc" id="classbtllib_1_1CountingBloomFilter_html_a2aa206e822285afce3c5a8f0ab02c679"><div class="ttname"><a href="classbtllib_1_1CountingBloomFilter.html#a2aa206e822285afce3c5a8f0ab02c679">btllib::CountingBloomFilter::get_pop_cnt</a></div><div class="ttdeci">uint64_t get_pop_cnt(T threshold=1) const </div><div class="ttdef"><b>Definition:</b> counting_bloom_filter-inl.hpp:167</div></div>
<div class="ttc" id="classbtllib_1_1KmerCountingBloomFilter_html_aab2f78777fa04950abd2197bd12bf6cb"><div class="ttname"><a href="classbtllib_1_1KmerCountingBloomFilter.html#aab2f78777fa04950abd2197bd12bf6cb">btllib::KmerCountingBloomFilter::contains_insert</a></div><div class="ttdeci">T contains_insert(const char *seq, size_t seq_len)</div><div class="ttdef"><b>Definition:</b> counting_bloom_filter-inl.hpp:311</div></div>
<div class="ttc" id="classbtllib_1_1CountingBloomFilter_html_afbb0e0975acd76ec46377d8c58570419"><div class="ttname"><a href="classbtllib_1_1CountingBloomFilter.html#afbb0e0975acd76ec46377d8c58570419">btllib::CountingBloomFilter::get_occupancy</a></div><div class="ttdeci">double get_occupancy(T threshold=1) const </div><div class="ttdef"><b>Definition:</b> counting_bloom_filter-inl.hpp:184</div></div>
<div class="ttc" id="classbtllib_1_1NtHash_html_a244c0c11655b6e1c52dd7c4528b8ed05"><div class="ttname"><a href="classbtllib_1_1NtHash.html#a244c0c11655b6e1c52dd7c4528b8ed05">btllib::NtHash::roll</a></div><div class="ttdeci">bool roll()</div><div class="ttdef"><b>Definition:</b> nthash_kmer.hpp:315</div></div>
<div class="ttc" id="classbtllib_1_1NtHash_html_a244c0c11655b6e1c52dd7c4528b8ed05"><div class="ttname"><a href="classbtllib_1_1NtHash.html#a244c0c11655b6e1c52dd7c4528b8ed05">btllib::NtHash::roll</a></div><div class="ttdeci">bool roll()</div><div class="ttdef"><b>Definition:</b> nthash_kmer.hpp:335</div></div>
<div class="ttc" id="classbtllib_1_1KmerCountingBloomFilter_html_a3dbe61dad343cd8a15b16817fe039fca"><div class="ttname"><a href="classbtllib_1_1KmerCountingBloomFilter.html#a3dbe61dad343cd8a15b16817fe039fca">btllib::KmerCountingBloomFilter::insert_thresh_contains</a></div><div class="ttdeci">T insert_thresh_contains(const char *seq, size_t seq_len, T threshold)</div><div class="ttdef"><b>Definition:</b> counting_bloom_filter-inl.hpp:335</div></div>
<div class="ttc" id="classbtllib_1_1CountingBloomFilter_html_ac2929baf21cc2a2e6050af7ff314bac2"><div class="ttname"><a href="classbtllib_1_1CountingBloomFilter.html#ac2929baf21cc2a2e6050af7ff314bac2">btllib::CountingBloomFilter::insert_contains</a></div><div class="ttdeci">T insert_contains(const uint64_t *hashes, T n=1)</div><div class="ttdef"><b>Definition:</b> counting_bloom_filter-inl.hpp:130</div></div>
<div class="ttc" id="classbtllib_1_1KmerCountingBloomFilter_html_a9f5ab29059b0fa1cc5b076520639f14c"><div class="ttname"><a href="classbtllib_1_1KmerCountingBloomFilter.html#a9f5ab29059b0fa1cc5b076520639f14c">btllib::KmerCountingBloomFilter::insert</a></div><div class="ttdeci">void insert(const char *seq, size_t seq_len)</div><div class="ttdef"><b>Definition:</b> counting_bloom_filter-inl.hpp:269</div></div>
Expand Down
6 changes: 5 additions & 1 deletion docs/functions_0x73.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ <h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
: <a class="el" href="classbtllib_1_1SeedBloomFilter.html#a4fb38186f959cd49479404dd9e03c596">btllib::SeedBloomFilter</a>
</li>
<li>SeedNtHash()
: <a class="el" href="classbtllib_1_1SeedNtHash.html#a650de4cf7e6ed95ee9dead6e23171d44">btllib::SeedNtHash</a>
: <a class="el" href="classbtllib_1_1SeedNtHash.html#adc6e950dac4dbdd41190f1e1159c27a8">btllib::SeedNtHash</a>
</li>
<li>SEQ
: <a class="el" href="structbtllib_1_1Indexlr_1_1Flag.html#a1071f9e151bc7b70631263f8e3eea180">btllib::Indexlr::Flag</a>
Expand All @@ -140,6 +140,10 @@ <h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<li>set_seed()
: <a class="el" href="classbtllib_1_1RandSeq.html#a0a481fe231a3ca8021aa807f2bd7d97b">btllib::RandSeq</a>
</li>
<li>set_seq()
: <a class="el" href="classbtllib_1_1NtHash.html#a419ba8aaab69033241dece2511082ad7">btllib::NtHash</a>
, <a class="el" href="classbtllib_1_1SeedNtHash.html#a49ff99a34ead2b1571a05806607746d0">btllib::SeedNtHash</a>
</li>
<li>SHORT_MODE
: <a class="el" href="structbtllib_1_1SeqReader_1_1Flag.html#ab0aba3f99ab4159205621e2242c6e18f">btllib::SeqReader::Flag</a>
, <a class="el" href="structbtllib_1_1Indexlr_1_1Flag.html#ad901a6d96362ce4b250fa144fe9a76ef">btllib::Indexlr::Flag</a>
Expand Down
6 changes: 5 additions & 1 deletion docs/functions_func_0x73.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ <h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
: <a class="el" href="classbtllib_1_1SeedBloomFilter.html#a4fb38186f959cd49479404dd9e03c596">btllib::SeedBloomFilter</a>
</li>
<li>SeedNtHash()
: <a class="el" href="classbtllib_1_1SeedNtHash.html#a650de4cf7e6ed95ee9dead6e23171d44">btllib::SeedNtHash</a>
: <a class="el" href="classbtllib_1_1SeedNtHash.html#ac37315348fc391ab9e795e4e700fdb21">btllib::SeedNtHash</a>
</li>
<li>SeqReader()
: <a class="el" href="classbtllib_1_1SeqReader.html#a03cc4e39fffc556a2f05c30bc6d3731d">btllib::SeqReader</a>
Expand All @@ -133,6 +133,10 @@ <h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<li>set_seed()
: <a class="el" href="classbtllib_1_1RandSeq.html#a0a481fe231a3ca8021aa807f2bd7d97b">btllib::RandSeq</a>
</li>
<li>set_seq()
: <a class="el" href="classbtllib_1_1SeedNtHash.html#a49ff99a34ead2b1571a05806607746d0">btllib::SeedNtHash</a>
, <a class="el" href="classbtllib_1_1NtHash.html#a419ba8aaab69033241dece2511082ad7">btllib::NtHash</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
Expand Down
Loading