mod graph;
#[cfg(not(feature = "docs-only"))]
mod conversion;
pub use graph::{Graph, Error, Edge, PathPosition};
#[cfg(not(feature = "docs-only"))]
pub use conversion::{gfa_to_odgi, odgi_to_gfa};
#[cfg(not(feature = "docs-only"))]
#[cxx::bridge(namespace = "odgi")]
mod ffi {
#[derive(Debug, Clone)]
struct Edge {
to_node: u64,
from_orientation: bool,
to_orientation: bool,
}
#[derive(Debug, Clone)]
struct PathPosition {
node_id: u64,
offset: u64,
is_forward: bool,
}
unsafe extern "C++" {
include!("odgi-ffi/src/odgi_wrapper.hpp");
include!("odgi-ffi/src/lib.rs.h");
type graph_t;
#[namespace = ""]
type OpaqueGraph;
#[namespace = ""]
fn load_graph(path: &str) -> UniquePtr<OpaqueGraph>;
#[namespace = ""]
fn get_graph_t<'a>(graph: &'a OpaqueGraph) -> &'a graph_t;
#[namespace = ""]
fn get_node_count(graph: &graph_t) -> u64;
#[namespace = ""]
fn graph_get_path_names(graph: &graph_t) -> Vec<String>;
#[namespace = ""]
fn graph_project(graph: &graph_t, path_name: &str, pos: u64) -> UniquePtr<PathPosition>;
#[namespace = ""]
fn graph_get_node_sequence(graph: &graph_t, node_id: u64) -> String;
#[namespace = ""]
fn graph_get_node_len(graph: &graph_t, node_id: u64) -> u64;
#[namespace = ""]
fn graph_get_successors(graph: &graph_t, node_id: u64) -> Vec<Edge>;
#[namespace = ""]
fn graph_get_predecessors(graph: &graph_t, node_id: u64) -> Vec<Edge>;
#[namespace = ""]
fn graph_get_paths_on_node(graph: &graph_t, node_id: u64) -> Vec<String>;
#[namespace = ""]
fn graph_get_path_length(graph: &graph_t, path_name: &str) -> u64;
#[namespace = ""]
fn graph_get_next_node_on_path(graph: &graph_t, path_name: &str, node_id: u64) -> i64;
#[namespace = ""]
fn graph_get_paths_on_edge(
graph: &graph_t,
from_node: u64,
from_orient: bool,
to_node: u64,
to_orient: bool
) -> Vec<String>;
}
}
#[cfg(feature = "docs-only")]
mod ffi {
pub enum OpaqueGraph {}
#[derive(Debug, Clone)]
pub struct Edge {
pub to_node: u64,
pub from_orientation: bool,
pub to_orientation: bool,
}
#[derive(Debug, Clone)]
pub struct PathPosition {
pub node_id: u64,
pub offset: u64,
pub is_forward: bool,
}
}