Crates.io | syncmers |
lib.rs | syncmers |
version | 0.1.5 |
source | src |
created_at | 2022-10-17 00:08:10.98854 |
updated_at | 2022-12-19 21:21:49.09956 |
description | Rust library for finding syncmers |
homepage | |
repository | https://github.com/jguhlin/syncmers |
max_upload_size | |
id | 689701 |
size | 25,138 |
Syncmers as defined by Dutta et al. 2022, https://www.biorxiv.org/content/10.1101/2022.01.10.475696v2.full Esp Fig 1b / Algorithm 1. Planning to implement other methods soon.
Using the parameterized syncmer scheme, a syncmer is a kmer whose smallest smer is at a given target position (t).
let sequence = b"CCAGTGTTTACGG";
let syncmers = find_syncmers(5, 2, &[2], None, sequence);
assert!(syncmers == vec![b"CCAGT", b"TTACG"]);
println!("{:?}", syncmers);
let sequence = b"CCAGTGTTTACGG";
let syncmers = find_syncmers(5, 2, &[2], Some(0.2), sequence);
assert!(syncmers == vec![b"CCAGT", b"TTACG"]);
println!("{:?}", syncmers);
let sequence = b"CCAGTGTTTACGG";
let syncmers = find_syncmers(5, 2, &[2], Some(0.8), sequence);
assert!(syncmers == vec![b"CCAGT", b"TTACG"]);
println!("{:?}", syncmers);
let sequence = b"CCAGTGTTTACGG";
let syncmer_positions = find_syncmers_pos(5, 2, &[2], None, sequence);
println!("{:?}", syncmer_positions);
assert!(syncmer_positions == vec![0, 7]);
0.1.4: Added downsampling support