Expand description
A Rusty take on the
libhandlegraph
interface for variation graph access and manipulation.
§Overview
This crate provides a number of traits that together encapsulate the handlegraph interface. While these traits do not form a direct mirror of the C++ interface, (almost) all of the features should exist and be usable.
In addition to the abstract traits, there are currently two concrete handlegraphs that implement them:
HashGraphis aHashMap-based graph that does nothing to reduce its memory footprint, but is fast.PackedGraphuses packed integer vectors to greatly reduce memory usage.
§The interface
The handlegraph interface is split into three categories, each consisting of a number of traits that encapsulate a subset of the functionality implied by their category.
handlegraphis for immutable access to the nodes and edges of a graphmutablehandlegraphis for mutable access to nodes and edgespathhandlegraphis for both immutable and mutable access to the paths embedded in a graph
§Handles and NodeIds
The core types, used all over the various traits, are defined in handle:
NodeIdis a newtype used as a node identifierHandlerepresents a specific orientation of a nodeEdgeis a newtype for edges in a specific order
§Misc.
conversionhas some functions for converting from GFA to a handlegraph and backpackedis where the packed vector collection types used byPackedGraphare implemented
Modules§
- conversion
- handle
- handlegraph
- Traits for immutable access to a HandleGraph, including its nodes/handles, edges, and the sequences of nodes.
- hashgraph
- A handlegraph implementation using
HashMapto represent the graph topology and nodes, and each path as aVecof nodes. - mutablehandlegraph
- Traits for manipulating the nodes and edges of a graph.
- packed
- packedgraph
- A handlegraph implementation using
packedvector representations to minimize memory usage. - pathhandlegraph
- Traits and utilities for accessing and manipulating paths embedded in a graph.
- util