Library for finding syncmers from &[u8] in rust

Overview

Syncmers Library in Rust

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.

Definition

Using the parameterized syncmer scheme, a syncmer is a kmer whose smallest smer is at a given target position (t).

Extract Syncmers from &[u8]

let sequence = b"CCAGTGTTTACGG";
let syncmers = find_syncmers(5, 2, &[2], None, sequence);
assert!(syncmers == vec![b"CCAGT", b"TTACG"]);
println!("{:?}", syncmers);

Extract Syncmers from &[u8], downsampling to 20%

let sequence = b"CCAGTGTTTACGG";
let syncmers = find_syncmers(5, 2, &[2], Some(0.2), sequence);
assert!(syncmers == vec![b"CCAGT", b"TTACG"]);
println!("{:?}", syncmers);

Extract Syncmers from &[u8], keeping 80%

let sequence = b"CCAGTGTTTACGG";
let syncmers = find_syncmers(5, 2, &[2], Some(0.8), sequence);
assert!(syncmers == vec![b"CCAGT", b"TTACG"]);
println!("{:?}", syncmers);

Find positions of 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]);

Changelog

0.1.4: Added downsampling support

You might also like...
Functional Reactive Programming library for Rust

Carboxyl is a library for functional reactive programming in Rust, a functional and composable approach to handle events in interactive applications.

A library for transcoding between bytes in Astro Notation Format and Native Rust data types.

Rust Astro Notation A library for transcoding between hexadecimal strings in Astro Notation Format and Native Rust data types. Usage In your Cargo.tom

A rust library that provides pseudo-reflection for structs and enums

Treeflection treeflection_derive Treeflection runs a command stored as a string on a tree of structs, collections and primitive types. Commands A comm

List public items (public API) of Rust library crates. Enables diffing public API between releases.

cargo wrapper for this library You probably want the cargo wrapper to this library. See https://github.com/Enselic/cargo-public-items. public_items Li

A simple thread schedule and priority library for rust

thread-priority A simple library to control thread schedule policies and thread priority. If your operating system isn't yet supported, please, create

Library for abstract mathematics written by Rust. It is aiming to replace SageMath.

ankolib Roadmap Mathematical Structures Sets Monoids Groups Semirings Rings Algebras Basic Rings and Fields Integers and Rational Numbers Integer Rati

Rust Library for controlling divoom devices that support REST APIs, such as pixoo-64.
Rust Library for controlling divoom devices that support REST APIs, such as pixoo-64.

Divoom Rust Library for controlling divoom devices that support REST APIs, such as pixoo-64 (and from how divoom's api/doc organizes, maybe more in th

A simple /proc/pid/{mem,maps} library for Rust

Summary A very simple library that wraps around /proc/pid/mem and /proc/pid/maps to read memory out of a running process on Linux. Usage Basic usage l

rust channel benchmarks to keep stat of performance of Kanal library in comparison with other competitors.
rust channel benchmarks to keep stat of performance of Kanal library in comparison with other competitors.

Rust Channel Benchmarks This is a highly modified fork of the crossbeam-channel benchmarks. to keep track of Kanal library stats in comparison with ot

Owner
Joseph Guhlin
Plant Genomicist and Bioinformatician interested in structural variation and pangenomics.
Joseph Guhlin
A library for extracting #[no_mangle] pub extern "C" functions (https://docs.rust-embedded.org/book/interoperability/rust-with-c.html#no_mangle)

A library for extracting #[no_mangle] pub extern "C" functions In order to expose a function with C binary interface for interoperability with other p

Dmitrii - Demenev 0 Feb 17, 2022
Rust Imaging Library: A high-level Rust imaging crate.

ril Rust Imaging Library: A performant and high-level Rust imaging crate. Documentation • Crates.io • Discord What's this? This is a Rust crate design

Jay3332 16 Dec 2, 2022
Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.

Speedy2D Hardware-accelerated drawing of shapes, images, and text, with an easy to use API. Speedy2D aims to be: The simplest Rust API for creating a

null 215 Nov 17, 2022
Shuttle is a library for testing concurrent Rust code

Shuttle Shuttle is a library for testing concurrent Rust code. It is an implementation of a number of randomized concurrency testing techniques, inclu

Amazon Web Services - Labs 368 Nov 18, 2022
🦀 In progress Rust library for dogehouse.tv 🦀

dogehouse-rs WARNING: Still work in progress do not use yet Example In Cargo.toml dogehouse-rs = "*" In src/main.rs use dogehouse_rs::prelude::*; use

Will 21 Dec 16, 2021
Comprehensive DSP graph and synthesis library for developing a modular synthesizer in Rust, such as HexoSynth.

HexoDSP - Comprehensive DSP graph and synthesis library for developing a modular synthesizer in Rust, such as HexoSynth. This project contains the com

Weird Constructor 43 Dec 1, 2022
Fluent assertion library for Rust with readable messages.

Assertor Assertor makes test assertions and failure messages more human-readable. Assertor is heavily affected by Java Truth in terms of API design an

Google 19 Nov 24, 2022
Highly experimental, pure-Rust big integer library

grou-num (Pronounced "groo", from the Chiac meaning "big") This package is a highly experimental, unstable big integer library. I would not recommend

Patrick Poitras 1 Dec 18, 2021
"Crates for Cheese" is a Rust collection library of those crates I consider a useful "extended standard".

cfc The purpose of this library is to provide a minimal list of currated crates which enhance the std library. In addition, most or all crates in this

null 0 Dec 23, 2021
An advanced, reactive UI library for Rust

An advanced, reactive UI library for Rust Report a Bug · Request a Feature . Ask a Question What is agui? Agui is an advanced reactive GUI project for

Trevin Miller 28 Nov 26, 2022