GBWT in Rust

Overview

GBWT (in Rust)

This is a Rust reimplementation of parts of the GBWT and the GBWTGraph. It is based on the Simple-SDS library.

Scope

GBWT

  • Simple-SDS file format
  • Iteration over paths
  • Unidirectional search
  • Bidirectional search
  • Metadata
  • Locate queries

GBWTGraph / GBZ

Possible future additions

  • GBWT construction
  • GBWT merging
  • Cached GBWT

Notes

  • The included .cargo/config.toml sets the target CPU to native.
  • See Simple-SDS for assumptions on the environment.
Comments
  • Better gbunzip

    Better gbunzip

    Various improvements to the gbunzip tool:

    • Supports GBZ files without path/contig names.
    • Writes only a single * for P-line overlaps.
    • Three modes for writing paths (use -p / --paths MODE):
      • default: Named / reference paths as P-lines, other paths as W-lines.
      • pan-sn: All paths as P-lines with PanSN names.
      • ref-only: Named / reference paths as P-lines, no other paths.
    opened by jltsiren 0
  • GFA decompression with gbunzip

    GFA decompression with gbunzip

    The gbunzip tool can decompress a GBZ graph into a GFA file. There are some differences to the decompression in the C++ implementation:

    • Only GBZ files with full metadata are supported.
    • Single-threaded decompression of paths and walks is somewhat slower.
    • There is an option for using multiple threads for extracting paths and walks.
    • Multi-threaded decompression may reorder the paths. The original order can be maintained with option -p / --path-order, which can be slower.
    opened by jltsiren 0
  • Path operations in GBZ

    Path operations in GBZ

    Added several path-based iterators to GBZ:

    • path(): over the nodes on the given path.
    • segment_path(): over the segments on the given path.
    • follow_forward(): over forward extensions of a search state.
    • follow_backward(): over backward extensions of a search state.

    Additionally, runs and GBWT positions now use Run and Pos types instead of (usize, usize) pairs.

    opened by jltsiren 0
  • GBZ support

    GBZ support

    Basic support for the GBZ file format:

    • Simple-SDS serialization format.
    • Random access to nodes and segments by node id.
    • Iterators over nodes and segments.
    • Iterators over predecessors and successors of nodes and segments.

    Also started using proper data types for GFA segments and node/segment/path orientation.

    opened by jltsiren 0
  • Minimal GBWTGraph implementation

    Minimal GBWTGraph implementation

    Minimal support for GBWTGraph. Unlike in the original implementation, the GBWTGraph structure only deals with sequences and segments. Operations based on nodes, edges, and links will be implemented in the GBZ structure.

    opened by jltsiren 0
Releases(v0.2.2)
  • v0.2.2(Feb 22, 2022)

  • v0.2.1(Feb 18, 2022)

  • v0.2(Nov 17, 2021)

    • Graph: GBWTGraph implementation storing node sequences and node-to-segment translation.
    • GBZ: Graph interface.
      • Iterators in the original graph: nodes, predecessors/successors of a node, paths over nodes, extensions of a set of paths.
      • Iterators in the GFA graph: segments, predecessors/successors of a segment, paths over segments.
    • Interface changes:
      • Runs and GBWT positions use Run and Pos types instead of (usize, usize) pairs.
      • Node / path orientation uses enum Orientation instead of bool.
    • Proof-of-concept gbunzip tool for decompressing GFA from GBZ.
      • Somewhat slower than the C++ implementation but supports multi-threaded path extraction for faster decompression.
      • Better parallelization when allowed to reorder the paths opportunistically.
    Source code(tar.gz)
    Source code(zip)
  • v0.1(Sep 17, 2021)

    This is a reimplementation of some parts of the GBWT and the GBWTGraph in Rust. At the moment, the main purpose is ensuring that the Simple-SDS file format specifications are complete enough. I may use this in future projects, but at the moment everything can change without warning.

    The first pre-release includes supports the GBWT Simple-SDS file format as well as path navigation, unidirectional/bidirectional search, and GBWT metadata. The next version will probably support GBWTGraph, the GBZ format, and GFA extraction.

    Source code(tar.gz)
    Source code(zip)
