pub fn find_syncmers<'a, const N: usize>(
k: usize,
s: usize,
ts: &[usize; N],
downsample: Option<f64>,
seq: &'a [u8],
) -> Vec<&'a [u8]>Expand description
Find syncmers from &u8 and return Vec<&u8>
Parameterized syncmers as defined by Dutta et al. 2022, https://www.biorxiv.org/content/10.1101/2022.01.10.475696v2.full Not all implemented yet (downsampling, windows, are not, for example).
ยงArguments
k: kmer length s: smer length ts: Target positions, set at beginning or end for open/closed syncmers only. Smallest smer must appear in one of these position of the kmer to be a valid syncmer downsample fraction: None, or Some(float) between 0 and 1. If Some, only return some syncmers.
let sequence = b"CCAGTGTTTACGG";
let syncmers = find_syncmers(5, 2, &[2], None, sequence);
assert!(syncmers == vec![b"CCAGT", b"TTACG"]);
// You may also use multiple values for ts
let syncmers = find_syncmers(5, 2, &[2, 3], None, sequence);