Skip to content

Commit 9eb9158

Browse files
[docs] small clarifications
1 parent af549d3 commit 9eb9158

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<!-- next-header -->
44

55
## git
6+
- docs: small clarifications
67

78
## 2.3.1
89
- bugfix: Fix bug on 32-bit platforms where `1<<32` overflows.

src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
//! _Syncmers_ are (in our notation) windows of length `l = w + k - 1` characters where the minimizer k-mer is a prefix or suffix.
5050
//! (Or, in classical notation, `k`-mers with the smallest `s`-mer as prefix or suffix.)
5151
//! These can be computed by using [`fn@syncmers`] or [`canonical_syncmers`] instead of [`minimizers`] or [`canonical_minimizers`].
52+
//! To obtain their values via [`Output::values_u64`], `l` (rather than `k`) has to be at most 32.
5253
//!
5354
//! Note that canonical syncmers are chosen as the minimum of the forward and reverse-complement k-mer representation.
5455
//!
@@ -60,7 +61,7 @@
6061
//!
6162
//! The main function provided by [`packed_seq`] is [`packed_seq::Seq::iter_bp`], which splits the input into 8 chunks and iterates them in parallel using SIMD.
6263
//!
63-
//! When dealing with ASCII input, use the `AsciiSeq` and `AsciiSeqVec` types.
64+
//! When the input is ASCII-encoded DNA, either use the `AsciiSeq` and `AsciiSeqVec` types, or (usually preferred) first convert to `PackedSeqVec`.
6465
//!
6566
//! ## Hash function
6667
//!
@@ -573,16 +574,22 @@ impl<'h, 'o2, const CANONICAL: bool, H: KmerHasher>
573574

574575
impl<'s, 'o, const CANONICAL: bool, SEQ: Seq<'s>> Output<'o, CANONICAL, SEQ> {
575576
/// Iterator over (canonical) u64 kmer-values associated with all minimizer positions.
577+
///
578+
/// For syncmers, this returns `l=w+k-1`-mers.
576579
#[must_use]
577580
pub fn values_u64(&self) -> impl ExactSizeIterator<Item = u64> {
578581
self.pos_and_values_u64().map(|(_pos, val)| val)
579582
}
580583
/// Iterator over (canonical) u128 kmer-values associated with all minimizer positions.
584+
///
585+
/// For syncmers, this returns `l=w+k-1`-mers.
581586
#[must_use]
582587
pub fn values_u128(&self) -> impl ExactSizeIterator<Item = u128> {
583588
self.pos_and_values_u128().map(|(_pos, val)| val)
584589
}
585590
/// Iterator over positions and (canonical) u64 kmer-values associated with all minimizer positions.
591+
///
592+
/// For syncmers, this returns `l=w+k-1`-mer values.
586593
#[must_use]
587594
pub fn pos_and_values_u64(&self) -> impl ExactSizeIterator<Item = (u32, u64)> {
588595
self.min_pos.iter().map(

0 commit comments

Comments
 (0)