Owner
Jouni Siren
Algorithms and bioinformatics at the UCSC Genomics Institute.
Jouni Siren
A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

William 19 Nov 29, 2022
Learn-rust - An in-depth resource to learn Rust 馃

Learning Rust ?? Hello friend! ?? Welcome to my "Learning Rust" repo, a home for my notes as I'm learning Rust. I'm structuring everything into lesson

Lazar Nikolov 7 Jan 28, 2022
A highly modular Bitcoin Lightning library written in Rust. Its Rust-Lightning, not Rusty's Lightning!

Rust-Lightning is a Bitcoin Lightning library written in Rust. The main crate, lightning, does not handle networking, persistence, or any other I/O. Thus, it is runtime-agnostic, but users must implement basic networking logic, chain interactions, and disk storage. More information is available in the About section.

Lightning Dev Kit 850 Jan 3, 2023
Telegram bot help you to run Rust code in Telegram via Rust playground

RPG_BOT (Rust Playground Bot) Telegram bot help you to run Rust code in Telegram via Rust playground Bot interface The bot supports 3 straightforward

TheAwiteb 8 Dec 6, 2022
`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please

dbg-pls A Debug-like trait for rust that outputs properly formatted code Showcase Take the following code: let code = r#" [ "Hello, World!

Conrad Ludgate 12 Dec 22, 2022
Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

Andr茅 Gomes 10 Nov 17, 2022
馃悁 Building a federated alternative to reddit in rust

Lemmy A link aggregator / Reddit clone for the fediverse. Join Lemmy 路 Documentation 路 Report Bug 路 Request Feature 路 Releases 路 Code of Conduct About

LemmyNet 7.2k Jan 3, 2023
Applied offensive security with Rust

Black Hat Rust - Early Access Deep dive into offensive security with the Rust programming language Buy the book now! Summary Whether in movies or main

Sylvain Kerkour 2.2k Jan 2, 2023
Rholang runtime in rust

Rholang Runtime A rholang runtime written in Rust.

Jerry.Wang 17 Sep 23, 2022
Easy-to-use optional function arguments for Rust

OptArgs uses const generics to ensure compile-time correctness. I've taken the liberty of expanding and humanizing the macros in the reference examples.

Jonathan Kelley 37 Nov 18, 2022
A language server for lua written in rust

lua-analyzer lua-analyzer is a lsp server for lua. This is mostly for me to learn the lsp protocol and language analysis so suggestions are helpful. T

null 61 Dec 11, 2022
Rust library that can be reset if you think it's slow

GoodbyeKT Rust library that can be reset if you think it's slow

null 39 Jun 16, 2022
Cargo - The Rust package manager

Cargo downloads your Rust project鈥檚 dependencies and compiles your project.

The Rust Programming Language 9.5k Jan 4, 2023
A copypastable guide to implementing simple derive macros in Rust.

A copypastable guide to implementing simple derive macros in Rust. The goal Let's say we have a trait with a getter trait MyTrait {

Imbolc 131 Dec 27, 2022
Rust ABI safe code generator

CGlue offers an easy way to ABI (application binary interface) safety. Just a few annotations and your trait is ready to go!

Auri 142 Jan 2, 2023
An example project demonstrating integration with Rust for the ESP32-S2 and ESP32-C3 microcontrollers.

Rust ESP32 Example An example project demonstrating integration with Rust for the ESP32-S2 and ESP32-C3 microcontrollers.

Espressif Systems 303 Jan 4, 2023
Notion Offical API client library for rust

Notion API client library for rust.

Jake Swenson 65 Dec 26, 2022
Rust library for program synthesis of string transformations from input-output examples 馃敭

Synox implements program synthesis of string transformations from input-output examples. Perhaps the most well-known use of string program synthesis in end-user programs is the Flash Fill feature in Excel. These string transformations are learned from input-output examples.

Anish Athalye 21 Apr 27, 2022
Rust for the Windows App SDK

Rust for the Windows App SDK The windows-app crate makes the Windows App SDK (formerly known as Project Reunion) available to Rust developers.

Microsoft 212 Nov 22, 2022