From 076e21a58cb76fcb4a8b58d1322786a6e0cfc1b3 Mon Sep 17 00:00:00 2001 From: Jordan Eizenga Date: Mon, 16 Dec 2024 15:13:29 -0500 Subject: [PATCH 1/9] add implementations for change seq --- bdsg/include/bdsg/hash_graph.hpp | 7 +++- .../bdsg/internal/base_packed_graph.hpp | 36 +++++++++++++++++++ ...etable_handle_graph_fragment.classfragment | 8 +++++ bdsg/src/hash_graph.cpp | 7 ++++ bdsg/src/test_libbdsg.cpp | 9 ++++- 5 files changed, 65 insertions(+), 2 deletions(-) diff --git a/bdsg/include/bdsg/hash_graph.hpp b/bdsg/include/bdsg/hash_graph.hpp index 2c463307..c543d9d8 100644 --- a/bdsg/include/bdsg/hash_graph.hpp +++ b/bdsg/include/bdsg/hash_graph.hpp @@ -132,7 +132,12 @@ class HashGraph : public MutablePathDeletableHandleGraph, public SerializableHan /// May **NOT** be called during iteration over paths, if it would destroy a path. /// May **NOT** be called during iteration along a path, if it would destroy that path. void destroy_handle(const handle_t& handle); - + + /// Change the sequence of handle to a new sequence. Returns a (possibly alterered) + /// handle to the node with the new sequence. May invalidate the existing handle. Updates + /// paths if called through an inheriting MutablePath interface. + handle_t change_sequence(const handle_t& handle, const std::string& sequence); + /// Create an edge connecting the given handles in the given order and orientations. /// Ignores existing edges. void create_edge(const handle_t& left, const handle_t& right); diff --git a/bdsg/include/bdsg/internal/base_packed_graph.hpp b/bdsg/include/bdsg/internal/base_packed_graph.hpp index a5242c35..ef057017 100644 --- a/bdsg/include/bdsg/internal/base_packed_graph.hpp +++ b/bdsg/include/bdsg/internal/base_packed_graph.hpp @@ -180,6 +180,11 @@ class BasePackedGraph { /// May **NOT** be called during iteration along a path, if it would destroy that path. void destroy_handle(const handle_t& handle); + /// Change the sequence of handle to a new sequence. Returns a (possibly alterered) + /// handle to the node with the new sequence. May invalidate the existing handle. Updates + /// paths if called through an inheriting MutablePath interface. + handle_t change_sequence(const handle_t& handle, const std::string& sequence); + /// Shorten a node by truncating either the left or right side of the node, relative to the orientation /// of the handle, starting from a given offset along the nodes sequence. Any edges on the truncated /// end of the node are deleted. Returns a (possibly altered) handle to the truncated node. @@ -1752,6 +1757,37 @@ void BasePackedGraph::destroy_handle(const handle_t& handle) { defragment(get_node_count() == 0); } +template +handle_t BasePackedGraph::change_sequence(const handle_t& handle, const std::string& sequence) { + + size_t g_iv_index = graph_iv_index(handle); + size_t seq_start = seq_start_iv.get(graph_index_to_seq_start_index(g_iv_index)); + size_t seq_len = seq_length_iv.get(graph_index_to_seq_len_index(g_iv_index)); + if (seq_len >= sequence.size()) { + // we can fit the new sequence in the same location + for (size_t i = 0; i < sequence.size(); ++i) { + seq_iv.set(seq_start + i, encode_nucleotide(sequence[i])); + } + deleted_bases += (seq_len - sequence.size()); + } + else { + // the new sequence doesn't fit, add it at the end + seq_start_iv.set(graph_index_to_seq_start_index(g_iv_index), seq_iv.size()); + for (size_t i = 0; i < sequence.size(); ++i) { + seq_iv.append(encode_nucleotide(sequence[i])); + } + deleted_bases += seq_len; + } + seq_length_iv.set(graph_index_to_seq_len_index(g_iv_index), sequence.size()); + + // FIXME: disabling since deleting bases can't currently trigger a defrag + //if (seq_len != sequence.size()) { + // defragment(); + //} + + return handle; +} + template handle_t BasePackedGraph::truncate_handle(const handle_t& handle, bool trunc_left, size_t offset) { // TODO: This duplicates the libhandlegraph implementation diff --git a/bdsg/include/bdsg/internal/graph_proxy_mutable_path_deletable_handle_graph_fragment.classfragment b/bdsg/include/bdsg/internal/graph_proxy_mutable_path_deletable_handle_graph_fragment.classfragment index 292868bf..ac7d86e0 100644 --- a/bdsg/include/bdsg/internal/graph_proxy_mutable_path_deletable_handle_graph_fragment.classfragment +++ b/bdsg/include/bdsg/internal/graph_proxy_mutable_path_deletable_handle_graph_fragment.classfragment @@ -202,6 +202,14 @@ public: return this->get()->truncate_handle(handle, trunc_left, offset); } + + /// Change the sequence of handle's forward orientation to a new sequence. Returns a (possibly + /// handle to the node with the new sequence. May invalidate the existing handle. Updates + /// alterered) paths if called through a class inheriting a MutablePathHandleGraph interface. + virtual handle_t change_sequence(const handle_t& handle, const std::string& sequence) { + return this->get()->change_sequence(handle, sequence); + } + /// Remove all nodes and edges. May also remove all paths, if applicable. virtual void clear() { this->get()->clear(); diff --git a/bdsg/src/hash_graph.cpp b/bdsg/src/hash_graph.cpp index 5b85811a..910d95e2 100644 --- a/bdsg/src/hash_graph.cpp +++ b/bdsg/src/hash_graph.cpp @@ -398,6 +398,13 @@ namespace bdsg { // remove this node from the relevant indexes graph.erase(get_id(handle)); } + + handle_t HashGraph::change_sequence(const handle_t& handle, const std::string& sequence) { + + graph[get_id(handle)].sequence = sequence; + + return handle; + } void HashGraph::destroy_edge(const handle_t& left, const handle_t& right) { diff --git a/bdsg/src/test_libbdsg.cpp b/bdsg/src/test_libbdsg.cpp index addc63e5..8d3e8de6 100644 --- a/bdsg/src/test_libbdsg.cpp +++ b/bdsg/src/test_libbdsg.cpp @@ -1781,6 +1781,13 @@ void test_deletable_handle_graphs() { assert(graph.get_degree(h7, false) == 0); assert(graph.get_degree(h6, false) == 0); assert(graph.get_degree(h8, true) == 0); + + h6 = graph.change_sequence(h6, "AAAT"); + h7 = graph.change_sequence(h7, "G"); + assert(graph.get_sequence(h6) == "AAAT"); + assert(graph.get_sequence(graph.flip(h6)) == "ATTT"); + assert(graph.get_sequence(h7) == "G"); + assert(graph.get_sequence(graph.flip(h7)) == "C"); } } @@ -4685,8 +4692,8 @@ int main(void) { test_paged_vector>(); test_packed_deque(); test_packed_set(); - test_deletable_handle_graphs(); test_mutable_path_handle_graphs(); + test_deletable_handle_graphs(); test_serializable_handle_graphs(); test_packed_graph(); test_path_position_overlays(); From 872168366528941a6f75bf0fbe11cba5be677ac3 Mon Sep 17 00:00:00 2001 From: Jordan Eizenga Date: Tue, 17 Dec 2024 16:44:51 -0500 Subject: [PATCH 2/9] update cmake bindings --- bdsg/cmake_bindings/bdsg.cpp | 4 +- bdsg/cmake_bindings/bdsg.sources | 2 +- bdsg/cmake_bindings/bdsg/graph_proxy.cpp | 151 +-- bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp | 137 +- .../bdsg/internal/base_packed_graph.cpp | 149 +-- .../bdsg/internal/eades_algorithm.cpp | 2 +- .../cmake_bindings/bdsg/internal/hash_map.cpp | 30 +- .../bdsg/internal/is_single_stranded.cpp | 2 +- .../bdsg/internal/mapped_structs_1.cpp | 42 +- .../overlays/packed_path_position_overlay.cpp | 6 +- .../packed_path_position_overlay_1.cpp | 13 +- .../bdsg/overlays/path_position_overlays.cpp | 17 +- .../bdsg/overlays/path_subgraph_overlay.cpp | 4 +- .../bdsg/overlays/reference_path_overlay.cpp | 1121 +++++++++++++++++ .../bdsg/overlays/strand_split_overlay.cpp | 2 +- .../bdsg/overlays/vectorizable_overlays.cpp | 632 ++++++++-- .../bdsg/overlays/vectorizable_overlays_1.cpp | 817 ------------ bdsg/cmake_bindings/bdsg/packed_graph.cpp | 40 +- .../bdsg/snarl_distance_index.cpp | 72 +- .../handlegraph/expanding_overlay_graph.cpp | 2 +- .../handlegraph/handle_graph.cpp | 2 +- .../handlegraph/mutable_path_metadata.cpp | 16 +- .../mutable_path_mutable_handle_graph.cpp | 30 +- .../handlegraph/path_handle_graph.cpp | 2 +- .../handlegraph/path_metadata.cpp | 2 +- .../path_position_handle_graph.cpp | 2 +- .../handlegraph/trivially_serializable.cpp | 2 +- .../std/bdsg/internal/binder_hook_bind.cpp | 4 + 28 files changed, 2059 insertions(+), 1246 deletions(-) create mode 100644 bdsg/cmake_bindings/bdsg/overlays/reference_path_overlay.cpp delete mode 100644 bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays_1.cpp diff --git a/bdsg/cmake_bindings/bdsg.cpp b/bdsg/cmake_bindings/bdsg.cpp index df3d9da7..91cb046f 100644 --- a/bdsg/cmake_bindings/bdsg.cpp +++ b/bdsg/cmake_bindings/bdsg.cpp @@ -32,8 +32,8 @@ void bind_bdsg_overlays_packed_path_position_overlay(std::function< pybind11::mo void bind_bdsg_overlays_packed_path_position_overlay_1(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_overlays_path_position_overlays(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_overlays_path_subgraph_overlay(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_bdsg_overlays_reference_path_overlay(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_overlays_vectorizable_overlays(std::function< pybind11::module &(std::string const &namespace_) > &M); -void bind_bdsg_overlays_vectorizable_overlays_1(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_handlegraph_trivially_serializable(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_packed_graph(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -93,8 +93,8 @@ PYBIND11_MODULE(bdsg, root_module) { bind_bdsg_overlays_packed_path_position_overlay_1(M); bind_bdsg_overlays_path_position_overlays(M); bind_bdsg_overlays_path_subgraph_overlay(M); + bind_bdsg_overlays_reference_path_overlay(M); bind_bdsg_overlays_vectorizable_overlays(M); - bind_bdsg_overlays_vectorizable_overlays_1(M); bind_handlegraph_trivially_serializable(M); bind_bdsg_packed_graph(M); bind_bdsg_snarl_distance_index(M); diff --git a/bdsg/cmake_bindings/bdsg.sources b/bdsg/cmake_bindings/bdsg.sources index 176b85d7..0395d8d7 100644 --- a/bdsg/cmake_bindings/bdsg.sources +++ b/bdsg/cmake_bindings/bdsg.sources @@ -22,8 +22,8 @@ bdsg/overlays/packed_path_position_overlay.cpp bdsg/overlays/packed_path_position_overlay_1.cpp bdsg/overlays/path_position_overlays.cpp bdsg/overlays/path_subgraph_overlay.cpp +bdsg/overlays/reference_path_overlay.cpp bdsg/overlays/vectorizable_overlays.cpp -bdsg/overlays/vectorizable_overlays_1.cpp handlegraph/trivially_serializable.cpp bdsg/packed_graph.cpp bdsg/snarl_distance_index.cpp diff --git a/bdsg/cmake_bindings/bdsg/graph_proxy.cpp b/bdsg/cmake_bindings/bdsg/graph_proxy.cpp index a0fcc9e8..d5eda612 100644 --- a/bdsg/cmake_bindings/bdsg/graph_proxy.cpp +++ b/bdsg/cmake_bindings/bdsg/graph_proxy.cpp @@ -9,12 +9,12 @@ #include #include #include +#include #include #include #include // __str__ #include #include -#include #include #include #include @@ -39,80 +39,81 @@ void bind_bdsg_graph_proxy(std::function< pybind11::module &(std::string const &namespace_) > &M) { { // bdsg::GraphProxy file:bdsg/graph_proxy.hpp line:60 - pybind11::class_>, std::shared_ptr>>, handlegraph::MutablePathDeletableHandleGraph, handlegraph::SerializableHandleGraph> cl(M("bdsg"), "GraphProxy_bdsg_BasePackedGraph_t", ""); - cl.def("has_node", (bool (bdsg::GraphProxy>::*)(long long) const) &bdsg::GraphProxy>::has_node, "C++: bdsg::GraphProxy>::has_node(long long) const --> bool", pybind11::arg("node_id")); - cl.def("get_handle", [](bdsg::GraphProxy> const &o, const long long & a0) -> handlegraph::handle_t { return o.get_handle(a0); }, "", pybind11::arg("node_id")); - cl.def("get_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const long long &, bool) const) &bdsg::GraphProxy>::get_handle, "C++: bdsg::GraphProxy>::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); - cl.def("get_id", (long long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_id, "C++: bdsg::GraphProxy>::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); - cl.def("get_is_reverse", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_is_reverse, "C++: bdsg::GraphProxy>::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); - cl.def("flip", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::flip, "C++: bdsg::GraphProxy>::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); - cl.def("get_length", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_length, "C++: bdsg::GraphProxy>::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_sequence", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_sequence, "C++: bdsg::GraphProxy>::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_node_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_node_count, "C++: bdsg::GraphProxy>::get_node_count() const --> unsigned long"); - cl.def("min_node_id", (long long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::min_node_id, "C++: bdsg::GraphProxy>::min_node_id() const --> long long"); - cl.def("max_node_id", (long long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::max_node_id, "C++: bdsg::GraphProxy>::max_node_id() const --> long long"); - cl.def("get_degree", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::GraphProxy>::get_degree, "C++: bdsg::GraphProxy>::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); - cl.def("has_edge", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::has_edge, "C++: bdsg::GraphProxy>::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); - cl.def("get_edge_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_edge_count, "C++: bdsg::GraphProxy>::get_edge_count() const --> unsigned long"); - cl.def("get_total_length", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_total_length, "C++: bdsg::GraphProxy>::get_total_length() const --> unsigned long"); - cl.def("get_base", (char (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::GraphProxy>::get_base, "C++: bdsg::GraphProxy>::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); - cl.def("get_subsequence", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::GraphProxy>::get_subsequence, "C++: bdsg::GraphProxy>::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); - cl.def("get_path_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_path_count, "C++: bdsg::GraphProxy>::get_path_count() const --> unsigned long"); - cl.def("has_path", (bool (bdsg::GraphProxy>::*)(const std::string &) const) &bdsg::GraphProxy>::has_path, "C++: bdsg::GraphProxy>::has_path(const std::string &) const --> bool", pybind11::arg("path_name")); - cl.def("get_path_handle", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const std::string &) const) &bdsg::GraphProxy>::get_path_handle, "C++: bdsg::GraphProxy>::get_path_handle(const std::string &) const --> struct handlegraph::path_handle_t", pybind11::arg("path_name")); - cl.def("get_path_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_path_name, "C++: bdsg::GraphProxy>::get_path_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("path_handle")); - cl.def("get_is_circular", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_is_circular, "C++: bdsg::GraphProxy>::get_is_circular(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); - cl.def("get_step_count", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_step_count, "C++: bdsg::GraphProxy>::get_step_count(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); - cl.def("get_step_count", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_step_count, "C++: bdsg::GraphProxy>::get_step_count(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_handle_of_step", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::get_handle_of_step, "C++: bdsg::GraphProxy>::get_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("step_handle")); - cl.def("get_path_handle_of_step", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::get_path_handle_of_step, "C++: bdsg::GraphProxy>::get_path_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::path_handle_t", pybind11::arg("step_handle")); - cl.def("path_begin", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::path_begin, "C++: bdsg::GraphProxy>::path_begin(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("path_end", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::path_end, "C++: bdsg::GraphProxy>::path_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("path_back", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::path_back, "C++: bdsg::GraphProxy>::path_back(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("path_front_end", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::path_front_end, "C++: bdsg::GraphProxy>::path_front_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("has_next_step", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::has_next_step, "C++: bdsg::GraphProxy>::has_next_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); - cl.def("has_previous_step", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::has_previous_step, "C++: bdsg::GraphProxy>::has_previous_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); - cl.def("get_next_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::get_next_step, "C++: bdsg::GraphProxy>::get_next_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); - cl.def("get_previous_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::get_previous_step, "C++: bdsg::GraphProxy>::get_previous_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); - cl.def("steps_of_handle", [](bdsg::GraphProxy> const &o, const struct handlegraph::handle_t & a0) -> std::vector { return o.steps_of_handle(a0); }, "", pybind11::arg("handle")); - cl.def("steps_of_handle", (class std::vector (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::GraphProxy>::steps_of_handle, "C++: bdsg::GraphProxy>::steps_of_handle(const struct handlegraph::handle_t &, bool) const --> class std::vector", pybind11::arg("handle"), pybind11::arg("match_orientation")); - cl.def("is_empty", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::is_empty, "C++: bdsg::GraphProxy>::is_empty(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); - cl.def("get_sense", (enum handlegraph::PathSense (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_sense, "C++: bdsg::GraphProxy>::get_sense(const struct handlegraph::path_handle_t &) const --> enum handlegraph::PathSense", pybind11::arg("handle")); - cl.def("get_sample_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_sample_name, "C++: bdsg::GraphProxy>::get_sample_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_locus_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_locus_name, "C++: bdsg::GraphProxy>::get_locus_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_haplotype", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_haplotype, "C++: bdsg::GraphProxy>::get_haplotype(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_phase_block", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_phase_block, "C++: bdsg::GraphProxy>::get_phase_block(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_subrange", (struct std::pair (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_subrange, "C++: bdsg::GraphProxy>::get_subrange(const struct handlegraph::path_handle_t &) const --> struct std::pair", pybind11::arg("handle")); - cl.def("create_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy>::create_handle, "C++: bdsg::GraphProxy>::create_handle(const std::string &) --> struct handlegraph::handle_t", pybind11::arg("sequence")); - cl.def("create_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const std::string &, const long long &)) &bdsg::GraphProxy>::create_handle, "C++: bdsg::GraphProxy>::create_handle(const std::string &, const long long &) --> struct handlegraph::handle_t", pybind11::arg("sequence"), pybind11::arg("id")); - cl.def("create_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::create_edge, "C++: bdsg::GraphProxy>::create_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); - cl.def("apply_orientation", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::apply_orientation, "C++: bdsg::GraphProxy>::apply_orientation(const struct handlegraph::handle_t &) --> struct handlegraph::handle_t", pybind11::arg("handle")); - cl.def("divide_handle", (class std::vector (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const class std::vector &)) &bdsg::GraphProxy>::divide_handle, "C++: bdsg::GraphProxy>::divide_handle(const struct handlegraph::handle_t &, const class std::vector &) --> class std::vector", pybind11::arg("handle"), pybind11::arg("offsets")); - cl.def("optimize", [](bdsg::GraphProxy> &o) -> void { return o.optimize(); }, ""); - cl.def("optimize", (void (bdsg::GraphProxy>::*)(bool)) &bdsg::GraphProxy>::optimize, "C++: bdsg::GraphProxy>::optimize(bool) --> void", pybind11::arg("allow_id_reassignment")); - cl.def("apply_ordering", [](bdsg::GraphProxy> &o, const class std::vector & a0) -> bool { return o.apply_ordering(a0); }, "", pybind11::arg("order")); - cl.def("apply_ordering", (bool (bdsg::GraphProxy>::*)(const class std::vector &, bool)) &bdsg::GraphProxy>::apply_ordering, "C++: bdsg::GraphProxy>::apply_ordering(const class std::vector &, bool) --> bool", pybind11::arg("order"), pybind11::arg("compact_ids")); - cl.def("set_id_increment", (void (bdsg::GraphProxy>::*)(const long long &)) &bdsg::GraphProxy>::set_id_increment, "C++: bdsg::GraphProxy>::set_id_increment(const long long &) --> void", pybind11::arg("min_id")); - cl.def("increment_node_ids", (void (bdsg::GraphProxy>::*)(long long)) &bdsg::GraphProxy>::increment_node_ids, "C++: bdsg::GraphProxy>::increment_node_ids(long long) --> void", pybind11::arg("increment")); - cl.def("increment_node_ids", (void (bdsg::GraphProxy>::*)(long)) &bdsg::GraphProxy>::increment_node_ids, "C++: bdsg::GraphProxy>::increment_node_ids(long) --> void", pybind11::arg("increment")); - cl.def("reassign_node_ids", (void (bdsg::GraphProxy>::*)(const class std::function &)) &bdsg::GraphProxy>::reassign_node_ids, "C++: bdsg::GraphProxy>::reassign_node_ids(const class std::function &) --> void", pybind11::arg("get_new_id")); - cl.def("destroy_path", (void (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &)) &bdsg::GraphProxy>::destroy_path, "C++: bdsg::GraphProxy>::destroy_path(const struct handlegraph::path_handle_t &) --> void", pybind11::arg("path")); - cl.def("create_path_handle", [](bdsg::GraphProxy> &o, const std::string & a0) -> handlegraph::path_handle_t { return o.create_path_handle(a0); }, "", pybind11::arg("name")); - cl.def("create_path_handle", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const std::string &, bool)) &bdsg::GraphProxy>::create_path_handle, "C++: bdsg::GraphProxy>::create_path_handle(const std::string &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("name"), pybind11::arg("is_circular")); - cl.def("append_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::append_step, "C++: bdsg::GraphProxy>::append_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_append")); - cl.def("prepend_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::prepend_step, "C++: bdsg::GraphProxy>::prepend_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_prepend")); - cl.def("rewrite_segment", (struct std::pair (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &)) &bdsg::GraphProxy>::rewrite_segment, "C++: bdsg::GraphProxy>::rewrite_segment(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &) --> struct std::pair", pybind11::arg("segment_begin"), pybind11::arg("segment_end"), pybind11::arg("new_segment")); - cl.def("set_circularity", (void (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, bool)) &bdsg::GraphProxy>::set_circularity, "C++: bdsg::GraphProxy>::set_circularity(const struct handlegraph::path_handle_t &, bool) --> void", pybind11::arg("path"), pybind11::arg("circular")); - cl.def("destroy_handle", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::destroy_handle, "C++: bdsg::GraphProxy>::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); - cl.def("destroy_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::destroy_edge, "C++: bdsg::GraphProxy>::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); - cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::GraphProxy>::truncate_handle, "C++: bdsg::GraphProxy>::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); - cl.def("clear", (void (bdsg::GraphProxy>::*)()) &bdsg::GraphProxy>::clear, "C++: bdsg::GraphProxy>::clear() --> void"); - cl.def("create_path", [](bdsg::GraphProxy> &o, const enum handlegraph::PathSense & a0, const std::string & a1, const std::string & a2, const unsigned long & a3, const unsigned long & a4, const struct std::pair & a5) -> handlegraph::path_handle_t { return o.create_path(a0, a1, a2, a3, a4, a5); }, "", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange")); - cl.def("create_path", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool)) &bdsg::GraphProxy>::create_path, "C++: bdsg::GraphProxy>::create_path(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange"), pybind11::arg("is_circular")); - cl.def("get_magic_number", (unsigned int (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_magic_number, "C++: bdsg::GraphProxy>::get_magic_number() const --> unsigned int"); - cl.def("deserialize", (void (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy>::deserialize, "C++: bdsg::GraphProxy>::deserialize(const std::string &) --> void", pybind11::arg("filename")); - cl.def("serialize", (void (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy>::serialize, "C++: bdsg::GraphProxy>::serialize(const std::string &) --> void", pybind11::arg("filename")); - cl.def("assign", (struct bdsg::GraphProxy > & (bdsg::GraphProxy>::*)(const struct bdsg::GraphProxy > &)) &bdsg::GraphProxy>::operator=, "C++: bdsg::GraphProxy>::operator=(const struct bdsg::GraphProxy > &) --> struct bdsg::GraphProxy > &", pybind11::return_value_policy::automatic, pybind11::arg("")); + pybind11::class_>, std::shared_ptr>>, handlegraph::MutablePathDeletableHandleGraph, handlegraph::SerializableHandleGraph> cl(M("bdsg"), "GraphProxy_bdsg_BasePackedGraph_bdsg_STLBackend_t", ""); + cl.def("has_node", (bool (bdsg::GraphProxy>::*)(long long) const) &bdsg::GraphProxy >::has_node, "C++: bdsg::GraphProxy >::has_node(long long) const --> bool", pybind11::arg("node_id")); + cl.def("get_handle", [](bdsg::GraphProxy> const &o, const long long & a0) -> handlegraph::handle_t { return o.get_handle(a0); }, "", pybind11::arg("node_id")); + cl.def("get_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const long long &, bool) const) &bdsg::GraphProxy >::get_handle, "C++: bdsg::GraphProxy >::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); + cl.def("get_id", (long long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_id, "C++: bdsg::GraphProxy >::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); + cl.def("get_is_reverse", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_is_reverse, "C++: bdsg::GraphProxy >::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); + cl.def("flip", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::flip, "C++: bdsg::GraphProxy >::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("get_length", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_length, "C++: bdsg::GraphProxy >::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_sequence", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_sequence, "C++: bdsg::GraphProxy >::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_node_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_node_count, "C++: bdsg::GraphProxy >::get_node_count() const --> unsigned long"); + cl.def("min_node_id", (long long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::min_node_id, "C++: bdsg::GraphProxy >::min_node_id() const --> long long"); + cl.def("max_node_id", (long long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::max_node_id, "C++: bdsg::GraphProxy >::max_node_id() const --> long long"); + cl.def("get_degree", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::GraphProxy >::get_degree, "C++: bdsg::GraphProxy >::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); + cl.def("has_edge", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::has_edge, "C++: bdsg::GraphProxy >::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); + cl.def("get_edge_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_edge_count, "C++: bdsg::GraphProxy >::get_edge_count() const --> unsigned long"); + cl.def("get_total_length", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_total_length, "C++: bdsg::GraphProxy >::get_total_length() const --> unsigned long"); + cl.def("get_base", (char (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::GraphProxy >::get_base, "C++: bdsg::GraphProxy >::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); + cl.def("get_subsequence", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::GraphProxy >::get_subsequence, "C++: bdsg::GraphProxy >::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); + cl.def("get_path_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_path_count, "C++: bdsg::GraphProxy >::get_path_count() const --> unsigned long"); + cl.def("has_path", (bool (bdsg::GraphProxy>::*)(const std::string &) const) &bdsg::GraphProxy >::has_path, "C++: bdsg::GraphProxy >::has_path(const std::string &) const --> bool", pybind11::arg("path_name")); + cl.def("get_path_handle", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const std::string &) const) &bdsg::GraphProxy >::get_path_handle, "C++: bdsg::GraphProxy >::get_path_handle(const std::string &) const --> struct handlegraph::path_handle_t", pybind11::arg("path_name")); + cl.def("get_path_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_path_name, "C++: bdsg::GraphProxy >::get_path_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("path_handle")); + cl.def("get_is_circular", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_is_circular, "C++: bdsg::GraphProxy >::get_is_circular(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); + cl.def("get_step_count", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_step_count, "C++: bdsg::GraphProxy >::get_step_count(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); + cl.def("get_step_count", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_step_count, "C++: bdsg::GraphProxy >::get_step_count(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_handle_of_step", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::get_handle_of_step, "C++: bdsg::GraphProxy >::get_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("step_handle")); + cl.def("get_path_handle_of_step", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::get_path_handle_of_step, "C++: bdsg::GraphProxy >::get_path_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::path_handle_t", pybind11::arg("step_handle")); + cl.def("path_begin", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::path_begin, "C++: bdsg::GraphProxy >::path_begin(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_end", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::path_end, "C++: bdsg::GraphProxy >::path_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_back", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::path_back, "C++: bdsg::GraphProxy >::path_back(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_front_end", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::path_front_end, "C++: bdsg::GraphProxy >::path_front_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("has_next_step", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::has_next_step, "C++: bdsg::GraphProxy >::has_next_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); + cl.def("has_previous_step", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::has_previous_step, "C++: bdsg::GraphProxy >::has_previous_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); + cl.def("get_next_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::get_next_step, "C++: bdsg::GraphProxy >::get_next_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); + cl.def("get_previous_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::get_previous_step, "C++: bdsg::GraphProxy >::get_previous_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); + cl.def("steps_of_handle", [](bdsg::GraphProxy> const &o, const struct handlegraph::handle_t & a0) -> std::vector { return o.steps_of_handle(a0); }, "", pybind11::arg("handle")); + cl.def("steps_of_handle", (class std::vector (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::GraphProxy >::steps_of_handle, "C++: bdsg::GraphProxy >::steps_of_handle(const struct handlegraph::handle_t &, bool) const --> class std::vector", pybind11::arg("handle"), pybind11::arg("match_orientation")); + cl.def("is_empty", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::is_empty, "C++: bdsg::GraphProxy >::is_empty(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); + cl.def("get_sense", (enum handlegraph::PathSense (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_sense, "C++: bdsg::GraphProxy >::get_sense(const struct handlegraph::path_handle_t &) const --> enum handlegraph::PathSense", pybind11::arg("handle")); + cl.def("get_sample_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_sample_name, "C++: bdsg::GraphProxy >::get_sample_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_locus_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_locus_name, "C++: bdsg::GraphProxy >::get_locus_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_haplotype", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_haplotype, "C++: bdsg::GraphProxy >::get_haplotype(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_phase_block", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_phase_block, "C++: bdsg::GraphProxy >::get_phase_block(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_subrange", (struct std::pair (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_subrange, "C++: bdsg::GraphProxy >::get_subrange(const struct handlegraph::path_handle_t &) const --> struct std::pair", pybind11::arg("handle")); + cl.def("create_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy >::create_handle, "C++: bdsg::GraphProxy >::create_handle(const std::string &) --> struct handlegraph::handle_t", pybind11::arg("sequence")); + cl.def("create_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const std::string &, const long long &)) &bdsg::GraphProxy >::create_handle, "C++: bdsg::GraphProxy >::create_handle(const std::string &, const long long &) --> struct handlegraph::handle_t", pybind11::arg("sequence"), pybind11::arg("id")); + cl.def("create_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::create_edge, "C++: bdsg::GraphProxy >::create_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); + cl.def("apply_orientation", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::apply_orientation, "C++: bdsg::GraphProxy >::apply_orientation(const struct handlegraph::handle_t &) --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("divide_handle", (class std::vector (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const class std::vector &)) &bdsg::GraphProxy >::divide_handle, "C++: bdsg::GraphProxy >::divide_handle(const struct handlegraph::handle_t &, const class std::vector &) --> class std::vector", pybind11::arg("handle"), pybind11::arg("offsets")); + cl.def("optimize", [](bdsg::GraphProxy> &o) -> void { return o.optimize(); }, ""); + cl.def("optimize", (void (bdsg::GraphProxy>::*)(bool)) &bdsg::GraphProxy >::optimize, "C++: bdsg::GraphProxy >::optimize(bool) --> void", pybind11::arg("allow_id_reassignment")); + cl.def("apply_ordering", [](bdsg::GraphProxy> &o, const class std::vector & a0) -> bool { return o.apply_ordering(a0); }, "", pybind11::arg("order")); + cl.def("apply_ordering", (bool (bdsg::GraphProxy>::*)(const class std::vector &, bool)) &bdsg::GraphProxy >::apply_ordering, "C++: bdsg::GraphProxy >::apply_ordering(const class std::vector &, bool) --> bool", pybind11::arg("order"), pybind11::arg("compact_ids")); + cl.def("set_id_increment", (void (bdsg::GraphProxy>::*)(const long long &)) &bdsg::GraphProxy >::set_id_increment, "C++: bdsg::GraphProxy >::set_id_increment(const long long &) --> void", pybind11::arg("min_id")); + cl.def("increment_node_ids", (void (bdsg::GraphProxy>::*)(long long)) &bdsg::GraphProxy >::increment_node_ids, "C++: bdsg::GraphProxy >::increment_node_ids(long long) --> void", pybind11::arg("increment")); + cl.def("increment_node_ids", (void (bdsg::GraphProxy>::*)(long)) &bdsg::GraphProxy >::increment_node_ids, "C++: bdsg::GraphProxy >::increment_node_ids(long) --> void", pybind11::arg("increment")); + cl.def("reassign_node_ids", (void (bdsg::GraphProxy>::*)(const class std::function &)) &bdsg::GraphProxy >::reassign_node_ids, "C++: bdsg::GraphProxy >::reassign_node_ids(const class std::function &) --> void", pybind11::arg("get_new_id")); + cl.def("destroy_path", (void (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &)) &bdsg::GraphProxy >::destroy_path, "C++: bdsg::GraphProxy >::destroy_path(const struct handlegraph::path_handle_t &) --> void", pybind11::arg("path")); + cl.def("destroy_paths", (void (bdsg::GraphProxy>::*)(const class std::vector &)) &bdsg::GraphProxy >::destroy_paths, "C++: bdsg::GraphProxy >::destroy_paths(const class std::vector &) --> void", pybind11::arg("paths")); + cl.def("create_path_handle", [](bdsg::GraphProxy> &o, const std::string & a0) -> handlegraph::path_handle_t { return o.create_path_handle(a0); }, "", pybind11::arg("name")); + cl.def("create_path_handle", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const std::string &, bool)) &bdsg::GraphProxy >::create_path_handle, "C++: bdsg::GraphProxy >::create_path_handle(const std::string &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("name"), pybind11::arg("is_circular")); + cl.def("append_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::append_step, "C++: bdsg::GraphProxy >::append_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_append")); + cl.def("prepend_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::prepend_step, "C++: bdsg::GraphProxy >::prepend_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_prepend")); + cl.def("rewrite_segment", (struct std::pair (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &)) &bdsg::GraphProxy >::rewrite_segment, "C++: bdsg::GraphProxy >::rewrite_segment(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &) --> struct std::pair", pybind11::arg("segment_begin"), pybind11::arg("segment_end"), pybind11::arg("new_segment")); + cl.def("set_circularity", (void (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, bool)) &bdsg::GraphProxy >::set_circularity, "C++: bdsg::GraphProxy >::set_circularity(const struct handlegraph::path_handle_t &, bool) --> void", pybind11::arg("path"), pybind11::arg("circular")); + cl.def("destroy_handle", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::destroy_handle, "C++: bdsg::GraphProxy >::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); + cl.def("destroy_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::destroy_edge, "C++: bdsg::GraphProxy >::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); + cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::GraphProxy >::truncate_handle, "C++: bdsg::GraphProxy >::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); + cl.def("clear", (void (bdsg::GraphProxy>::*)()) &bdsg::GraphProxy >::clear, "C++: bdsg::GraphProxy >::clear() --> void"); + cl.def("create_path", [](bdsg::GraphProxy> &o, const enum handlegraph::PathSense & a0, const std::string & a1, const std::string & a2, const unsigned long & a3, const unsigned long & a4, const struct std::pair & a5) -> handlegraph::path_handle_t { return o.create_path(a0, a1, a2, a3, a4, a5); }, "", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange")); + cl.def("create_path", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool)) &bdsg::GraphProxy >::create_path, "C++: bdsg::GraphProxy >::create_path(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange"), pybind11::arg("is_circular")); + cl.def("get_magic_number", (unsigned int (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_magic_number, "C++: bdsg::GraphProxy >::get_magic_number() const --> unsigned int"); + cl.def("deserialize", (void (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy >::deserialize, "C++: bdsg::GraphProxy >::deserialize(const std::string &) --> void", pybind11::arg("filename")); + cl.def("serialize", (void (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy >::serialize, "C++: bdsg::GraphProxy >::serialize(const std::string &) --> void", pybind11::arg("filename")); + cl.def("assign", (struct bdsg::GraphProxy > & (bdsg::GraphProxy>::*)(const struct bdsg::GraphProxy > &)) &bdsg::GraphProxy >::operator=, "C++: bdsg::GraphProxy >::operator=(const struct bdsg::GraphProxy > &) --> struct bdsg::GraphProxy > &", pybind11::return_value_policy::automatic, pybind11::arg("")); cl.def("assign", (class handlegraph::MutablePathDeletableHandleGraph & (handlegraph::MutablePathDeletableHandleGraph::*)(const class handlegraph::MutablePathDeletableHandleGraph &)) &handlegraph::MutablePathDeletableHandleGraph::operator=, "C++: handlegraph::MutablePathDeletableHandleGraph::operator=(const class handlegraph::MutablePathDeletableHandleGraph &) --> class handlegraph::MutablePathDeletableHandleGraph &", pybind11::return_value_policy::automatic, pybind11::arg("")); cl.def("assign", (class handlegraph::SerializableHandleGraph & (handlegraph::SerializableHandleGraph::*)(const class handlegraph::SerializableHandleGraph &)) &handlegraph::SerializableHandleGraph::operator=, "C++: handlegraph::SerializableHandleGraph::operator=(const class handlegraph::SerializableHandleGraph &) --> class handlegraph::SerializableHandleGraph &", pybind11::return_value_policy::automatic, pybind11::arg("")); } diff --git a/bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp b/bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp index 469f7fa1..caa912d0 100644 --- a/bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp +++ b/bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp @@ -9,12 +9,12 @@ #include #include #include +#include #include #include #include // __str__ #include #include -#include #include #include @@ -39,79 +39,80 @@ void bind_bdsg_graph_proxy_1(std::function< pybind11::module &(std::string const { { // bdsg::GraphProxy file:bdsg/graph_proxy.hpp line:60 pybind11::class_>, std::shared_ptr>>, handlegraph::MutablePathDeletableHandleGraph, handlegraph::SerializableHandleGraph> cl(M("bdsg"), "GraphProxy_bdsg_BasePackedGraph_bdsg_MappedBackend_t", ""); - cl.def("has_node", (bool (bdsg::GraphProxy>::*)(long long) const) &bdsg::GraphProxy>::has_node, "C++: bdsg::GraphProxy>::has_node(long long) const --> bool", pybind11::arg("node_id")); + cl.def("has_node", (bool (bdsg::GraphProxy>::*)(long long) const) &bdsg::GraphProxy >::has_node, "C++: bdsg::GraphProxy >::has_node(long long) const --> bool", pybind11::arg("node_id")); cl.def("get_handle", [](bdsg::GraphProxy> const &o, const long long & a0) -> handlegraph::handle_t { return o.get_handle(a0); }, "", pybind11::arg("node_id")); - cl.def("get_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const long long &, bool) const) &bdsg::GraphProxy>::get_handle, "C++: bdsg::GraphProxy>::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); - cl.def("get_id", (long long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_id, "C++: bdsg::GraphProxy>::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); - cl.def("get_is_reverse", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_is_reverse, "C++: bdsg::GraphProxy>::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); - cl.def("flip", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::flip, "C++: bdsg::GraphProxy>::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); - cl.def("get_length", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_length, "C++: bdsg::GraphProxy>::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_sequence", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_sequence, "C++: bdsg::GraphProxy>::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_node_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_node_count, "C++: bdsg::GraphProxy>::get_node_count() const --> unsigned long"); - cl.def("min_node_id", (long long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::min_node_id, "C++: bdsg::GraphProxy>::min_node_id() const --> long long"); - cl.def("max_node_id", (long long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::max_node_id, "C++: bdsg::GraphProxy>::max_node_id() const --> long long"); - cl.def("get_degree", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::GraphProxy>::get_degree, "C++: bdsg::GraphProxy>::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); - cl.def("has_edge", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::has_edge, "C++: bdsg::GraphProxy>::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); - cl.def("get_edge_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_edge_count, "C++: bdsg::GraphProxy>::get_edge_count() const --> unsigned long"); - cl.def("get_total_length", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_total_length, "C++: bdsg::GraphProxy>::get_total_length() const --> unsigned long"); - cl.def("get_base", (char (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::GraphProxy>::get_base, "C++: bdsg::GraphProxy>::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); - cl.def("get_subsequence", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::GraphProxy>::get_subsequence, "C++: bdsg::GraphProxy>::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); - cl.def("get_path_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_path_count, "C++: bdsg::GraphProxy>::get_path_count() const --> unsigned long"); - cl.def("has_path", (bool (bdsg::GraphProxy>::*)(const std::string &) const) &bdsg::GraphProxy>::has_path, "C++: bdsg::GraphProxy>::has_path(const std::string &) const --> bool", pybind11::arg("path_name")); - cl.def("get_path_handle", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const std::string &) const) &bdsg::GraphProxy>::get_path_handle, "C++: bdsg::GraphProxy>::get_path_handle(const std::string &) const --> struct handlegraph::path_handle_t", pybind11::arg("path_name")); - cl.def("get_path_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_path_name, "C++: bdsg::GraphProxy>::get_path_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("path_handle")); - cl.def("get_is_circular", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_is_circular, "C++: bdsg::GraphProxy>::get_is_circular(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); - cl.def("get_step_count", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_step_count, "C++: bdsg::GraphProxy>::get_step_count(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); - cl.def("get_step_count", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy>::get_step_count, "C++: bdsg::GraphProxy>::get_step_count(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_handle_of_step", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::get_handle_of_step, "C++: bdsg::GraphProxy>::get_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("step_handle")); - cl.def("get_path_handle_of_step", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::get_path_handle_of_step, "C++: bdsg::GraphProxy>::get_path_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::path_handle_t", pybind11::arg("step_handle")); - cl.def("path_begin", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::path_begin, "C++: bdsg::GraphProxy>::path_begin(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("path_end", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::path_end, "C++: bdsg::GraphProxy>::path_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("path_back", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::path_back, "C++: bdsg::GraphProxy>::path_back(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("path_front_end", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::path_front_end, "C++: bdsg::GraphProxy>::path_front_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("has_next_step", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::has_next_step, "C++: bdsg::GraphProxy>::has_next_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); - cl.def("has_previous_step", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::has_previous_step, "C++: bdsg::GraphProxy>::has_previous_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); - cl.def("get_next_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::get_next_step, "C++: bdsg::GraphProxy>::get_next_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); - cl.def("get_previous_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy>::get_previous_step, "C++: bdsg::GraphProxy>::get_previous_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); + cl.def("get_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const long long &, bool) const) &bdsg::GraphProxy >::get_handle, "C++: bdsg::GraphProxy >::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); + cl.def("get_id", (long long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_id, "C++: bdsg::GraphProxy >::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); + cl.def("get_is_reverse", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_is_reverse, "C++: bdsg::GraphProxy >::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); + cl.def("flip", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::flip, "C++: bdsg::GraphProxy >::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("get_length", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_length, "C++: bdsg::GraphProxy >::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_sequence", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_sequence, "C++: bdsg::GraphProxy >::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_node_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_node_count, "C++: bdsg::GraphProxy >::get_node_count() const --> unsigned long"); + cl.def("min_node_id", (long long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::min_node_id, "C++: bdsg::GraphProxy >::min_node_id() const --> long long"); + cl.def("max_node_id", (long long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::max_node_id, "C++: bdsg::GraphProxy >::max_node_id() const --> long long"); + cl.def("get_degree", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::GraphProxy >::get_degree, "C++: bdsg::GraphProxy >::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); + cl.def("has_edge", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::has_edge, "C++: bdsg::GraphProxy >::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); + cl.def("get_edge_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_edge_count, "C++: bdsg::GraphProxy >::get_edge_count() const --> unsigned long"); + cl.def("get_total_length", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_total_length, "C++: bdsg::GraphProxy >::get_total_length() const --> unsigned long"); + cl.def("get_base", (char (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::GraphProxy >::get_base, "C++: bdsg::GraphProxy >::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); + cl.def("get_subsequence", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::GraphProxy >::get_subsequence, "C++: bdsg::GraphProxy >::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); + cl.def("get_path_count", (unsigned long (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_path_count, "C++: bdsg::GraphProxy >::get_path_count() const --> unsigned long"); + cl.def("has_path", (bool (bdsg::GraphProxy>::*)(const std::string &) const) &bdsg::GraphProxy >::has_path, "C++: bdsg::GraphProxy >::has_path(const std::string &) const --> bool", pybind11::arg("path_name")); + cl.def("get_path_handle", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const std::string &) const) &bdsg::GraphProxy >::get_path_handle, "C++: bdsg::GraphProxy >::get_path_handle(const std::string &) const --> struct handlegraph::path_handle_t", pybind11::arg("path_name")); + cl.def("get_path_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_path_name, "C++: bdsg::GraphProxy >::get_path_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("path_handle")); + cl.def("get_is_circular", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_is_circular, "C++: bdsg::GraphProxy >::get_is_circular(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); + cl.def("get_step_count", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_step_count, "C++: bdsg::GraphProxy >::get_step_count(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); + cl.def("get_step_count", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &) const) &bdsg::GraphProxy >::get_step_count, "C++: bdsg::GraphProxy >::get_step_count(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_handle_of_step", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::get_handle_of_step, "C++: bdsg::GraphProxy >::get_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("step_handle")); + cl.def("get_path_handle_of_step", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::get_path_handle_of_step, "C++: bdsg::GraphProxy >::get_path_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::path_handle_t", pybind11::arg("step_handle")); + cl.def("path_begin", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::path_begin, "C++: bdsg::GraphProxy >::path_begin(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_end", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::path_end, "C++: bdsg::GraphProxy >::path_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_back", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::path_back, "C++: bdsg::GraphProxy >::path_back(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_front_end", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::path_front_end, "C++: bdsg::GraphProxy >::path_front_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("has_next_step", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::has_next_step, "C++: bdsg::GraphProxy >::has_next_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); + cl.def("has_previous_step", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::has_previous_step, "C++: bdsg::GraphProxy >::has_previous_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); + cl.def("get_next_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::get_next_step, "C++: bdsg::GraphProxy >::get_next_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); + cl.def("get_previous_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &) const) &bdsg::GraphProxy >::get_previous_step, "C++: bdsg::GraphProxy >::get_previous_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); cl.def("steps_of_handle", [](bdsg::GraphProxy> const &o, const struct handlegraph::handle_t & a0) -> std::vector { return o.steps_of_handle(a0); }, "", pybind11::arg("handle")); - cl.def("steps_of_handle", (class std::vector (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::GraphProxy>::steps_of_handle, "C++: bdsg::GraphProxy>::steps_of_handle(const struct handlegraph::handle_t &, bool) const --> class std::vector", pybind11::arg("handle"), pybind11::arg("match_orientation")); - cl.def("is_empty", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::is_empty, "C++: bdsg::GraphProxy>::is_empty(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); - cl.def("get_sense", (enum handlegraph::PathSense (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_sense, "C++: bdsg::GraphProxy>::get_sense(const struct handlegraph::path_handle_t &) const --> enum handlegraph::PathSense", pybind11::arg("handle")); - cl.def("get_sample_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_sample_name, "C++: bdsg::GraphProxy>::get_sample_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_locus_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_locus_name, "C++: bdsg::GraphProxy>::get_locus_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_haplotype", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_haplotype, "C++: bdsg::GraphProxy>::get_haplotype(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_phase_block", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_phase_block, "C++: bdsg::GraphProxy>::get_phase_block(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_subrange", (struct std::pair (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy>::get_subrange, "C++: bdsg::GraphProxy>::get_subrange(const struct handlegraph::path_handle_t &) const --> struct std::pair", pybind11::arg("handle")); - cl.def("create_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy>::create_handle, "C++: bdsg::GraphProxy>::create_handle(const std::string &) --> struct handlegraph::handle_t", pybind11::arg("sequence")); - cl.def("create_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const std::string &, const long long &)) &bdsg::GraphProxy>::create_handle, "C++: bdsg::GraphProxy>::create_handle(const std::string &, const long long &) --> struct handlegraph::handle_t", pybind11::arg("sequence"), pybind11::arg("id")); - cl.def("create_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::create_edge, "C++: bdsg::GraphProxy>::create_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); - cl.def("apply_orientation", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::apply_orientation, "C++: bdsg::GraphProxy>::apply_orientation(const struct handlegraph::handle_t &) --> struct handlegraph::handle_t", pybind11::arg("handle")); - cl.def("divide_handle", (class std::vector (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const class std::vector &)) &bdsg::GraphProxy>::divide_handle, "C++: bdsg::GraphProxy>::divide_handle(const struct handlegraph::handle_t &, const class std::vector &) --> class std::vector", pybind11::arg("handle"), pybind11::arg("offsets")); + cl.def("steps_of_handle", (class std::vector (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::GraphProxy >::steps_of_handle, "C++: bdsg::GraphProxy >::steps_of_handle(const struct handlegraph::handle_t &, bool) const --> class std::vector", pybind11::arg("handle"), pybind11::arg("match_orientation")); + cl.def("is_empty", (bool (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::is_empty, "C++: bdsg::GraphProxy >::is_empty(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); + cl.def("get_sense", (enum handlegraph::PathSense (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_sense, "C++: bdsg::GraphProxy >::get_sense(const struct handlegraph::path_handle_t &) const --> enum handlegraph::PathSense", pybind11::arg("handle")); + cl.def("get_sample_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_sample_name, "C++: bdsg::GraphProxy >::get_sample_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_locus_name", (std::string (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_locus_name, "C++: bdsg::GraphProxy >::get_locus_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_haplotype", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_haplotype, "C++: bdsg::GraphProxy >::get_haplotype(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_phase_block", (unsigned long (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_phase_block, "C++: bdsg::GraphProxy >::get_phase_block(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_subrange", (struct std::pair (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &) const) &bdsg::GraphProxy >::get_subrange, "C++: bdsg::GraphProxy >::get_subrange(const struct handlegraph::path_handle_t &) const --> struct std::pair", pybind11::arg("handle")); + cl.def("create_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy >::create_handle, "C++: bdsg::GraphProxy >::create_handle(const std::string &) --> struct handlegraph::handle_t", pybind11::arg("sequence")); + cl.def("create_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const std::string &, const long long &)) &bdsg::GraphProxy >::create_handle, "C++: bdsg::GraphProxy >::create_handle(const std::string &, const long long &) --> struct handlegraph::handle_t", pybind11::arg("sequence"), pybind11::arg("id")); + cl.def("create_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::create_edge, "C++: bdsg::GraphProxy >::create_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); + cl.def("apply_orientation", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::apply_orientation, "C++: bdsg::GraphProxy >::apply_orientation(const struct handlegraph::handle_t &) --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("divide_handle", (class std::vector (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const class std::vector &)) &bdsg::GraphProxy >::divide_handle, "C++: bdsg::GraphProxy >::divide_handle(const struct handlegraph::handle_t &, const class std::vector &) --> class std::vector", pybind11::arg("handle"), pybind11::arg("offsets")); cl.def("optimize", [](bdsg::GraphProxy> &o) -> void { return o.optimize(); }, ""); - cl.def("optimize", (void (bdsg::GraphProxy>::*)(bool)) &bdsg::GraphProxy>::optimize, "C++: bdsg::GraphProxy>::optimize(bool) --> void", pybind11::arg("allow_id_reassignment")); + cl.def("optimize", (void (bdsg::GraphProxy>::*)(bool)) &bdsg::GraphProxy >::optimize, "C++: bdsg::GraphProxy >::optimize(bool) --> void", pybind11::arg("allow_id_reassignment")); cl.def("apply_ordering", [](bdsg::GraphProxy> &o, const class std::vector & a0) -> bool { return o.apply_ordering(a0); }, "", pybind11::arg("order")); - cl.def("apply_ordering", (bool (bdsg::GraphProxy>::*)(const class std::vector &, bool)) &bdsg::GraphProxy>::apply_ordering, "C++: bdsg::GraphProxy>::apply_ordering(const class std::vector &, bool) --> bool", pybind11::arg("order"), pybind11::arg("compact_ids")); - cl.def("set_id_increment", (void (bdsg::GraphProxy>::*)(const long long &)) &bdsg::GraphProxy>::set_id_increment, "C++: bdsg::GraphProxy>::set_id_increment(const long long &) --> void", pybind11::arg("min_id")); - cl.def("increment_node_ids", (void (bdsg::GraphProxy>::*)(long long)) &bdsg::GraphProxy>::increment_node_ids, "C++: bdsg::GraphProxy>::increment_node_ids(long long) --> void", pybind11::arg("increment")); - cl.def("increment_node_ids", (void (bdsg::GraphProxy>::*)(long)) &bdsg::GraphProxy>::increment_node_ids, "C++: bdsg::GraphProxy>::increment_node_ids(long) --> void", pybind11::arg("increment")); - cl.def("reassign_node_ids", (void (bdsg::GraphProxy>::*)(const class std::function &)) &bdsg::GraphProxy>::reassign_node_ids, "C++: bdsg::GraphProxy>::reassign_node_ids(const class std::function &) --> void", pybind11::arg("get_new_id")); - cl.def("destroy_path", (void (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &)) &bdsg::GraphProxy>::destroy_path, "C++: bdsg::GraphProxy>::destroy_path(const struct handlegraph::path_handle_t &) --> void", pybind11::arg("path")); + cl.def("apply_ordering", (bool (bdsg::GraphProxy>::*)(const class std::vector &, bool)) &bdsg::GraphProxy >::apply_ordering, "C++: bdsg::GraphProxy >::apply_ordering(const class std::vector &, bool) --> bool", pybind11::arg("order"), pybind11::arg("compact_ids")); + cl.def("set_id_increment", (void (bdsg::GraphProxy>::*)(const long long &)) &bdsg::GraphProxy >::set_id_increment, "C++: bdsg::GraphProxy >::set_id_increment(const long long &) --> void", pybind11::arg("min_id")); + cl.def("increment_node_ids", (void (bdsg::GraphProxy>::*)(long long)) &bdsg::GraphProxy >::increment_node_ids, "C++: bdsg::GraphProxy >::increment_node_ids(long long) --> void", pybind11::arg("increment")); + cl.def("increment_node_ids", (void (bdsg::GraphProxy>::*)(long)) &bdsg::GraphProxy >::increment_node_ids, "C++: bdsg::GraphProxy >::increment_node_ids(long) --> void", pybind11::arg("increment")); + cl.def("reassign_node_ids", (void (bdsg::GraphProxy>::*)(const class std::function &)) &bdsg::GraphProxy >::reassign_node_ids, "C++: bdsg::GraphProxy >::reassign_node_ids(const class std::function &) --> void", pybind11::arg("get_new_id")); + cl.def("destroy_path", (void (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &)) &bdsg::GraphProxy >::destroy_path, "C++: bdsg::GraphProxy >::destroy_path(const struct handlegraph::path_handle_t &) --> void", pybind11::arg("path")); + cl.def("destroy_paths", (void (bdsg::GraphProxy>::*)(const class std::vector &)) &bdsg::GraphProxy >::destroy_paths, "C++: bdsg::GraphProxy >::destroy_paths(const class std::vector &) --> void", pybind11::arg("paths")); cl.def("create_path_handle", [](bdsg::GraphProxy> &o, const std::string & a0) -> handlegraph::path_handle_t { return o.create_path_handle(a0); }, "", pybind11::arg("name")); - cl.def("create_path_handle", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const std::string &, bool)) &bdsg::GraphProxy>::create_path_handle, "C++: bdsg::GraphProxy>::create_path_handle(const std::string &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("name"), pybind11::arg("is_circular")); - cl.def("append_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::append_step, "C++: bdsg::GraphProxy>::append_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_append")); - cl.def("prepend_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::prepend_step, "C++: bdsg::GraphProxy>::prepend_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_prepend")); - cl.def("rewrite_segment", (struct std::pair (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &)) &bdsg::GraphProxy>::rewrite_segment, "C++: bdsg::GraphProxy>::rewrite_segment(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &) --> struct std::pair", pybind11::arg("segment_begin"), pybind11::arg("segment_end"), pybind11::arg("new_segment")); - cl.def("set_circularity", (void (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, bool)) &bdsg::GraphProxy>::set_circularity, "C++: bdsg::GraphProxy>::set_circularity(const struct handlegraph::path_handle_t &, bool) --> void", pybind11::arg("path"), pybind11::arg("circular")); - cl.def("destroy_handle", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::destroy_handle, "C++: bdsg::GraphProxy>::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); - cl.def("destroy_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy>::destroy_edge, "C++: bdsg::GraphProxy>::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); - cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::GraphProxy>::truncate_handle, "C++: bdsg::GraphProxy>::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); - cl.def("clear", (void (bdsg::GraphProxy>::*)()) &bdsg::GraphProxy>::clear, "C++: bdsg::GraphProxy>::clear() --> void"); + cl.def("create_path_handle", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const std::string &, bool)) &bdsg::GraphProxy >::create_path_handle, "C++: bdsg::GraphProxy >::create_path_handle(const std::string &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("name"), pybind11::arg("is_circular")); + cl.def("append_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::append_step, "C++: bdsg::GraphProxy >::append_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_append")); + cl.def("prepend_step", (struct handlegraph::step_handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::prepend_step, "C++: bdsg::GraphProxy >::prepend_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_prepend")); + cl.def("rewrite_segment", (struct std::pair (bdsg::GraphProxy>::*)(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &)) &bdsg::GraphProxy >::rewrite_segment, "C++: bdsg::GraphProxy >::rewrite_segment(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &) --> struct std::pair", pybind11::arg("segment_begin"), pybind11::arg("segment_end"), pybind11::arg("new_segment")); + cl.def("set_circularity", (void (bdsg::GraphProxy>::*)(const struct handlegraph::path_handle_t &, bool)) &bdsg::GraphProxy >::set_circularity, "C++: bdsg::GraphProxy >::set_circularity(const struct handlegraph::path_handle_t &, bool) --> void", pybind11::arg("path"), pybind11::arg("circular")); + cl.def("destroy_handle", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::destroy_handle, "C++: bdsg::GraphProxy >::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); + cl.def("destroy_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::destroy_edge, "C++: bdsg::GraphProxy >::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); + cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::GraphProxy >::truncate_handle, "C++: bdsg::GraphProxy >::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); + cl.def("clear", (void (bdsg::GraphProxy>::*)()) &bdsg::GraphProxy >::clear, "C++: bdsg::GraphProxy >::clear() --> void"); cl.def("create_path", [](bdsg::GraphProxy> &o, const enum handlegraph::PathSense & a0, const std::string & a1, const std::string & a2, const unsigned long & a3, const unsigned long & a4, const struct std::pair & a5) -> handlegraph::path_handle_t { return o.create_path(a0, a1, a2, a3, a4, a5); }, "", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange")); - cl.def("create_path", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool)) &bdsg::GraphProxy>::create_path, "C++: bdsg::GraphProxy>::create_path(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange"), pybind11::arg("is_circular")); - cl.def("get_magic_number", (unsigned int (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy>::get_magic_number, "C++: bdsg::GraphProxy>::get_magic_number() const --> unsigned int"); - cl.def("deserialize", (void (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy>::deserialize, "C++: bdsg::GraphProxy>::deserialize(const std::string &) --> void", pybind11::arg("filename")); - cl.def("serialize", (void (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy>::serialize, "C++: bdsg::GraphProxy>::serialize(const std::string &) --> void", pybind11::arg("filename")); - cl.def("assign", (struct bdsg::GraphProxy > & (bdsg::GraphProxy>::*)(const struct bdsg::GraphProxy > &)) &bdsg::GraphProxy>::operator=, "C++: bdsg::GraphProxy>::operator=(const struct bdsg::GraphProxy > &) --> struct bdsg::GraphProxy > &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("create_path", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool)) &bdsg::GraphProxy >::create_path, "C++: bdsg::GraphProxy >::create_path(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange"), pybind11::arg("is_circular")); + cl.def("get_magic_number", (unsigned int (bdsg::GraphProxy>::*)() const) &bdsg::GraphProxy >::get_magic_number, "C++: bdsg::GraphProxy >::get_magic_number() const --> unsigned int"); + cl.def("deserialize", (void (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy >::deserialize, "C++: bdsg::GraphProxy >::deserialize(const std::string &) --> void", pybind11::arg("filename")); + cl.def("serialize", (void (bdsg::GraphProxy>::*)(const std::string &)) &bdsg::GraphProxy >::serialize, "C++: bdsg::GraphProxy >::serialize(const std::string &) --> void", pybind11::arg("filename")); + cl.def("assign", (struct bdsg::GraphProxy > & (bdsg::GraphProxy>::*)(const struct bdsg::GraphProxy > &)) &bdsg::GraphProxy >::operator=, "C++: bdsg::GraphProxy >::operator=(const struct bdsg::GraphProxy > &) --> struct bdsg::GraphProxy > &", pybind11::return_value_policy::automatic, pybind11::arg("")); cl.def("assign", (class handlegraph::MutablePathDeletableHandleGraph & (handlegraph::MutablePathDeletableHandleGraph::*)(const class handlegraph::MutablePathDeletableHandleGraph &)) &handlegraph::MutablePathDeletableHandleGraph::operator=, "C++: handlegraph::MutablePathDeletableHandleGraph::operator=(const class handlegraph::MutablePathDeletableHandleGraph &) --> class handlegraph::MutablePathDeletableHandleGraph &", pybind11::return_value_policy::automatic, pybind11::arg("")); cl.def("assign", (class handlegraph::SerializableHandleGraph & (handlegraph::SerializableHandleGraph::*)(const class handlegraph::SerializableHandleGraph &)) &handlegraph::SerializableHandleGraph::operator=, "C++: handlegraph::SerializableHandleGraph::operator=(const class handlegraph::SerializableHandleGraph &) --> class handlegraph::SerializableHandleGraph &", pybind11::return_value_policy::automatic, pybind11::arg("")); } diff --git a/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp b/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp index 93ebdd67..95becc5a 100644 --- a/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp +++ b/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp @@ -4,12 +4,12 @@ #include #include #include +#include #include #include #include // __str__ #include #include -#include #include #include #include @@ -38,85 +38,86 @@ void bind_bdsg_internal_base_packed_graph(std::function< pybind11::module &(std: pybind11::class_, std::shared_ptr>> cl(M("bdsg"), "BasePackedGraph_bdsg_STLBackend_t", ""); cl.def( pybind11::init( [](){ return new bdsg::BasePackedGraph(); } ) ); cl.def( pybind11::init( [](bdsg::BasePackedGraph const &o){ return new bdsg::BasePackedGraph(o); } ) ); - cl.def("has_node", (bool (bdsg::BasePackedGraph::*)(long long) const) &bdsg::BasePackedGraph<>::has_node, "C++: bdsg::BasePackedGraph<>::has_node(long long) const --> bool", pybind11::arg("node_id")); + cl.def("has_node", (bool (bdsg::BasePackedGraph::*)(long long) const) &bdsg::BasePackedGraph::has_node, "C++: bdsg::BasePackedGraph::has_node(long long) const --> bool", pybind11::arg("node_id")); cl.def("get_handle", [](bdsg::BasePackedGraph const &o, const long long & a0) -> handlegraph::handle_t { return o.get_handle(a0); }, "", pybind11::arg("node_id")); - cl.def("get_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const long long &, bool) const) &bdsg::BasePackedGraph<>::get_handle, "C++: bdsg::BasePackedGraph<>::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); - cl.def("get_id", (long long (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph<>::get_id, "C++: bdsg::BasePackedGraph<>::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); - cl.def("get_is_reverse", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph<>::get_is_reverse, "C++: bdsg::BasePackedGraph<>::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); - cl.def("flip", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph<>::flip, "C++: bdsg::BasePackedGraph<>::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); - cl.def("get_length", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph<>::get_length, "C++: bdsg::BasePackedGraph<>::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_sequence", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph<>::get_sequence, "C++: bdsg::BasePackedGraph<>::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("follow_edges", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, bool, const class std::function &) const) &bdsg::BasePackedGraph<>::follow_edges, "C++: bdsg::BasePackedGraph<>::follow_edges(const struct handlegraph::handle_t &, bool, const class std::function &) const --> bool", pybind11::arg("handle"), pybind11::arg("go_left"), pybind11::arg("iteratee")); + cl.def("get_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const long long &, bool) const) &bdsg::BasePackedGraph::get_handle, "C++: bdsg::BasePackedGraph::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); + cl.def("get_id", (long long (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph::get_id, "C++: bdsg::BasePackedGraph::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); + cl.def("get_is_reverse", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph::get_is_reverse, "C++: bdsg::BasePackedGraph::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); + cl.def("flip", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph::flip, "C++: bdsg::BasePackedGraph::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("get_length", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph::get_length, "C++: bdsg::BasePackedGraph::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_sequence", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph::get_sequence, "C++: bdsg::BasePackedGraph::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("follow_edges", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, bool, const class std::function &) const) &bdsg::BasePackedGraph::follow_edges, "C++: bdsg::BasePackedGraph::follow_edges(const struct handlegraph::handle_t &, bool, const class std::function &) const --> bool", pybind11::arg("handle"), pybind11::arg("go_left"), pybind11::arg("iteratee")); cl.def("for_each_handle", [](bdsg::BasePackedGraph const &o, const class std::function & a0) -> bool { return o.for_each_handle(a0); }, "", pybind11::arg("iteratee")); - cl.def("for_each_handle", (bool (bdsg::BasePackedGraph::*)(const class std::function &, bool) const) &bdsg::BasePackedGraph<>::for_each_handle, "C++: bdsg::BasePackedGraph<>::for_each_handle(const class std::function &, bool) const --> bool", pybind11::arg("iteratee"), pybind11::arg("parallel")); - cl.def("get_edge_count", (unsigned long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph<>::get_edge_count, "C++: bdsg::BasePackedGraph<>::get_edge_count() const --> unsigned long"); - cl.def("get_total_length", (unsigned long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph<>::get_total_length, "C++: bdsg::BasePackedGraph<>::get_total_length() const --> unsigned long"); - cl.def("get_base", (char (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::BasePackedGraph<>::get_base, "C++: bdsg::BasePackedGraph<>::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); - cl.def("get_subsequence", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::BasePackedGraph<>::get_subsequence, "C++: bdsg::BasePackedGraph<>::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); - cl.def("forward", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph<>::forward, "C++: bdsg::BasePackedGraph<>::forward(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); - cl.def("get_node_count", (unsigned long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph<>::get_node_count, "C++: bdsg::BasePackedGraph<>::get_node_count() const --> unsigned long"); - cl.def("min_node_id", (long long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph<>::min_node_id, "C++: bdsg::BasePackedGraph<>::min_node_id() const --> long long"); - cl.def("max_node_id", (long long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph<>::max_node_id, "C++: bdsg::BasePackedGraph<>::max_node_id() const --> long long"); - cl.def("get_degree", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::BasePackedGraph<>::get_degree, "C++: bdsg::BasePackedGraph<>::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); - cl.def("has_edge", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph<>::has_edge, "C++: bdsg::BasePackedGraph<>::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); - cl.def("create_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const std::string &)) &bdsg::BasePackedGraph<>::create_handle, "C++: bdsg::BasePackedGraph<>::create_handle(const std::string &) --> struct handlegraph::handle_t", pybind11::arg("sequence")); - cl.def("create_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const std::string &, const long long &)) &bdsg::BasePackedGraph<>::create_handle, "C++: bdsg::BasePackedGraph<>::create_handle(const std::string &, const long long &) --> struct handlegraph::handle_t", pybind11::arg("sequence"), pybind11::arg("id")); - cl.def("destroy_handle", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph<>::destroy_handle, "C++: bdsg::BasePackedGraph<>::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); - cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::BasePackedGraph<>::truncate_handle, "C++: bdsg::BasePackedGraph<>::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); - cl.def("create_edge", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph<>::create_edge, "C++: bdsg::BasePackedGraph<>::create_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); - cl.def("destroy_edge", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph<>::destroy_edge, "C++: bdsg::BasePackedGraph<>::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); - cl.def("clear", (void (bdsg::BasePackedGraph::*)()) &bdsg::BasePackedGraph<>::clear, "C++: bdsg::BasePackedGraph<>::clear() --> void"); - cl.def("apply_orientation", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph<>::apply_orientation, "C++: bdsg::BasePackedGraph<>::apply_orientation(const struct handlegraph::handle_t &) --> struct handlegraph::handle_t", pybind11::arg("handle")); - cl.def("divide_handle", (class std::vector (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const class std::vector &)) &bdsg::BasePackedGraph<>::divide_handle, "C++: bdsg::BasePackedGraph<>::divide_handle(const struct handlegraph::handle_t &, const class std::vector &) --> class std::vector", pybind11::arg("handle"), pybind11::arg("offsets")); - cl.def("divide_handle", (struct std::pair (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, unsigned long)) &bdsg::BasePackedGraph<>::divide_handle, "C++: bdsg::BasePackedGraph<>::divide_handle(const struct handlegraph::handle_t &, unsigned long) --> struct std::pair", pybind11::arg("handle"), pybind11::arg("offset")); + cl.def("for_each_handle", (bool (bdsg::BasePackedGraph::*)(const class std::function &, bool) const) &bdsg::BasePackedGraph::for_each_handle, "C++: bdsg::BasePackedGraph::for_each_handle(const class std::function &, bool) const --> bool", pybind11::arg("iteratee"), pybind11::arg("parallel")); + cl.def("get_edge_count", (unsigned long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph::get_edge_count, "C++: bdsg::BasePackedGraph::get_edge_count() const --> unsigned long"); + cl.def("get_total_length", (unsigned long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph::get_total_length, "C++: bdsg::BasePackedGraph::get_total_length() const --> unsigned long"); + cl.def("get_base", (char (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::BasePackedGraph::get_base, "C++: bdsg::BasePackedGraph::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); + cl.def("get_subsequence", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::BasePackedGraph::get_subsequence, "C++: bdsg::BasePackedGraph::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); + cl.def("forward", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph::forward, "C++: bdsg::BasePackedGraph::forward(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("get_node_count", (unsigned long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph::get_node_count, "C++: bdsg::BasePackedGraph::get_node_count() const --> unsigned long"); + cl.def("min_node_id", (long long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph::min_node_id, "C++: bdsg::BasePackedGraph::min_node_id() const --> long long"); + cl.def("max_node_id", (long long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph::max_node_id, "C++: bdsg::BasePackedGraph::max_node_id() const --> long long"); + cl.def("get_degree", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::BasePackedGraph::get_degree, "C++: bdsg::BasePackedGraph::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); + cl.def("has_edge", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph::has_edge, "C++: bdsg::BasePackedGraph::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); + cl.def("create_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const std::string &)) &bdsg::BasePackedGraph::create_handle, "C++: bdsg::BasePackedGraph::create_handle(const std::string &) --> struct handlegraph::handle_t", pybind11::arg("sequence")); + cl.def("create_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const std::string &, const long long &)) &bdsg::BasePackedGraph::create_handle, "C++: bdsg::BasePackedGraph::create_handle(const std::string &, const long long &) --> struct handlegraph::handle_t", pybind11::arg("sequence"), pybind11::arg("id")); + cl.def("destroy_handle", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph::destroy_handle, "C++: bdsg::BasePackedGraph::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); + cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::BasePackedGraph::truncate_handle, "C++: bdsg::BasePackedGraph::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); + cl.def("create_edge", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph::create_edge, "C++: bdsg::BasePackedGraph::create_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); + cl.def("destroy_edge", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph::destroy_edge, "C++: bdsg::BasePackedGraph::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); + cl.def("clear", (void (bdsg::BasePackedGraph::*)()) &bdsg::BasePackedGraph::clear, "C++: bdsg::BasePackedGraph::clear() --> void"); + cl.def("apply_orientation", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph::apply_orientation, "C++: bdsg::BasePackedGraph::apply_orientation(const struct handlegraph::handle_t &) --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("divide_handle", (class std::vector (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const class std::vector &)) &bdsg::BasePackedGraph::divide_handle, "C++: bdsg::BasePackedGraph::divide_handle(const struct handlegraph::handle_t &, const class std::vector &) --> class std::vector", pybind11::arg("handle"), pybind11::arg("offsets")); + cl.def("divide_handle", (struct std::pair (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, unsigned long)) &bdsg::BasePackedGraph::divide_handle, "C++: bdsg::BasePackedGraph::divide_handle(const struct handlegraph::handle_t &, unsigned long) --> struct std::pair", pybind11::arg("handle"), pybind11::arg("offset")); cl.def("optimize", [](bdsg::BasePackedGraph &o) -> void { return o.optimize(); }, ""); - cl.def("optimize", (void (bdsg::BasePackedGraph::*)(bool)) &bdsg::BasePackedGraph<>::optimize, "C++: bdsg::BasePackedGraph<>::optimize(bool) --> void", pybind11::arg("allow_id_reassignment")); + cl.def("optimize", (void (bdsg::BasePackedGraph::*)(bool)) &bdsg::BasePackedGraph::optimize, "C++: bdsg::BasePackedGraph::optimize(bool) --> void", pybind11::arg("allow_id_reassignment")); cl.def("apply_ordering", [](bdsg::BasePackedGraph &o, const class std::vector & a0) -> bool { return o.apply_ordering(a0); }, "", pybind11::arg("order")); - cl.def("apply_ordering", (bool (bdsg::BasePackedGraph::*)(const class std::vector &, bool)) &bdsg::BasePackedGraph<>::apply_ordering, "C++: bdsg::BasePackedGraph<>::apply_ordering(const class std::vector &, bool) --> bool", pybind11::arg("order"), pybind11::arg("compact_ids")); - cl.def("get_path_count", (unsigned long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph<>::get_path_count, "C++: bdsg::BasePackedGraph<>::get_path_count() const --> unsigned long"); - cl.def("has_path", (bool (bdsg::BasePackedGraph::*)(const std::string &) const) &bdsg::BasePackedGraph<>::has_path, "C++: bdsg::BasePackedGraph<>::has_path(const std::string &) const --> bool", pybind11::arg("path_name")); - cl.def("get_path_handle", (struct handlegraph::path_handle_t (bdsg::BasePackedGraph::*)(const std::string &) const) &bdsg::BasePackedGraph<>::get_path_handle, "C++: bdsg::BasePackedGraph<>::get_path_handle(const std::string &) const --> struct handlegraph::path_handle_t", pybind11::arg("path_name")); - cl.def("get_path_name", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_path_name, "C++: bdsg::BasePackedGraph<>::get_path_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("path_handle")); - cl.def("get_is_circular", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_is_circular, "C++: bdsg::BasePackedGraph<>::get_is_circular(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); - cl.def("get_step_count", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_step_count, "C++: bdsg::BasePackedGraph<>::get_step_count(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); - cl.def("get_step_count", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph<>::get_step_count, "C++: bdsg::BasePackedGraph<>::get_step_count(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_handle_of_step", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph<>::get_handle_of_step, "C++: bdsg::BasePackedGraph<>::get_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("step_handle")); - cl.def("path_begin", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::path_begin, "C++: bdsg::BasePackedGraph<>::path_begin(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("path_end", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::path_end, "C++: bdsg::BasePackedGraph<>::path_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("path_back", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::path_back, "C++: bdsg::BasePackedGraph<>::path_back(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("path_front_end", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::path_front_end, "C++: bdsg::BasePackedGraph<>::path_front_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); - cl.def("has_next_step", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph<>::has_next_step, "C++: bdsg::BasePackedGraph<>::has_next_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); - cl.def("has_previous_step", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph<>::has_previous_step, "C++: bdsg::BasePackedGraph<>::has_previous_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); - cl.def("get_next_step", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph<>::get_next_step, "C++: bdsg::BasePackedGraph<>::get_next_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); - cl.def("get_previous_step", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph<>::get_previous_step, "C++: bdsg::BasePackedGraph<>::get_previous_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); - cl.def("get_path_handle_of_step", (struct handlegraph::path_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph<>::get_path_handle_of_step, "C++: bdsg::BasePackedGraph<>::get_path_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::path_handle_t", pybind11::arg("step_handle")); - cl.def("for_each_path_handle", (bool (bdsg::BasePackedGraph::*)(const class std::function &) const) &bdsg::BasePackedGraph<>::for_each_path_handle, "C++: bdsg::BasePackedGraph<>::for_each_path_handle(const class std::function &) const --> bool", pybind11::arg("iteratee")); - cl.def("for_each_step_on_handle", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const class std::function &) const) &bdsg::BasePackedGraph<>::for_each_step_on_handle, "C++: bdsg::BasePackedGraph<>::for_each_step_on_handle(const struct handlegraph::handle_t &, const class std::function &) const --> bool", pybind11::arg("handle"), pybind11::arg("iteratee")); + cl.def("apply_ordering", (bool (bdsg::BasePackedGraph::*)(const class std::vector &, bool)) &bdsg::BasePackedGraph::apply_ordering, "C++: bdsg::BasePackedGraph::apply_ordering(const class std::vector &, bool) --> bool", pybind11::arg("order"), pybind11::arg("compact_ids")); + cl.def("get_path_count", (unsigned long (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph::get_path_count, "C++: bdsg::BasePackedGraph::get_path_count() const --> unsigned long"); + cl.def("has_path", (bool (bdsg::BasePackedGraph::*)(const std::string &) const) &bdsg::BasePackedGraph::has_path, "C++: bdsg::BasePackedGraph::has_path(const std::string &) const --> bool", pybind11::arg("path_name")); + cl.def("get_path_handle", (struct handlegraph::path_handle_t (bdsg::BasePackedGraph::*)(const std::string &) const) &bdsg::BasePackedGraph::get_path_handle, "C++: bdsg::BasePackedGraph::get_path_handle(const std::string &) const --> struct handlegraph::path_handle_t", pybind11::arg("path_name")); + cl.def("get_path_name", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::get_path_name, "C++: bdsg::BasePackedGraph::get_path_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("path_handle")); + cl.def("get_is_circular", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::get_is_circular, "C++: bdsg::BasePackedGraph::get_is_circular(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); + cl.def("get_step_count", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::get_step_count, "C++: bdsg::BasePackedGraph::get_step_count(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); + cl.def("get_step_count", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &) const) &bdsg::BasePackedGraph::get_step_count, "C++: bdsg::BasePackedGraph::get_step_count(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_handle_of_step", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph::get_handle_of_step, "C++: bdsg::BasePackedGraph::get_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("step_handle")); + cl.def("path_begin", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::path_begin, "C++: bdsg::BasePackedGraph::path_begin(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_end", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::path_end, "C++: bdsg::BasePackedGraph::path_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_back", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::path_back, "C++: bdsg::BasePackedGraph::path_back(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_front_end", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::path_front_end, "C++: bdsg::BasePackedGraph::path_front_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("has_next_step", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph::has_next_step, "C++: bdsg::BasePackedGraph::has_next_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); + cl.def("has_previous_step", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph::has_previous_step, "C++: bdsg::BasePackedGraph::has_previous_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); + cl.def("get_next_step", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph::get_next_step, "C++: bdsg::BasePackedGraph::get_next_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); + cl.def("get_previous_step", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph::get_previous_step, "C++: bdsg::BasePackedGraph::get_previous_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); + cl.def("get_path_handle_of_step", (struct handlegraph::path_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &) const) &bdsg::BasePackedGraph::get_path_handle_of_step, "C++: bdsg::BasePackedGraph::get_path_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::path_handle_t", pybind11::arg("step_handle")); + cl.def("for_each_path_handle", (bool (bdsg::BasePackedGraph::*)(const class std::function &) const) &bdsg::BasePackedGraph::for_each_path_handle, "C++: bdsg::BasePackedGraph::for_each_path_handle(const class std::function &) const --> bool", pybind11::arg("iteratee")); + cl.def("for_each_step_on_handle", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const class std::function &) const) &bdsg::BasePackedGraph::for_each_step_on_handle, "C++: bdsg::BasePackedGraph::for_each_step_on_handle(const struct handlegraph::handle_t &, const class std::function &) const --> bool", pybind11::arg("handle"), pybind11::arg("iteratee")); cl.def("steps_of_handle", [](bdsg::BasePackedGraph const &o, const struct handlegraph::handle_t & a0) -> std::vector { return o.steps_of_handle(a0); }, "", pybind11::arg("handle")); - cl.def("steps_of_handle", (class std::vector (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::BasePackedGraph<>::steps_of_handle, "C++: bdsg::BasePackedGraph<>::steps_of_handle(const struct handlegraph::handle_t &, bool) const --> class std::vector", pybind11::arg("handle"), pybind11::arg("match_orientation")); - cl.def("is_empty", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::is_empty, "C++: bdsg::BasePackedGraph<>::is_empty(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); - cl.def("destroy_path", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &)) &bdsg::BasePackedGraph<>::destroy_path, "C++: bdsg::BasePackedGraph<>::destroy_path(const struct handlegraph::path_handle_t &) --> void", pybind11::arg("path")); + cl.def("steps_of_handle", (class std::vector (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::BasePackedGraph::steps_of_handle, "C++: bdsg::BasePackedGraph::steps_of_handle(const struct handlegraph::handle_t &, bool) const --> class std::vector", pybind11::arg("handle"), pybind11::arg("match_orientation")); + cl.def("is_empty", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::is_empty, "C++: bdsg::BasePackedGraph::is_empty(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); + cl.def("destroy_path", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &)) &bdsg::BasePackedGraph::destroy_path, "C++: bdsg::BasePackedGraph::destroy_path(const struct handlegraph::path_handle_t &) --> void", pybind11::arg("path")); + cl.def("destroy_paths", (void (bdsg::BasePackedGraph::*)(const class std::vector &)) &bdsg::BasePackedGraph::destroy_paths, "C++: bdsg::BasePackedGraph::destroy_paths(const class std::vector &) --> void", pybind11::arg("paths")); cl.def("create_path_handle", [](bdsg::BasePackedGraph &o, const std::string & a0) -> handlegraph::path_handle_t { return o.create_path_handle(a0); }, "", pybind11::arg("name")); - cl.def("create_path_handle", (struct handlegraph::path_handle_t (bdsg::BasePackedGraph::*)(const std::string &, bool)) &bdsg::BasePackedGraph<>::create_path_handle, "C++: bdsg::BasePackedGraph<>::create_path_handle(const std::string &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("name"), pybind11::arg("is_circular")); - cl.def("append_step", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph<>::append_step, "C++: bdsg::BasePackedGraph<>::append_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_append")); - cl.def("prepend_step", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph<>::prepend_step, "C++: bdsg::BasePackedGraph<>::prepend_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_prepend")); - cl.def("rewrite_segment", (struct std::pair (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &)) &bdsg::BasePackedGraph<>::rewrite_segment, "C++: bdsg::BasePackedGraph<>::rewrite_segment(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &) --> struct std::pair", pybind11::arg("segment_begin"), pybind11::arg("segment_end"), pybind11::arg("new_segment")); - cl.def("set_circularity", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &, bool)) &bdsg::BasePackedGraph<>::set_circularity, "C++: bdsg::BasePackedGraph<>::set_circularity(const struct handlegraph::path_handle_t &, bool) --> void", pybind11::arg("path"), pybind11::arg("circular")); - cl.def("set_id_increment", (void (bdsg::BasePackedGraph::*)(const long long &)) &bdsg::BasePackedGraph<>::set_id_increment, "C++: bdsg::BasePackedGraph<>::set_id_increment(const long long &) --> void", pybind11::arg("min_id")); - cl.def("increment_node_ids", (void (bdsg::BasePackedGraph::*)(long long)) &bdsg::BasePackedGraph<>::increment_node_ids, "C++: bdsg::BasePackedGraph<>::increment_node_ids(long long) --> void", pybind11::arg("increment")); - cl.def("reassign_node_ids", (void (bdsg::BasePackedGraph::*)(const class std::function &)) &bdsg::BasePackedGraph<>::reassign_node_ids, "C++: bdsg::BasePackedGraph<>::reassign_node_ids(const class std::function &) --> void", pybind11::arg("get_new_id")); - cl.def("get_sense", (enum handlegraph::PathSense (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_sense, "C++: bdsg::BasePackedGraph<>::get_sense(const struct handlegraph::path_handle_t &) const --> enum handlegraph::PathSense", pybind11::arg("handle")); - cl.def("get_sample_name", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_sample_name, "C++: bdsg::BasePackedGraph<>::get_sample_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_locus_name", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_locus_name, "C++: bdsg::BasePackedGraph<>::get_locus_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_haplotype", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_haplotype, "C++: bdsg::BasePackedGraph<>::get_haplotype(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_phase_block", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_phase_block, "C++: bdsg::BasePackedGraph<>::get_phase_block(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_subrange", (struct std::pair (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_subrange, "C++: bdsg::BasePackedGraph<>::get_subrange(const struct handlegraph::path_handle_t &) const --> struct std::pair", pybind11::arg("handle")); + cl.def("create_path_handle", (struct handlegraph::path_handle_t (bdsg::BasePackedGraph::*)(const std::string &, bool)) &bdsg::BasePackedGraph::create_path_handle, "C++: bdsg::BasePackedGraph::create_path_handle(const std::string &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("name"), pybind11::arg("is_circular")); + cl.def("append_step", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph::append_step, "C++: bdsg::BasePackedGraph::append_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_append")); + cl.def("prepend_step", (struct handlegraph::step_handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph::prepend_step, "C++: bdsg::BasePackedGraph::prepend_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_prepend")); + cl.def("rewrite_segment", (struct std::pair (bdsg::BasePackedGraph::*)(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &)) &bdsg::BasePackedGraph::rewrite_segment, "C++: bdsg::BasePackedGraph::rewrite_segment(const struct handlegraph::step_handle_t &, const struct handlegraph::step_handle_t &, const class std::vector &) --> struct std::pair", pybind11::arg("segment_begin"), pybind11::arg("segment_end"), pybind11::arg("new_segment")); + cl.def("set_circularity", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &, bool)) &bdsg::BasePackedGraph::set_circularity, "C++: bdsg::BasePackedGraph::set_circularity(const struct handlegraph::path_handle_t &, bool) --> void", pybind11::arg("path"), pybind11::arg("circular")); + cl.def("set_id_increment", (void (bdsg::BasePackedGraph::*)(const long long &)) &bdsg::BasePackedGraph::set_id_increment, "C++: bdsg::BasePackedGraph::set_id_increment(const long long &) --> void", pybind11::arg("min_id")); + cl.def("increment_node_ids", (void (bdsg::BasePackedGraph::*)(long long)) &bdsg::BasePackedGraph::increment_node_ids, "C++: bdsg::BasePackedGraph::increment_node_ids(long long) --> void", pybind11::arg("increment")); + cl.def("reassign_node_ids", (void (bdsg::BasePackedGraph::*)(const class std::function &)) &bdsg::BasePackedGraph::reassign_node_ids, "C++: bdsg::BasePackedGraph::reassign_node_ids(const class std::function &) --> void", pybind11::arg("get_new_id")); + cl.def("get_sense", (enum handlegraph::PathSense (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::get_sense, "C++: bdsg::BasePackedGraph::get_sense(const struct handlegraph::path_handle_t &) const --> enum handlegraph::PathSense", pybind11::arg("handle")); + cl.def("get_sample_name", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::get_sample_name, "C++: bdsg::BasePackedGraph::get_sample_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_locus_name", (std::string (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::get_locus_name, "C++: bdsg::BasePackedGraph::get_locus_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_haplotype", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::get_haplotype, "C++: bdsg::BasePackedGraph::get_haplotype(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_phase_block", (unsigned long (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::get_phase_block, "C++: bdsg::BasePackedGraph::get_phase_block(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_subrange", (struct std::pair (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph::get_subrange, "C++: bdsg::BasePackedGraph::get_subrange(const struct handlegraph::path_handle_t &) const --> struct std::pair", pybind11::arg("handle")); cl.def("create_path", [](bdsg::BasePackedGraph &o, const enum handlegraph::PathSense & a0, const std::string & a1, const std::string & a2, const unsigned long & a3, const unsigned long & a4, const struct std::pair & a5) -> handlegraph::path_handle_t { return o.create_path(a0, a1, a2, a3, a4, a5); }, "", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange")); - cl.def("create_path", (struct handlegraph::path_handle_t (bdsg::BasePackedGraph::*)(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool)) &bdsg::BasePackedGraph<>::create_path, "C++: bdsg::BasePackedGraph<>::create_path(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange"), pybind11::arg("is_circular")); - cl.def("for_each_step_of_sense", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const enum handlegraph::PathSense &, const class std::function &) const) &bdsg::BasePackedGraph<>::for_each_step_of_sense, "C++: bdsg::BasePackedGraph<>::for_each_step_of_sense(const struct handlegraph::handle_t &, const enum handlegraph::PathSense &, const class std::function &) const --> bool", pybind11::arg("visited"), pybind11::arg("sense"), pybind11::arg("iteratee")); - cl.def("get_magic_number", (unsigned int (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph<>::get_magic_number, "C++: bdsg::BasePackedGraph<>::get_magic_number() const --> unsigned int"); - cl.def("deserialize", (void (bdsg::BasePackedGraph::*)(const std::string &)) &bdsg::BasePackedGraph<>::deserialize, "C++: bdsg::BasePackedGraph<>::deserialize(const std::string &) --> void", pybind11::arg("filename")); - cl.def("serialize", (void (bdsg::BasePackedGraph::*)(const std::string &)) &bdsg::BasePackedGraph<>::serialize, "C++: bdsg::BasePackedGraph<>::serialize(const std::string &) --> void", pybind11::arg("filename")); - cl.def("assign", (class bdsg::BasePackedGraph<> & (bdsg::BasePackedGraph::*)(const class bdsg::BasePackedGraph<> &)) &bdsg::BasePackedGraph<>::operator=, "C++: bdsg::BasePackedGraph<>::operator=(const class bdsg::BasePackedGraph<> &) --> class bdsg::BasePackedGraph<> &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("create_path", (struct handlegraph::path_handle_t (bdsg::BasePackedGraph::*)(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool)) &bdsg::BasePackedGraph::create_path, "C++: bdsg::BasePackedGraph::create_path(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange"), pybind11::arg("is_circular")); + cl.def("for_each_step_of_sense", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const enum handlegraph::PathSense &, const class std::function &) const) &bdsg::BasePackedGraph::for_each_step_of_sense, "C++: bdsg::BasePackedGraph::for_each_step_of_sense(const struct handlegraph::handle_t &, const enum handlegraph::PathSense &, const class std::function &) const --> bool", pybind11::arg("visited"), pybind11::arg("sense"), pybind11::arg("iteratee")); + cl.def("get_magic_number", (unsigned int (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph::get_magic_number, "C++: bdsg::BasePackedGraph::get_magic_number() const --> unsigned int"); + cl.def("deserialize", (void (bdsg::BasePackedGraph::*)(const std::string &)) &bdsg::BasePackedGraph::deserialize, "C++: bdsg::BasePackedGraph::deserialize(const std::string &) --> void", pybind11::arg("filename")); + cl.def("serialize", (void (bdsg::BasePackedGraph::*)(const std::string &)) &bdsg::BasePackedGraph::serialize, "C++: bdsg::BasePackedGraph::serialize(const std::string &) --> void", pybind11::arg("filename")); + cl.def("assign", (class bdsg::BasePackedGraph & (bdsg::BasePackedGraph::*)(const class bdsg::BasePackedGraph &)) &bdsg::BasePackedGraph::operator=, "C++: bdsg::BasePackedGraph::operator=(const class bdsg::BasePackedGraph &) --> class bdsg::BasePackedGraph &", pybind11::return_value_policy::automatic, pybind11::arg("")); } } diff --git a/bdsg/cmake_bindings/bdsg/internal/eades_algorithm.cpp b/bdsg/cmake_bindings/bdsg/internal/eades_algorithm.cpp index f7646f66..4a2e0cae 100644 --- a/bdsg/cmake_bindings/bdsg/internal/eades_algorithm.cpp +++ b/bdsg/cmake_bindings/bdsg/internal/eades_algorithm.cpp @@ -2,9 +2,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp b/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp index 77daabed..8343919f 100644 --- a/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp +++ b/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp @@ -13,11 +13,11 @@ #include #include #include +#include #include #include // __str__ #include #include -#include #include #include @@ -627,6 +627,19 @@ struct PyCallBack_bdsg_HashGraph : public bdsg::HashGraph { } return HashGraph::destroy_path(a0); } + void destroy_paths(const class std::vector & a0) override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "destroy_paths"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return HashGraph::destroy_paths(a0); + } struct handlegraph::path_handle_t create_path_handle(const std::string & a0, bool a1) override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "create_path_handle"); @@ -1013,14 +1026,20 @@ void bind_bdsg_internal_hash_map(std::function< pybind11::module &(std::string c { // bdsg::wang_hash file:bdsg/internal/hash_map.hpp line:120 pybind11::class_, std::shared_ptr>> cl(M("bdsg"), "wang_hash_long_long_void_t", ""); cl.def( pybind11::init( [](){ return new bdsg::wang_hash(); } ) ); - cl.def("__call__", (unsigned long (bdsg::wang_hash::*)(const long long &) const) &bdsg::wang_hash::operator(), "C++: bdsg::wang_hash::operator()(const long long &) const --> unsigned long", pybind11::arg("x")); - cl.def("assign", (struct bdsg::wang_hash & (bdsg::wang_hash::*)(const struct bdsg::wang_hash &)) &bdsg::wang_hash::operator=, "C++: bdsg::wang_hash::operator=(const struct bdsg::wang_hash &) --> struct bdsg::wang_hash &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("__call__", (unsigned long (bdsg::wang_hash::*)(const long long &) const) &bdsg::wang_hash::operator(), "C++: bdsg::wang_hash::operator()(const long long &) const --> unsigned long", pybind11::arg("x")); + cl.def("assign", (struct bdsg::wang_hash & (bdsg::wang_hash::*)(const struct bdsg::wang_hash &)) &bdsg::wang_hash::operator=, "C++: bdsg::wang_hash::operator=(const struct bdsg::wang_hash &) --> struct bdsg::wang_hash &", pybind11::return_value_policy::automatic, pybind11::arg("")); + } + { // bdsg::wang_hash file:bdsg/internal/hash_map.hpp line:120 + pybind11::class_, std::shared_ptr>> cl(M("bdsg"), "wang_hash_long_void_t", ""); + cl.def( pybind11::init( [](){ return new bdsg::wang_hash(); } ) ); + cl.def("__call__", (unsigned long (bdsg::wang_hash::*)(const long &) const) &bdsg::wang_hash::operator(), "C++: bdsg::wang_hash::operator()(const long &) const --> unsigned long", pybind11::arg("x")); + cl.def("assign", (struct bdsg::wang_hash & (bdsg::wang_hash::*)(const struct bdsg::wang_hash &)) &bdsg::wang_hash::operator=, "C++: bdsg::wang_hash::operator=(const struct bdsg::wang_hash &) --> struct bdsg::wang_hash &", pybind11::return_value_policy::automatic, pybind11::arg("")); } { // bdsg::wang_hash file:bdsg/internal/hash_map.hpp line:120 pybind11::class_, std::shared_ptr>> cl(M("bdsg"), "wang_hash_char_void_t", ""); cl.def( pybind11::init( [](){ return new bdsg::wang_hash(); } ) ); - cl.def("__call__", (unsigned long (bdsg::wang_hash::*)(const char &) const) &bdsg::wang_hash::operator(), "C++: bdsg::wang_hash::operator()(const char &) const --> unsigned long", pybind11::arg("x")); - cl.def("assign", (struct bdsg::wang_hash & (bdsg::wang_hash::*)(const struct bdsg::wang_hash &)) &bdsg::wang_hash::operator=, "C++: bdsg::wang_hash::operator=(const struct bdsg::wang_hash &) --> struct bdsg::wang_hash &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("__call__", (unsigned long (bdsg::wang_hash::*)(const char &) const) &bdsg::wang_hash::operator(), "C++: bdsg::wang_hash::operator()(const char &) const --> unsigned long", pybind11::arg("x")); + cl.def("assign", (struct bdsg::wang_hash & (bdsg::wang_hash::*)(const struct bdsg::wang_hash &)) &bdsg::wang_hash::operator=, "C++: bdsg::wang_hash::operator=(const struct bdsg::wang_hash &) --> struct bdsg::wang_hash &", pybind11::return_value_policy::automatic, pybind11::arg("")); } { // bdsg::StringHashMapFor file:bdsg/internal/hash_map.hpp line:212 pybind11::class_, std::shared_ptr>> cl(M("bdsg"), "StringHashMapFor_bdsg_STLBackend_t", ""); @@ -1140,6 +1159,7 @@ void bind_bdsg_internal_hash_map(std::function< pybind11::module &(std::string c cl.def("for_each_path_handle_impl", (bool (bdsg::HashGraph::*)(const class std::function &) const) &bdsg::HashGraph::for_each_path_handle_impl, "Execute a function on each path in the graph\n\nC++: bdsg::HashGraph::for_each_path_handle_impl(const class std::function &) const --> bool", pybind11::arg("iteratee")); cl.def("for_each_step_on_handle_impl", (bool (bdsg::HashGraph::*)(const struct handlegraph::handle_t &, const class std::function &) const) &bdsg::HashGraph::for_each_step_on_handle_impl, "Calls a function with all steps of a node on paths.\n\nC++: bdsg::HashGraph::for_each_step_on_handle_impl(const struct handlegraph::handle_t &, const class std::function &) const --> bool", pybind11::arg("handle"), pybind11::arg("iteratee")); cl.def("destroy_path", (void (bdsg::HashGraph::*)(const struct handlegraph::path_handle_t &)) &bdsg::HashGraph::destroy_path, "Destroy the given path. Invalidates handles to the path and its node steps.\n\nC++: bdsg::HashGraph::destroy_path(const struct handlegraph::path_handle_t &) --> void", pybind11::arg("path")); + cl.def("destroy_paths", (void (bdsg::HashGraph::*)(const class std::vector &)) &bdsg::HashGraph::destroy_paths, "Destroy the given set of paths. Invalidates handles to all the paths and their steps.\n\nC++: bdsg::HashGraph::destroy_paths(const class std::vector &) --> void", pybind11::arg("paths")); cl.def("create_path_handle", [](bdsg::HashGraph &o, const std::string & a0) -> handlegraph::path_handle_t { return o.create_path_handle(a0); }, "", pybind11::arg("name")); cl.def("create_path_handle", (struct handlegraph::path_handle_t (bdsg::HashGraph::*)(const std::string &, bool)) &bdsg::HashGraph::create_path_handle, "Create a path with the given name. The caller must ensure that no path\n with the given name exists already, or the behavior is undefined.\n Returns a handle to the created empty path. Handles to other paths must\n remain valid.\n\nC++: bdsg::HashGraph::create_path_handle(const std::string &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("name"), pybind11::arg("is_circular")); cl.def("append_step", (struct handlegraph::step_handle_t (bdsg::HashGraph::*)(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &)) &bdsg::HashGraph::append_step, "Append a visit to a node to the given path. Returns a handle to the new\n final step on the path which is appended. If the path is cirular, the new\n step is placed between the steps considered \"last\" and \"first\" by the\n method path_begin. Handles to prior steps on the path, and to other paths,\n must remain valid.\n\nC++: bdsg::HashGraph::append_step(const struct handlegraph::path_handle_t &, const struct handlegraph::handle_t &) --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("to_append")); diff --git a/bdsg/cmake_bindings/bdsg/internal/is_single_stranded.cpp b/bdsg/cmake_bindings/bdsg/internal/is_single_stranded.cpp index 767021c5..56d2286e 100644 --- a/bdsg/cmake_bindings/bdsg/internal/is_single_stranded.cpp +++ b/bdsg/cmake_bindings/bdsg/internal/is_single_stranded.cpp @@ -2,9 +2,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/bdsg/cmake_bindings/bdsg/internal/mapped_structs_1.cpp b/bdsg/cmake_bindings/bdsg/internal/mapped_structs_1.cpp index 463d946d..e9c7b384 100644 --- a/bdsg/cmake_bindings/bdsg/internal/mapped_structs_1.cpp +++ b/bdsg/cmake_bindings/bdsg/internal/mapped_structs_1.cpp @@ -54,31 +54,31 @@ void bind_bdsg_internal_mapped_structs_1(std::function< pybind11::module &(std:: pybind11::class_, std::shared_ptr>> cl(M("bdsg"), "PackedDeque_bdsg_STLBackend_t", ""); cl.def( pybind11::init( [](){ return new bdsg::PackedDeque(); } ) ); cl.def( pybind11::init( [](bdsg::PackedDeque const &o){ return new bdsg::PackedDeque(o); } ) ); - cl.def("assign", (class bdsg::PackedDeque<> & (bdsg::PackedDeque::*)(const class bdsg::PackedDeque<> &)) &bdsg::PackedDeque<>::operator=, "C++: bdsg::PackedDeque<>::operator=(const class bdsg::PackedDeque<> &) --> class bdsg::PackedDeque<> &", pybind11::return_value_policy::automatic, pybind11::arg("other")); - cl.def("set", (void (bdsg::PackedDeque::*)(const unsigned long &, const unsigned long long &)) &bdsg::PackedDeque<>::set, "C++: bdsg::PackedDeque<>::set(const unsigned long &, const unsigned long long &) --> void", pybind11::arg("i"), pybind11::arg("value")); - cl.def("get", (unsigned long long (bdsg::PackedDeque::*)(const unsigned long &) const) &bdsg::PackedDeque<>::get, "C++: bdsg::PackedDeque<>::get(const unsigned long &) const --> unsigned long long", pybind11::arg("i")); - cl.def("append_front", (void (bdsg::PackedDeque::*)(const unsigned long long &)) &bdsg::PackedDeque<>::append_front, "C++: bdsg::PackedDeque<>::append_front(const unsigned long long &) --> void", pybind11::arg("value")); - cl.def("append_back", (void (bdsg::PackedDeque::*)(const unsigned long long &)) &bdsg::PackedDeque<>::append_back, "C++: bdsg::PackedDeque<>::append_back(const unsigned long long &) --> void", pybind11::arg("value")); - cl.def("pop_front", (void (bdsg::PackedDeque::*)()) &bdsg::PackedDeque<>::pop_front, "C++: bdsg::PackedDeque<>::pop_front() --> void"); - cl.def("pop_back", (void (bdsg::PackedDeque::*)()) &bdsg::PackedDeque<>::pop_back, "C++: bdsg::PackedDeque<>::pop_back() --> void"); - cl.def("reserve", (void (bdsg::PackedDeque::*)(const unsigned long &)) &bdsg::PackedDeque<>::reserve, "C++: bdsg::PackedDeque<>::reserve(const unsigned long &) --> void", pybind11::arg("future_size")); - cl.def("size", (unsigned long (bdsg::PackedDeque::*)() const) &bdsg::PackedDeque<>::size, "C++: bdsg::PackedDeque<>::size() const --> unsigned long"); - cl.def("empty", (bool (bdsg::PackedDeque::*)() const) &bdsg::PackedDeque<>::empty, "C++: bdsg::PackedDeque<>::empty() const --> bool"); - cl.def("clear", (void (bdsg::PackedDeque::*)()) &bdsg::PackedDeque<>::clear, "C++: bdsg::PackedDeque<>::clear() --> void"); - cl.def("memory_usage", (unsigned long (bdsg::PackedDeque::*)() const) &bdsg::PackedDeque<>::memory_usage, "C++: bdsg::PackedDeque<>::memory_usage() const --> unsigned long"); + cl.def("assign", (class bdsg::PackedDeque & (bdsg::PackedDeque::*)(const class bdsg::PackedDeque &)) &bdsg::PackedDeque::operator=, "C++: bdsg::PackedDeque::operator=(const class bdsg::PackedDeque &) --> class bdsg::PackedDeque &", pybind11::return_value_policy::automatic, pybind11::arg("other")); + cl.def("set", (void (bdsg::PackedDeque::*)(const unsigned long &, const unsigned long &)) &bdsg::PackedDeque::set, "C++: bdsg::PackedDeque::set(const unsigned long &, const unsigned long &) --> void", pybind11::arg("i"), pybind11::arg("value")); + cl.def("get", (unsigned long (bdsg::PackedDeque::*)(const unsigned long &) const) &bdsg::PackedDeque::get, "C++: bdsg::PackedDeque::get(const unsigned long &) const --> unsigned long", pybind11::arg("i")); + cl.def("append_front", (void (bdsg::PackedDeque::*)(const unsigned long &)) &bdsg::PackedDeque::append_front, "C++: bdsg::PackedDeque::append_front(const unsigned long &) --> void", pybind11::arg("value")); + cl.def("append_back", (void (bdsg::PackedDeque::*)(const unsigned long &)) &bdsg::PackedDeque::append_back, "C++: bdsg::PackedDeque::append_back(const unsigned long &) --> void", pybind11::arg("value")); + cl.def("pop_front", (void (bdsg::PackedDeque::*)()) &bdsg::PackedDeque::pop_front, "C++: bdsg::PackedDeque::pop_front() --> void"); + cl.def("pop_back", (void (bdsg::PackedDeque::*)()) &bdsg::PackedDeque::pop_back, "C++: bdsg::PackedDeque::pop_back() --> void"); + cl.def("reserve", (void (bdsg::PackedDeque::*)(const unsigned long &)) &bdsg::PackedDeque::reserve, "C++: bdsg::PackedDeque::reserve(const unsigned long &) --> void", pybind11::arg("future_size")); + cl.def("size", (unsigned long (bdsg::PackedDeque::*)() const) &bdsg::PackedDeque::size, "C++: bdsg::PackedDeque::size() const --> unsigned long"); + cl.def("empty", (bool (bdsg::PackedDeque::*)() const) &bdsg::PackedDeque::empty, "C++: bdsg::PackedDeque::empty() const --> bool"); + cl.def("clear", (void (bdsg::PackedDeque::*)()) &bdsg::PackedDeque::clear, "C++: bdsg::PackedDeque::clear() --> void"); + cl.def("memory_usage", (unsigned long (bdsg::PackedDeque::*)() const) &bdsg::PackedDeque::memory_usage, "C++: bdsg::PackedDeque::memory_usage() const --> unsigned long"); } { // bdsg::PackedSet file:bdsg/internal/packed_structs.hpp line:411 pybind11::class_, std::shared_ptr>> cl(M("bdsg"), "PackedSet_bdsg_STLBackend_t", ""); cl.def( pybind11::init( [](){ return new bdsg::PackedSet(); } ) ); cl.def( pybind11::init( [](bdsg::PackedSet const &o){ return new bdsg::PackedSet(o); } ) ); - cl.def("assign", (class bdsg::PackedSet<> & (bdsg::PackedSet::*)(const class bdsg::PackedSet<> &)) &bdsg::PackedSet<>::operator=, "C++: bdsg::PackedSet<>::operator=(const class bdsg::PackedSet<> &) --> class bdsg::PackedSet<> &", pybind11::return_value_policy::automatic, pybind11::arg("other")); - cl.def("insert", (void (bdsg::PackedSet::*)(const unsigned long long &)) &bdsg::PackedSet<>::insert, "C++: bdsg::PackedSet<>::insert(const unsigned long long &) --> void", pybind11::arg("value")); - cl.def("find", (bool (bdsg::PackedSet::*)(const unsigned long long &) const) &bdsg::PackedSet<>::find, "C++: bdsg::PackedSet<>::find(const unsigned long long &) const --> bool", pybind11::arg("value")); - cl.def("remove", (void (bdsg::PackedSet::*)(const unsigned long long &)) &bdsg::PackedSet<>::remove, "C++: bdsg::PackedSet<>::remove(const unsigned long long &) --> void", pybind11::arg("value")); - cl.def("size", (unsigned long (bdsg::PackedSet::*)() const) &bdsg::PackedSet<>::size, "C++: bdsg::PackedSet<>::size() const --> unsigned long"); - cl.def("empty", (bool (bdsg::PackedSet::*)() const) &bdsg::PackedSet<>::empty, "C++: bdsg::PackedSet<>::empty() const --> bool"); - cl.def("set_load_factors", (void (bdsg::PackedSet::*)(double, double)) &bdsg::PackedSet<>::set_load_factors, "C++: bdsg::PackedSet<>::set_load_factors(double, double) --> void", pybind11::arg("min_load_factor"), pybind11::arg("max_load_factor")); - cl.def("max_load_factor", (double (bdsg::PackedSet::*)() const) &bdsg::PackedSet<>::max_load_factor, "C++: bdsg::PackedSet<>::max_load_factor() const --> double"); - cl.def("min_load_factor", (double (bdsg::PackedSet::*)() const) &bdsg::PackedSet<>::min_load_factor, "C++: bdsg::PackedSet<>::min_load_factor() const --> double"); + cl.def("assign", (class bdsg::PackedSet & (bdsg::PackedSet::*)(const class bdsg::PackedSet &)) &bdsg::PackedSet::operator=, "C++: bdsg::PackedSet::operator=(const class bdsg::PackedSet &) --> class bdsg::PackedSet &", pybind11::return_value_policy::automatic, pybind11::arg("other")); + cl.def("insert", (void (bdsg::PackedSet::*)(const unsigned long &)) &bdsg::PackedSet::insert, "C++: bdsg::PackedSet::insert(const unsigned long &) --> void", pybind11::arg("value")); + cl.def("find", (bool (bdsg::PackedSet::*)(const unsigned long &) const) &bdsg::PackedSet::find, "C++: bdsg::PackedSet::find(const unsigned long &) const --> bool", pybind11::arg("value")); + cl.def("remove", (void (bdsg::PackedSet::*)(const unsigned long &)) &bdsg::PackedSet::remove, "C++: bdsg::PackedSet::remove(const unsigned long &) --> void", pybind11::arg("value")); + cl.def("size", (unsigned long (bdsg::PackedSet::*)() const) &bdsg::PackedSet::size, "C++: bdsg::PackedSet::size() const --> unsigned long"); + cl.def("empty", (bool (bdsg::PackedSet::*)() const) &bdsg::PackedSet::empty, "C++: bdsg::PackedSet::empty() const --> bool"); + cl.def("set_load_factors", (void (bdsg::PackedSet::*)(double, double)) &bdsg::PackedSet::set_load_factors, "C++: bdsg::PackedSet::set_load_factors(double, double) --> void", pybind11::arg("min_load_factor"), pybind11::arg("max_load_factor")); + cl.def("max_load_factor", (double (bdsg::PackedSet::*)() const) &bdsg::PackedSet::max_load_factor, "C++: bdsg::PackedSet::max_load_factor() const --> double"); + cl.def("min_load_factor", (double (bdsg::PackedSet::*)() const) &bdsg::PackedSet::min_load_factor, "C++: bdsg::PackedSet::min_load_factor() const --> double"); } } diff --git a/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay.cpp b/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay.cpp index 6ac75cf0..2b9378cb 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay.cpp @@ -5,10 +5,10 @@ #include #include #include +#include #include #include // __str__ #include -#include #include #include @@ -29,7 +29,7 @@ PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif -// bdsg::PackedPositionOverlay file:bdsg/overlays/packed_path_position_overlay.hpp line:30 +// bdsg::PackedPositionOverlay file:bdsg/overlays/packed_path_position_overlay.hpp line:33 struct PyCallBack_bdsg_PackedPositionOverlay : public bdsg::PackedPositionOverlay { using bdsg::PackedPositionOverlay::PackedPositionOverlay; @@ -727,7 +727,7 @@ struct PyCallBack_bdsg_PackedPositionOverlay : public bdsg::PackedPositionOverla void bind_bdsg_overlays_packed_path_position_overlay(std::function< pybind11::module &(std::string const &namespace_) > &M) { - { // bdsg::PackedPositionOverlay file:bdsg/overlays/packed_path_position_overlay.hpp line:30 + { // bdsg::PackedPositionOverlay file:bdsg/overlays/packed_path_position_overlay.hpp line:33 pybind11::class_, PyCallBack_bdsg_PackedPositionOverlay, handlegraph::PathPositionHandleGraph, handlegraph::ExpandingOverlayGraph> cl(M("bdsg"), "PackedPositionOverlay", ""); cl.def( pybind11::init( [](const class handlegraph::PathHandleGraph * a0){ return new bdsg::PackedPositionOverlay(a0); }, [](const class handlegraph::PathHandleGraph * a0){ return new PyCallBack_bdsg_PackedPositionOverlay(a0); } ), "doc"); cl.def( pybind11::init(), pybind11::arg("graph"), pybind11::arg("steps_per_index") ); diff --git a/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay_1.cpp b/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay_1.cpp index 6d8bb382..807c6cb1 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay_1.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay_1.cpp @@ -8,10 +8,10 @@ #include #include #include +#include #include #include // __str__ #include -#include #include #include @@ -32,7 +32,7 @@ PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif -// bdsg::PackedReferencePathOverlay file:bdsg/overlays/packed_reference_path_overlay.hpp line:22 +// bdsg::PackedReferencePathOverlay file:bdsg/overlays/packed_reference_path_overlay.hpp line:30 struct PyCallBack_bdsg_PackedReferencePathOverlay : public bdsg::PackedReferencePathOverlay { using bdsg::PackedReferencePathOverlay::PackedReferencePathOverlay; @@ -1653,16 +1653,15 @@ struct PyCallBack_bdsg_PositionOverlay : public bdsg::PositionOverlay { void bind_bdsg_overlays_packed_path_position_overlay_1(std::function< pybind11::module &(std::string const &namespace_) > &M) { - { // bdsg::BBHashHelper file:bdsg/overlays/packed_path_position_overlay.hpp line:297 + { // bdsg::BBHashHelper file:bdsg/overlays/packed_path_position_overlay.hpp line:300 pybind11::class_> cl(M("bdsg"), "BBHashHelper", ""); cl.def( pybind11::init(), pybind11::arg("graph") ); cl.def( pybind11::init( [](bdsg::BBHashHelper const &o){ return new bdsg::BBHashHelper(o); } ) ); cl.def("begin", (struct bdsg::BBHashHelper::iterator (bdsg::BBHashHelper::*)() const) &bdsg::BBHashHelper::begin, "C++ style range begin over steps\n\nC++: bdsg::BBHashHelper::begin() const --> struct bdsg::BBHashHelper::iterator"); cl.def("end", (struct bdsg::BBHashHelper::iterator (bdsg::BBHashHelper::*)() const) &bdsg::BBHashHelper::end, "C++ style range end over steps\n\nC++: bdsg::BBHashHelper::end() const --> struct bdsg::BBHashHelper::iterator"); - cl.def("assign", (struct bdsg::BBHashHelper & (bdsg::BBHashHelper::*)(const struct bdsg::BBHashHelper &)) &bdsg::BBHashHelper::operator=, "C++: bdsg::BBHashHelper::operator=(const struct bdsg::BBHashHelper &) --> struct bdsg::BBHashHelper &", pybind11::return_value_policy::automatic, pybind11::arg("")); - { // bdsg::BBHashHelper::iterator file:bdsg/overlays/packed_path_position_overlay.hpp line:307 + { // bdsg::BBHashHelper::iterator file:bdsg/overlays/packed_path_position_overlay.hpp line:310 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "iterator", ""); cl.def( pybind11::init( [](bdsg::BBHashHelper::iterator const &o){ return new bdsg::BBHashHelper::iterator(o); } ) ); @@ -1674,14 +1673,14 @@ void bind_bdsg_overlays_packed_path_position_overlay_1(std::function< pybind11:: } } - { // bdsg::PackedReferencePathOverlay file:bdsg/overlays/packed_reference_path_overlay.hpp line:22 + { // bdsg::PackedReferencePathOverlay file:bdsg/overlays/packed_reference_path_overlay.hpp line:30 pybind11::class_, PyCallBack_bdsg_PackedReferencePathOverlay, bdsg::PackedPositionOverlay> cl(M("bdsg"), "PackedReferencePathOverlay", ""); cl.def( pybind11::init( [](const class handlegraph::PathHandleGraph * a0){ return new bdsg::PackedReferencePathOverlay(a0); }, [](const class handlegraph::PathHandleGraph * a0){ return new PyCallBack_bdsg_PackedReferencePathOverlay(a0); } ), "doc"); cl.def( pybind11::init(), pybind11::arg("graph"), pybind11::arg("steps_per_index") ); - cl.def( pybind11::init( [](){ return new bdsg::PackedReferencePathOverlay(); }, [](){ return new PyCallBack_bdsg_PackedReferencePathOverlay(); } ) ); cl.def( pybind11::init( [](PyCallBack_bdsg_PackedReferencePathOverlay const &o){ return new PyCallBack_bdsg_PackedReferencePathOverlay(o); } ) ); cl.def( pybind11::init( [](bdsg::PackedReferencePathOverlay const &o){ return new bdsg::PackedReferencePathOverlay(o); } ) ); + cl.def( pybind11::init( [](){ return new bdsg::PackedReferencePathOverlay(); }, [](){ return new PyCallBack_bdsg_PackedReferencePathOverlay(); } ) ); cl.def("get_path_handle_of_step", (struct handlegraph::path_handle_t (bdsg::PackedReferencePathOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PackedReferencePathOverlay::get_path_handle_of_step, "overload this to use the cache \n\nC++: bdsg::PackedReferencePathOverlay::get_path_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::path_handle_t", pybind11::arg("step_handle")); cl.def("assign", (class bdsg::PackedReferencePathOverlay & (bdsg::PackedReferencePathOverlay::*)(const class bdsg::PackedReferencePathOverlay &)) &bdsg::PackedReferencePathOverlay::operator=, "C++: bdsg::PackedReferencePathOverlay::operator=(const class bdsg::PackedReferencePathOverlay &) --> class bdsg::PackedReferencePathOverlay &", pybind11::return_value_policy::automatic, pybind11::arg("")); } diff --git a/bdsg/cmake_bindings/bdsg/overlays/path_position_overlays.cpp b/bdsg/cmake_bindings/bdsg/overlays/path_position_overlays.cpp index 13e1dc30..db5b77ee 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/path_position_overlays.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/path_position_overlays.cpp @@ -11,12 +11,10 @@ #include #include #include +#include #include #include // __str__ #include -#include -#include -#include #include #include @@ -953,6 +951,19 @@ struct PyCallBack_bdsg_MutablePositionOverlay : public bdsg::MutablePositionOver } return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); } + void destroy_paths(const class std::vector & a0) override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "destroy_paths"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return MutablePathHandleGraph::destroy_paths(a0); + } struct handlegraph::path_handle_t rename_path(const struct handlegraph::path_handle_t & a0, const std::string & a1) override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "rename_path"); diff --git a/bdsg/cmake_bindings/bdsg/overlays/path_subgraph_overlay.cpp b/bdsg/cmake_bindings/bdsg/overlays/path_subgraph_overlay.cpp index a40581d9..e7429298 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/path_subgraph_overlay.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/path_subgraph_overlay.cpp @@ -5,12 +5,10 @@ #include #include #include +#include #include #include // __str__ #include -#include -#include -#include #include #include diff --git a/bdsg/cmake_bindings/bdsg/overlays/reference_path_overlay.cpp b/bdsg/cmake_bindings/bdsg/overlays/reference_path_overlay.cpp new file mode 100644 index 00000000..4d0d65d9 --- /dev/null +++ b/bdsg/cmake_bindings/bdsg/overlays/reference_path_overlay.cpp @@ -0,0 +1,1121 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // __str__ +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +// bdsg::ReferencePathOverlay file:bdsg/overlays/reference_path_overlay.hpp line:41 +struct PyCallBack_bdsg_ReferencePathOverlay : public bdsg::ReferencePathOverlay { + using bdsg::ReferencePathOverlay::ReferencePathOverlay; + + bool has_node(long long a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::has_node(a0); + } + struct handlegraph::handle_t get_handle(const long long & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_handle(a0, a1); + } + long long get_id(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_id(a0); + } + bool get_is_reverse(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_is_reverse(a0); + } + struct handlegraph::handle_t flip(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::flip(a0); + } + unsigned long get_length(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_length(a0); + } + std::string get_sequence(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_sequence(a0); + } + unsigned long get_node_count() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_node_count(); + } + long long min_node_id() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::min_node_id(); + } + long long max_node_id() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::max_node_id(); + } + unsigned long get_degree(const struct handlegraph::handle_t & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_degree(a0, a1); + } + bool has_edge(const struct handlegraph::handle_t & a0, const struct handlegraph::handle_t & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::has_edge(a0, a1); + } + unsigned long get_edge_count() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_edge_count(); + } + unsigned long get_total_length() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_total_length(); + } + char get_base(const struct handlegraph::handle_t & a0, unsigned long a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_base(a0, a1); + } + std::string get_subsequence(const struct handlegraph::handle_t & a0, unsigned long a1, unsigned long a2) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); + if (overload) { + auto o = overload.operator()(a0, a1, a2); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_subsequence(a0, a1, a2); + } + unsigned long get_path_count() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_count"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_path_count(); + } + bool has_path(const std::string & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_path"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::has_path(a0); + } + struct handlegraph::path_handle_t get_path_handle(const std::string & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_path_handle(a0); + } + std::string get_path_name(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_name"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_path_name(a0); + } + bool get_is_circular(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_circular"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_is_circular(a0); + } + unsigned long get_step_count(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_step_count(a0); + } + struct handlegraph::handle_t get_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle_of_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_handle_of_step(a0); + } + struct handlegraph::path_handle_t get_path_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle_of_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_path_handle_of_step(a0); + } + struct handlegraph::step_handle_t path_begin(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_begin"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::path_begin(a0); + } + struct handlegraph::step_handle_t path_end(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_end"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::path_end(a0); + } + struct handlegraph::step_handle_t path_back(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_back"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::path_back(a0); + } + struct handlegraph::step_handle_t path_front_end(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_front_end"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::path_front_end(a0); + } + bool has_next_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_next_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::has_next_step(a0); + } + bool has_previous_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_previous_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::has_previous_step(a0); + } + struct handlegraph::step_handle_t get_next_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_next_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_next_step(a0); + } + struct handlegraph::step_handle_t get_previous_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_previous_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_previous_step(a0); + } + unsigned long get_path_length(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_length"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_path_length(a0); + } + unsigned long get_position_of_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_position_of_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_position_of_step(a0); + } + struct handlegraph::step_handle_t get_step_at_position(const struct handlegraph::path_handle_t & a0, const unsigned long & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_at_position"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::get_step_at_position(a0, a1); + } + bool follow_edges_impl(const struct handlegraph::handle_t & a0, bool a1, const class std::function & a2) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::follow_edges_impl(a0, a1, a2); + } + bool for_each_handle_impl(const class std::function & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::for_each_handle_impl(a0, a1); + } + bool for_each_path_handle_impl(const class std::function & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::for_each_path_handle_impl(a0); + } + bool for_each_step_on_handle_impl(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_on_handle_impl"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return ReferencePathOverlay::for_each_step_on_handle_impl(a0, a1); + } + bool for_each_step_position_on_handle(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_position_on_handle"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathPositionHandleGraph::for_each_step_position_on_handle(a0, a1); + } + unsigned long get_step_count(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathHandleGraph::get_step_count(a0); + } + class std::vector steps_of_handle(const struct handlegraph::handle_t & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "steps_of_handle"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference>::value) { + static pybind11::detail::override_caster_t> caster; + return pybind11::detail::cast_ref>(std::move(o), caster); + } + else return pybind11::detail::cast_safe>(std::move(o)); + } + return PathHandleGraph::steps_of_handle(a0, a1); + } + bool is_empty(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "is_empty"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathHandleGraph::is_empty(a0); + } + enum handlegraph::PathSense get_sense(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sense"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_sense(a0); + } + std::string get_sample_name(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sample_name"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_sample_name(a0); + } + std::string get_locus_name(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_locus_name"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_locus_name(a0); + } + unsigned long get_haplotype(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_haplotype"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_haplotype(a0); + } + unsigned long get_phase_block(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_phase_block"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_phase_block(a0); + } + using _binder_ret_0 = struct std::pair; + _binder_ret_0 get_subrange(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subrange"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference<_binder_ret_0>::value) { + static pybind11::detail::override_caster_t<_binder_ret_0> caster; + return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); + } + else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + } + return PathMetadata::get_subrange(a0); + } + bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); + } +}; + +// bdsg::VectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:34 +struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { + using bdsg::VectorizableOverlay::VectorizableOverlay; + + bool has_node(long long a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::has_node(a0); + } + struct handlegraph::handle_t get_handle(const long long & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_handle(a0, a1); + } + long long get_id(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_id(a0); + } + bool get_is_reverse(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_is_reverse(a0); + } + struct handlegraph::handle_t flip(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::flip(a0); + } + unsigned long get_length(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_length(a0); + } + std::string get_sequence(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_sequence(a0); + } + unsigned long get_degree(const struct handlegraph::handle_t & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_degree(a0, a1); + } + bool has_edge(const struct handlegraph::handle_t & a0, const struct handlegraph::handle_t & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::has_edge(a0, a1); + } + char get_base(const struct handlegraph::handle_t & a0, unsigned long a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_base(a0, a1); + } + std::string get_subsequence(const struct handlegraph::handle_t & a0, unsigned long a1, unsigned long a2) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); + if (overload) { + auto o = overload.operator()(a0, a1, a2); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_subsequence(a0, a1, a2); + } + unsigned long get_node_count() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_node_count(); + } + long long min_node_id() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::min_node_id(); + } + long long max_node_id() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::max_node_id(); + } + unsigned long node_vector_offset(const long long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::node_vector_offset(a0); + } + long long node_at_vector_offset(const unsigned long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::node_at_vector_offset(a0); + } + unsigned long edge_index(const struct std::pair & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::edge_index(a0); + } + unsigned long id_to_rank(const long long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::id_to_rank(a0); + } + long long rank_to_id(const unsigned long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::rank_to_id(a0); + } + struct handlegraph::handle_t get_underlying_handle(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_underlying_handle(a0); + } + void index_nodes_and_edges() override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::index_nodes_and_edges(); + } + unsigned long handle_to_rank(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return RankedHandleGraph::handle_to_rank(a0); + } + struct handlegraph::handle_t rank_to_handle(const unsigned long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return RankedHandleGraph::rank_to_handle(a0); + } + unsigned long get_edge_count() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return HandleGraph::get_edge_count(); + } + unsigned long get_total_length() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return HandleGraph::get_total_length(); + } + bool follow_edges_impl(const struct handlegraph::handle_t & a0, bool a1, const class std::function & a2) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::follow_edges_impl\""); + } + bool for_each_handle_impl(const class std::function & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::for_each_handle_impl\""); + } +}; + +void bind_bdsg_overlays_reference_path_overlay(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ + { // bdsg::ReferencePathOverlay file:bdsg/overlays/reference_path_overlay.hpp line:41 + pybind11::class_, PyCallBack_bdsg_ReferencePathOverlay, handlegraph::PathPositionHandleGraph> cl(M("bdsg"), "ReferencePathOverlay", ""); + cl.def( pybind11::init( [](){ return new bdsg::ReferencePathOverlay(); }, [](){ return new PyCallBack_bdsg_ReferencePathOverlay(); } ) ); + cl.def( pybind11::init( [](PyCallBack_bdsg_ReferencePathOverlay const &o){ return new PyCallBack_bdsg_ReferencePathOverlay(o); } ) ); + cl.def( pybind11::init( [](bdsg::ReferencePathOverlay const &o){ return new bdsg::ReferencePathOverlay(o); } ) ); + cl.def("has_node", (bool (bdsg::ReferencePathOverlay::*)(long long) const) &bdsg::ReferencePathOverlay::has_node, "Method to check if a node exists by ID\n\nC++: bdsg::ReferencePathOverlay::has_node(long long) const --> bool", pybind11::arg("node_id")); + cl.def("get_handle", [](bdsg::ReferencePathOverlay const &o, const long long & a0) -> handlegraph::handle_t { return o.get_handle(a0); }, "", pybind11::arg("node_id")); + cl.def("get_handle", (struct handlegraph::handle_t (bdsg::ReferencePathOverlay::*)(const long long &, bool) const) &bdsg::ReferencePathOverlay::get_handle, "Look up the handle for the node with the given ID in the given orientation\n\nC++: bdsg::ReferencePathOverlay::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); + cl.def("get_id", (long long (bdsg::ReferencePathOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::ReferencePathOverlay::get_id, "Get the ID from a handle\n\nC++: bdsg::ReferencePathOverlay::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); + cl.def("get_is_reverse", (bool (bdsg::ReferencePathOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::ReferencePathOverlay::get_is_reverse, "Get the orientation of a handle\n\nC++: bdsg::ReferencePathOverlay::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); + cl.def("flip", (struct handlegraph::handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::ReferencePathOverlay::flip, "Invert the orientation of a handle (potentially without getting its ID)\n\nC++: bdsg::ReferencePathOverlay::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("get_length", (unsigned long (bdsg::ReferencePathOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::ReferencePathOverlay::get_length, "Get the length of a node\n\nC++: bdsg::ReferencePathOverlay::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_sequence", (std::string (bdsg::ReferencePathOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::ReferencePathOverlay::get_sequence, "Get the sequence of a node, presented in the handle's local forward\n orientation.\n\nC++: bdsg::ReferencePathOverlay::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_node_count", (unsigned long (bdsg::ReferencePathOverlay::*)() const) &bdsg::ReferencePathOverlay::get_node_count, "Return the number of nodes in the graph\n\nC++: bdsg::ReferencePathOverlay::get_node_count() const --> unsigned long"); + cl.def("min_node_id", (long long (bdsg::ReferencePathOverlay::*)() const) &bdsg::ReferencePathOverlay::min_node_id, "Return the smallest ID in the graph, or some smaller number if the\n smallest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::ReferencePathOverlay::min_node_id() const --> long long"); + cl.def("max_node_id", (long long (bdsg::ReferencePathOverlay::*)() const) &bdsg::ReferencePathOverlay::max_node_id, "Return the largest ID in the graph, or some larger number if the\n largest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::ReferencePathOverlay::max_node_id() const --> long long"); + cl.def("get_degree", (unsigned long (bdsg::ReferencePathOverlay::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::ReferencePathOverlay::get_degree, "/////////////////////////////////////////////////////////////////////////\n\n Get the number of edges on the right (go_left = false) or left (go_left\n = true) side of the given handle. The default implementation is O(n) in\n the number of edges returned, but graph implementations that track this\n information more efficiently can override this method.\n\nC++: bdsg::ReferencePathOverlay::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); + cl.def("has_edge", (bool (bdsg::ReferencePathOverlay::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::ReferencePathOverlay::has_edge, "Returns true if there is an edge that allows traversal from the left\n handle to the right handle. By default O(n) in the number of edges\n on left, but can be overridden with more efficient implementations.\n\nC++: bdsg::ReferencePathOverlay::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); + cl.def("get_edge_count", (unsigned long (bdsg::ReferencePathOverlay::*)() const) &bdsg::ReferencePathOverlay::get_edge_count, "Return the total number of edges in the graph. If not overridden,\n counts them all in linear time.\n\nC++: bdsg::ReferencePathOverlay::get_edge_count() const --> unsigned long"); + cl.def("get_total_length", (unsigned long (bdsg::ReferencePathOverlay::*)() const) &bdsg::ReferencePathOverlay::get_total_length, "Return the total length of all nodes in the graph, in bp. If not\n overridden, loops over all nodes in linear time.\n\nC++: bdsg::ReferencePathOverlay::get_total_length() const --> unsigned long"); + cl.def("get_base", (char (bdsg::ReferencePathOverlay::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::ReferencePathOverlay::get_base, "Returns one base of a handle's sequence, in the orientation of the\n handle.\n\nC++: bdsg::ReferencePathOverlay::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); + cl.def("get_subsequence", (std::string (bdsg::ReferencePathOverlay::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::ReferencePathOverlay::get_subsequence, "Returns a substring of a handle's sequence, in the orientation of the\n handle. If the indicated substring would extend beyond the end of the\n handle's sequence, the return value is truncated to the sequence's end.\n By default O(n) in the size of the handle's sequence, but can be overriden.\n\nC++: bdsg::ReferencePathOverlay::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); + cl.def("get_path_count", (unsigned long (bdsg::ReferencePathOverlay::*)() const) &bdsg::ReferencePathOverlay::get_path_count, "Returns the number of paths stored in the graph\n\nC++: bdsg::ReferencePathOverlay::get_path_count() const --> unsigned long"); + cl.def("has_path", (bool (bdsg::ReferencePathOverlay::*)(const std::string &) const) &bdsg::ReferencePathOverlay::has_path, "Determine if a path name exists and is legal to get a path handle for.\n\nC++: bdsg::ReferencePathOverlay::has_path(const std::string &) const --> bool", pybind11::arg("path_name")); + cl.def("get_path_handle", (struct handlegraph::path_handle_t (bdsg::ReferencePathOverlay::*)(const std::string &) const) &bdsg::ReferencePathOverlay::get_path_handle, "Look up the path handle for the given path name.\n The path with that name must exist.\n\nC++: bdsg::ReferencePathOverlay::get_path_handle(const std::string &) const --> struct handlegraph::path_handle_t", pybind11::arg("path_name")); + cl.def("get_path_name", (std::string (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::ReferencePathOverlay::get_path_name, "Look up the name of a path from a handle to it\n\nC++: bdsg::ReferencePathOverlay::get_path_name(const struct handlegraph::path_handle_t &) const --> std::string", pybind11::arg("path_handle")); + cl.def("get_is_circular", (bool (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::ReferencePathOverlay::get_is_circular, "Look up whether a path is circular\n\nC++: bdsg::ReferencePathOverlay::get_is_circular(const struct handlegraph::path_handle_t &) const --> bool", pybind11::arg("path_handle")); + cl.def("get_step_count", (unsigned long (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::ReferencePathOverlay::get_step_count, "Returns the number of node steps in the path\n\nC++: bdsg::ReferencePathOverlay::get_step_count(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); + cl.def("get_handle_of_step", (struct handlegraph::handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::ReferencePathOverlay::get_handle_of_step, "Get a node handle (node ID and orientation) from a handle to an step on a path\n\nC++: bdsg::ReferencePathOverlay::get_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("step_handle")); + cl.def("get_path_handle_of_step", (struct handlegraph::path_handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::ReferencePathOverlay::get_path_handle_of_step, "Returns a handle to the path that an step is on\n\nC++: bdsg::ReferencePathOverlay::get_path_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::path_handle_t", pybind11::arg("step_handle")); + cl.def("path_begin", (struct handlegraph::step_handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::ReferencePathOverlay::path_begin, "Get a handle to the first step, which will be an arbitrary step in a circular path\n that we consider \"first\" based on our construction of the path. If the path is empty,\n then the implementation must return the same value as path_end().\n\nC++: bdsg::ReferencePathOverlay::path_begin(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_end", (struct handlegraph::step_handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::ReferencePathOverlay::path_end, "Get a handle to a fictitious position past the end of a path. This position is\n returned by get_next_step for the final step in a path in a non-circular path.\n Note: get_next_step will *NEVER* return this value for a circular path.\n\nC++: bdsg::ReferencePathOverlay::path_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_back", (struct handlegraph::step_handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::ReferencePathOverlay::path_back, "Get a handle to the last step, which will be an arbitrary step in a circular path that\n we consider \"last\" based on our construction of the path. If the path is empty\n then the implementation must return the same value as path_front_end().\n\nC++: bdsg::ReferencePathOverlay::path_back(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("path_front_end", (struct handlegraph::step_handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::ReferencePathOverlay::path_front_end, "Get a handle to a fictitious position before the beginning of a path. This position is\n return by get_previous_step for the first step in a path in a non-circular path.\n Note: get_previous_step will *NEVER* return this value for a circular path.\n\nC++: bdsg::ReferencePathOverlay::path_front_end(const struct handlegraph::path_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("path_handle")); + cl.def("has_next_step", (bool (bdsg::ReferencePathOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::ReferencePathOverlay::has_next_step, "Returns true if the step is not the last step in a non-circular path.\n\nC++: bdsg::ReferencePathOverlay::has_next_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); + cl.def("has_previous_step", (bool (bdsg::ReferencePathOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::ReferencePathOverlay::has_previous_step, "Returns true if the step is not the first step in a non-circular path.\n\nC++: bdsg::ReferencePathOverlay::has_previous_step(const struct handlegraph::step_handle_t &) const --> bool", pybind11::arg("step_handle")); + cl.def("get_next_step", (struct handlegraph::step_handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::ReferencePathOverlay::get_next_step, "Returns a handle to the next step on the path. If the given step is the final step\n of a non-circular path, this method has undefined behavior. In a circular path,\n the \"last\" step will loop around to the \"first\" step.\n\nC++: bdsg::ReferencePathOverlay::get_next_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); + cl.def("get_previous_step", (struct handlegraph::step_handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::ReferencePathOverlay::get_previous_step, "Returns a handle to the previous step on the path. If the given step is the first\n step of a non-circular path, this method has undefined behavior. In a circular path,\n it will loop around from the \"first\" step (i.e. the one returned by path_begin) to\n the \"last\" step.\n\nC++: bdsg::ReferencePathOverlay::get_previous_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); + cl.def("get_path_length", (unsigned long (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::ReferencePathOverlay::get_path_length, "Returns the length of a path measured in bases of sequence.\n\nC++: bdsg::ReferencePathOverlay::get_path_length(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); + cl.def("get_position_of_step", (unsigned long (bdsg::ReferencePathOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::ReferencePathOverlay::get_position_of_step, "Returns the position along the path of the beginning of this step measured in\n bases of sequence. In a circular path, positions start at the step returned by\n path_begin().\n\nC++: bdsg::ReferencePathOverlay::get_position_of_step(const struct handlegraph::step_handle_t &) const --> unsigned long", pybind11::arg("step")); + cl.def("get_step_at_position", (struct handlegraph::step_handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &, const unsigned long &) const) &bdsg::ReferencePathOverlay::get_step_at_position, "Returns the step at this position, measured in bases of sequence starting at\n the step returned by path_begin(). If the position is past the end of the\n path, returns path_end().\n\nC++: bdsg::ReferencePathOverlay::get_step_at_position(const struct handlegraph::path_handle_t &, const unsigned long &) const --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("position")); + cl.def("assign", (class bdsg::ReferencePathOverlay & (bdsg::ReferencePathOverlay::*)(const class bdsg::ReferencePathOverlay &)) &bdsg::ReferencePathOverlay::operator=, "C++: bdsg::ReferencePathOverlay::operator=(const class bdsg::ReferencePathOverlay &) --> class bdsg::ReferencePathOverlay &", pybind11::return_value_policy::automatic, pybind11::arg("")); + } + { // bdsg::VectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:34 + pybind11::class_, PyCallBack_bdsg_VectorizableOverlay, handlegraph::VectorizableHandleGraph, handlegraph::ExpandingOverlayGraph> cl(M("bdsg"), "VectorizableOverlay", ""); + cl.def( pybind11::init(), pybind11::arg("graph") ); + + cl.def( pybind11::init( [](){ return new bdsg::VectorizableOverlay(); }, [](){ return new PyCallBack_bdsg_VectorizableOverlay(); } ) ); + cl.def("has_node", (bool (bdsg::VectorizableOverlay::*)(long long) const) &bdsg::VectorizableOverlay::has_node, "Method to check if a node exists by ID\n\nC++: bdsg::VectorizableOverlay::has_node(long long) const --> bool", pybind11::arg("node_id")); + cl.def("get_handle", [](bdsg::VectorizableOverlay const &o, const long long & a0) -> handlegraph::handle_t { return o.get_handle(a0); }, "", pybind11::arg("node_id")); + cl.def("get_handle", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const long long &, bool) const) &bdsg::VectorizableOverlay::get_handle, "Look up the handle for the node with the given ID in the given orientation\n\nC++: bdsg::VectorizableOverlay::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); + cl.def("get_id", (long long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_id, "Get the ID from a handle\n\nC++: bdsg::VectorizableOverlay::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); + cl.def("get_is_reverse", (bool (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_is_reverse, "Get the orientation of a handle\n\nC++: bdsg::VectorizableOverlay::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); + cl.def("flip", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::flip, "Invert the orientation of a handle (potentially without getting its ID)\n\nC++: bdsg::VectorizableOverlay::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("get_length", (unsigned long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_length, "Get the length of a node\n\nC++: bdsg::VectorizableOverlay::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_sequence", (std::string (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_sequence, "Get the sequence of a node, presented in the handle's local forward orientation.\n\nC++: bdsg::VectorizableOverlay::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_degree", (unsigned long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::VectorizableOverlay::get_degree, "Get the number of edges on the right (go_left = false) or left (go_left\n = true) side of the given handle. The default implementation is O(n) in\n the number of edges returned, but graph implementations that track this\n information more efficiently can override this method.\n\nC++: bdsg::VectorizableOverlay::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); + cl.def("has_edge", (bool (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::has_edge, "Returns true if there is an edge that allows traversal from the left\n handle to the right handle. By default O(n) in the number of edges\n on left, but can be overridden with more efficient implementations.\n\nC++: bdsg::VectorizableOverlay::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); + cl.def("get_base", (char (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::VectorizableOverlay::get_base, "Returns one base of a handle's sequence, in the orientation of the\n handle.\n\nC++: bdsg::VectorizableOverlay::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); + cl.def("get_subsequence", (std::string (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::VectorizableOverlay::get_subsequence, "Returns a substring of a handle's sequence, in the orientation of the\n handle. If the indicated substring would extend beyond the end of the\n handle's sequence, the return value is truncated to the sequence's end.\n\nC++: bdsg::VectorizableOverlay::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); + cl.def("get_node_count", (unsigned long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::get_node_count, "Return the number of nodes in the graph\n\nC++: bdsg::VectorizableOverlay::get_node_count() const --> unsigned long"); + cl.def("min_node_id", (long long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::min_node_id, "Return the smallest ID in the graph, or some smaller number if the\n smallest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::VectorizableOverlay::min_node_id() const --> long long"); + cl.def("max_node_id", (long long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::max_node_id, "Return the largest ID in the graph, or some larger number if the\n largest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::VectorizableOverlay::max_node_id() const --> long long"); + cl.def("node_vector_offset", (unsigned long (bdsg::VectorizableOverlay::*)(const long long &) const) &bdsg::VectorizableOverlay::node_vector_offset, "Return the start position of the node in a (possibly implict) sorted array\n constructed from the concatenation of the node sequences\n\nC++: bdsg::VectorizableOverlay::node_vector_offset(const long long &) const --> unsigned long", pybind11::arg("node_id")); + cl.def("node_at_vector_offset", (long long (bdsg::VectorizableOverlay::*)(const unsigned long &) const) &bdsg::VectorizableOverlay::node_at_vector_offset, "Return the node overlapping the given offset in the implicit node vector\n\nC++: bdsg::VectorizableOverlay::node_at_vector_offset(const unsigned long &) const --> long long", pybind11::arg("offset")); + cl.def("edge_index", (unsigned long (bdsg::VectorizableOverlay::*)(const struct std::pair &) const) &bdsg::VectorizableOverlay::edge_index, "Return a unique index among edges in the graph\n\nC++: bdsg::VectorizableOverlay::edge_index(const struct std::pair &) const --> unsigned long", pybind11::arg("edge")); + cl.def("id_to_rank", (unsigned long (bdsg::VectorizableOverlay::*)(const long long &) const) &bdsg::VectorizableOverlay::id_to_rank, "Return the rank of a node (ranks start at 1)\n\nC++: bdsg::VectorizableOverlay::id_to_rank(const long long &) const --> unsigned long", pybind11::arg("node_id")); + cl.def("rank_to_id", (long long (bdsg::VectorizableOverlay::*)(const unsigned long &) const) &bdsg::VectorizableOverlay::rank_to_id, "Return the node with a given rank\n\nC++: bdsg::VectorizableOverlay::rank_to_id(const unsigned long &) const --> long long", pybind11::arg("rank")); + cl.def("get_underlying_handle", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_underlying_handle, "Returns the handle in the underlying graph that corresponds to a handle in the\n overlay\n\nC++: bdsg::VectorizableOverlay::get_underlying_handle(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); + } +} diff --git a/bdsg/cmake_bindings/bdsg/overlays/strand_split_overlay.cpp b/bdsg/cmake_bindings/bdsg/overlays/strand_split_overlay.cpp index d0b85ad2..f01363a3 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/strand_split_overlay.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/strand_split_overlay.cpp @@ -2,10 +2,10 @@ #include #include #include +#include #include #include // __str__ #include -#include #include #include diff --git a/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays.cpp b/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays.cpp index a2689304..fc41ae48 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays.cpp @@ -3,11 +3,12 @@ #include #include #include +#include #include +#include #include #include // __str__ #include -#include #include #include @@ -28,13 +29,247 @@ PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif -// bdsg::VectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:34 -struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { - using bdsg::VectorizableOverlay::VectorizableOverlay; +// bdsg::PathVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:197 +struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOverlay { + using bdsg::PathVectorizableOverlay::PathVectorizableOverlay; + unsigned long get_path_count() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_count"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_path_count(); + } + bool has_path(const std::string & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_path"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::has_path(a0); + } + struct handlegraph::path_handle_t get_path_handle(const std::string & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_path_handle(a0); + } + std::string get_path_name(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_name"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_path_name(a0); + } + bool get_is_circular(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_circular"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_is_circular(a0); + } + unsigned long get_step_count(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_step_count(a0); + } + struct handlegraph::handle_t get_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle_of_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_handle_of_step(a0); + } + struct handlegraph::path_handle_t get_path_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle_of_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_path_handle_of_step(a0); + } + struct handlegraph::step_handle_t path_begin(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_begin"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::path_begin(a0); + } + struct handlegraph::step_handle_t path_end(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_end"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::path_end(a0); + } + struct handlegraph::step_handle_t path_back(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_back"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::path_back(a0); + } + struct handlegraph::step_handle_t path_front_end(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_front_end"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::path_front_end(a0); + } + bool has_next_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_next_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::has_next_step(a0); + } + bool has_previous_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_previous_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::has_previous_step(a0); + } + struct handlegraph::step_handle_t get_next_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_next_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_next_step(a0); + } + struct handlegraph::step_handle_t get_previous_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_previous_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_previous_step(a0); + } + bool for_each_path_handle_impl(const class std::function & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::for_each_path_handle_impl(a0); + } + bool for_each_step_on_handle_impl(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_on_handle_impl"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::for_each_step_on_handle_impl(a0, a1); + } bool has_node(long long a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -47,7 +282,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } struct handlegraph::handle_t get_handle(const long long & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -60,7 +295,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } long long get_id(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -73,7 +308,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } bool get_is_reverse(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -86,7 +321,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } struct handlegraph::handle_t flip(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -99,7 +334,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } unsigned long get_length(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -112,7 +347,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } std::string get_sequence(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -125,7 +360,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } unsigned long get_degree(const struct handlegraph::handle_t & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -138,7 +373,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } bool has_edge(const struct handlegraph::handle_t & a0, const struct handlegraph::handle_t & a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -151,7 +386,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } char get_base(const struct handlegraph::handle_t & a0, unsigned long a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -164,7 +399,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } std::string get_subsequence(const struct handlegraph::handle_t & a0, unsigned long a1, unsigned long a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -177,7 +412,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } unsigned long get_node_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -190,7 +425,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } long long min_node_id() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -203,7 +438,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } long long max_node_id() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -216,7 +451,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } unsigned long node_vector_offset(const long long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -229,7 +464,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } long long node_at_vector_offset(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -242,7 +477,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } unsigned long edge_index(const struct std::pair & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -255,7 +490,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } unsigned long id_to_rank(const long long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -268,7 +503,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } long long rank_to_id(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -281,7 +516,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } struct handlegraph::handle_t get_underlying_handle(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -294,7 +529,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } void index_nodes_and_edges() override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -307,7 +542,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } unsigned long handle_to_rank(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -320,7 +555,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } struct handlegraph::handle_t rank_to_handle(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -333,7 +568,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } unsigned long get_edge_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -346,7 +581,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } unsigned long get_total_length() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -359,7 +594,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } bool follow_edges_impl(const struct handlegraph::handle_t & a0, bool a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -372,7 +607,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } bool for_each_handle_impl(const class std::function & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -383,15 +618,185 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::for_each_handle_impl\""); } + unsigned long get_step_count(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathHandleGraph::get_step_count(a0); + } + class std::vector steps_of_handle(const struct handlegraph::handle_t & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "steps_of_handle"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference>::value) { + static pybind11::detail::override_caster_t> caster; + return pybind11::detail::cast_ref>(std::move(o), caster); + } + else return pybind11::detail::cast_safe>(std::move(o)); + } + return PathHandleGraph::steps_of_handle(a0, a1); + } + bool is_empty(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "is_empty"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathHandleGraph::is_empty(a0); + } + enum handlegraph::PathSense get_sense(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sense"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_sense(a0); + } + std::string get_sample_name(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sample_name"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_sample_name(a0); + } + std::string get_locus_name(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_locus_name"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_locus_name(a0); + } + unsigned long get_haplotype(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_haplotype"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_haplotype(a0); + } + unsigned long get_phase_block(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_phase_block"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_phase_block(a0); + } + using _binder_ret_0 = struct std::pair; + _binder_ret_0 get_subrange(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subrange"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference<_binder_ret_0>::value) { + static pybind11::detail::override_caster_t<_binder_ret_0> caster; + return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); + } + else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + } + return PathMetadata::get_subrange(a0); + } + bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); + } }; -// bdsg::PathVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:197 -struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOverlay { - using bdsg::PathVectorizableOverlay::PathVectorizableOverlay; +// bdsg::PathPositionVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:292 +struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositionVectorizableOverlay { + using bdsg::PathPositionVectorizableOverlay::PathPositionVectorizableOverlay; + unsigned long get_path_length(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_length"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathPositionVectorizableOverlay::get_path_length(a0); + } + unsigned long get_position_of_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_position_of_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathPositionVectorizableOverlay::get_position_of_step(a0); + } + struct handlegraph::step_handle_t get_step_at_position(const struct handlegraph::path_handle_t & a0, const unsigned long & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_at_position"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathPositionVectorizableOverlay::get_step_at_position(a0, a1); + } unsigned long get_path_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -404,7 +809,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool has_path(const std::string & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_path"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_path"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -417,7 +822,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::path_handle_t get_path_handle(const std::string & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -430,7 +835,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } std::string get_path_name(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_name"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_name"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -443,7 +848,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool get_is_circular(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_circular"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_circular"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -456,7 +861,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_step_count(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -469,7 +874,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::handle_t get_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle_of_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle_of_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -482,7 +887,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::path_handle_t get_path_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle_of_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle_of_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -495,7 +900,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::step_handle_t path_begin(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_begin"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_begin"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -508,7 +913,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::step_handle_t path_end(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_end"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_end"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -521,7 +926,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::step_handle_t path_back(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_back"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_back"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -534,7 +939,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::step_handle_t path_front_end(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_front_end"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_front_end"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -547,7 +952,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool has_next_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_next_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_next_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -560,7 +965,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool has_previous_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_previous_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_previous_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -573,7 +978,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::step_handle_t get_next_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_next_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_next_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -586,7 +991,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::step_handle_t get_previous_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_previous_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_previous_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -599,7 +1004,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool for_each_path_handle_impl(const class std::function & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -612,7 +1017,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool for_each_step_on_handle_impl(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_on_handle_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_on_handle_impl"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -625,7 +1030,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool has_node(long long a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -638,7 +1043,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::handle_t get_handle(const long long & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -651,7 +1056,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long get_id(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -664,7 +1069,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool get_is_reverse(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -677,7 +1082,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::handle_t flip(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -690,7 +1095,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_length(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -703,7 +1108,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } std::string get_sequence(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -716,7 +1121,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_degree(const struct handlegraph::handle_t & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -729,7 +1134,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool has_edge(const struct handlegraph::handle_t & a0, const struct handlegraph::handle_t & a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -742,7 +1147,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } char get_base(const struct handlegraph::handle_t & a0, unsigned long a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -755,7 +1160,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } std::string get_subsequence(const struct handlegraph::handle_t & a0, unsigned long a1, unsigned long a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -768,7 +1173,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_node_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -781,7 +1186,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long min_node_id() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -794,7 +1199,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long max_node_id() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -807,7 +1212,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long node_vector_offset(const long long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -820,7 +1225,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long node_at_vector_offset(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -833,7 +1238,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long edge_index(const struct std::pair & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -846,7 +1251,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long id_to_rank(const long long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -859,7 +1264,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long rank_to_id(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -872,7 +1277,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::handle_t get_underlying_handle(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -885,7 +1290,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } void index_nodes_and_edges() override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -898,7 +1303,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long handle_to_rank(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -911,7 +1316,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::handle_t rank_to_handle(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -924,7 +1329,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_edge_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -937,7 +1342,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_total_length() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -950,7 +1355,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool follow_edges_impl(const struct handlegraph::handle_t & a0, bool a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -963,7 +1368,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool for_each_handle_impl(const class std::function & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -976,7 +1381,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_step_count(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -989,7 +1394,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } class std::vector steps_of_handle(const struct handlegraph::handle_t & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "steps_of_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "steps_of_handle"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference>::value) { @@ -1002,7 +1407,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool is_empty(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "is_empty"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "is_empty"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1015,7 +1420,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } enum handlegraph::PathSense get_sense(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sense"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sense"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1028,7 +1433,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } std::string get_sample_name(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sample_name"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sample_name"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1041,7 +1446,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } std::string get_locus_name(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_locus_name"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_locus_name"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1054,7 +1459,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_haplotype(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_haplotype"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_haplotype"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1067,7 +1472,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_phase_block(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_phase_block"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_phase_block"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1081,7 +1486,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv using _binder_ret_0 = struct std::pair; _binder_ret_0 get_subrange(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subrange"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subrange"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference<_binder_ret_0>::value) { @@ -1094,7 +1499,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1105,37 +1510,23 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); } + bool for_each_step_position_on_handle(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_position_on_handle"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return PathPositionHandleGraph::for_each_step_position_on_handle(a0, a1); + } }; void bind_bdsg_overlays_vectorizable_overlays(std::function< pybind11::module &(std::string const &namespace_) > &M) { - { // bdsg::VectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:34 - pybind11::class_, PyCallBack_bdsg_VectorizableOverlay, handlegraph::VectorizableHandleGraph, handlegraph::ExpandingOverlayGraph> cl(M("bdsg"), "VectorizableOverlay", ""); - cl.def( pybind11::init(), pybind11::arg("graph") ); - - cl.def( pybind11::init( [](){ return new bdsg::VectorizableOverlay(); }, [](){ return new PyCallBack_bdsg_VectorizableOverlay(); } ) ); - cl.def("has_node", (bool (bdsg::VectorizableOverlay::*)(long long) const) &bdsg::VectorizableOverlay::has_node, "Method to check if a node exists by ID\n\nC++: bdsg::VectorizableOverlay::has_node(long long) const --> bool", pybind11::arg("node_id")); - cl.def("get_handle", [](bdsg::VectorizableOverlay const &o, const long long & a0) -> handlegraph::handle_t { return o.get_handle(a0); }, "", pybind11::arg("node_id")); - cl.def("get_handle", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const long long &, bool) const) &bdsg::VectorizableOverlay::get_handle, "Look up the handle for the node with the given ID in the given orientation\n\nC++: bdsg::VectorizableOverlay::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); - cl.def("get_id", (long long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_id, "Get the ID from a handle\n\nC++: bdsg::VectorizableOverlay::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); - cl.def("get_is_reverse", (bool (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_is_reverse, "Get the orientation of a handle\n\nC++: bdsg::VectorizableOverlay::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); - cl.def("flip", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::flip, "Invert the orientation of a handle (potentially without getting its ID)\n\nC++: bdsg::VectorizableOverlay::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); - cl.def("get_length", (unsigned long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_length, "Get the length of a node\n\nC++: bdsg::VectorizableOverlay::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_sequence", (std::string (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_sequence, "Get the sequence of a node, presented in the handle's local forward orientation.\n\nC++: bdsg::VectorizableOverlay::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_degree", (unsigned long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::VectorizableOverlay::get_degree, "Get the number of edges on the right (go_left = false) or left (go_left\n = true) side of the given handle. The default implementation is O(n) in\n the number of edges returned, but graph implementations that track this\n information more efficiently can override this method.\n\nC++: bdsg::VectorizableOverlay::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); - cl.def("has_edge", (bool (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::has_edge, "Returns true if there is an edge that allows traversal from the left\n handle to the right handle. By default O(n) in the number of edges\n on left, but can be overridden with more efficient implementations.\n\nC++: bdsg::VectorizableOverlay::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); - cl.def("get_base", (char (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::VectorizableOverlay::get_base, "Returns one base of a handle's sequence, in the orientation of the\n handle.\n\nC++: bdsg::VectorizableOverlay::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); - cl.def("get_subsequence", (std::string (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::VectorizableOverlay::get_subsequence, "Returns a substring of a handle's sequence, in the orientation of the\n handle. If the indicated substring would extend beyond the end of the\n handle's sequence, the return value is truncated to the sequence's end.\n\nC++: bdsg::VectorizableOverlay::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); - cl.def("get_node_count", (unsigned long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::get_node_count, "Return the number of nodes in the graph\n\nC++: bdsg::VectorizableOverlay::get_node_count() const --> unsigned long"); - cl.def("min_node_id", (long long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::min_node_id, "Return the smallest ID in the graph, or some smaller number if the\n smallest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::VectorizableOverlay::min_node_id() const --> long long"); - cl.def("max_node_id", (long long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::max_node_id, "Return the largest ID in the graph, or some larger number if the\n largest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::VectorizableOverlay::max_node_id() const --> long long"); - cl.def("node_vector_offset", (unsigned long (bdsg::VectorizableOverlay::*)(const long long &) const) &bdsg::VectorizableOverlay::node_vector_offset, "Return the start position of the node in a (possibly implict) sorted array\n constructed from the concatenation of the node sequences\n\nC++: bdsg::VectorizableOverlay::node_vector_offset(const long long &) const --> unsigned long", pybind11::arg("node_id")); - cl.def("node_at_vector_offset", (long long (bdsg::VectorizableOverlay::*)(const unsigned long &) const) &bdsg::VectorizableOverlay::node_at_vector_offset, "Return the node overlapping the given offset in the implicit node vector\n\nC++: bdsg::VectorizableOverlay::node_at_vector_offset(const unsigned long &) const --> long long", pybind11::arg("offset")); - cl.def("edge_index", (unsigned long (bdsg::VectorizableOverlay::*)(const struct std::pair &) const) &bdsg::VectorizableOverlay::edge_index, "Return a unique index among edges in the graph\n\nC++: bdsg::VectorizableOverlay::edge_index(const struct std::pair &) const --> unsigned long", pybind11::arg("edge")); - cl.def("id_to_rank", (unsigned long (bdsg::VectorizableOverlay::*)(const long long &) const) &bdsg::VectorizableOverlay::id_to_rank, "Return the rank of a node (ranks start at 1)\n\nC++: bdsg::VectorizableOverlay::id_to_rank(const long long &) const --> unsigned long", pybind11::arg("node_id")); - cl.def("rank_to_id", (long long (bdsg::VectorizableOverlay::*)(const unsigned long &) const) &bdsg::VectorizableOverlay::rank_to_id, "Return the node with a given rank\n\nC++: bdsg::VectorizableOverlay::rank_to_id(const unsigned long &) const --> long long", pybind11::arg("rank")); - cl.def("get_underlying_handle", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_underlying_handle, "Returns the handle in the underlying graph that corresponds to a handle in the\n overlay\n\nC++: bdsg::VectorizableOverlay::get_underlying_handle(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); - } { // bdsg::PathVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:197 pybind11::class_, PyCallBack_bdsg_PathVectorizableOverlay, bdsg::VectorizableOverlay, handlegraph::PathHandleGraph> cl(M("bdsg"), "PathVectorizableOverlay", ""); cl.def( pybind11::init(), pybind11::arg("path_graph") ); @@ -1158,4 +1549,13 @@ void bind_bdsg_overlays_vectorizable_overlays(std::function< pybind11::module &( cl.def("get_next_step", (struct handlegraph::step_handle_t (bdsg::PathVectorizableOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PathVectorizableOverlay::get_next_step, "Returns a handle to the next step on the path. If the given step is the final step\n of a non-circular path, this method has undefined behavior. In a circular path,\n the \"last\" step will loop around to the \"first\" step.\n\nC++: bdsg::PathVectorizableOverlay::get_next_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); cl.def("get_previous_step", (struct handlegraph::step_handle_t (bdsg::PathVectorizableOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PathVectorizableOverlay::get_previous_step, "Returns a handle to the previous step on the path. If the given step is the first\n step of a non-circular path, this method has undefined behavior. In a circular path,\n it will loop around from the \"first\" step (i.e. the one returned by path_begin) to\n the \"last\" step.\n\nC++: bdsg::PathVectorizableOverlay::get_previous_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); } + { // bdsg::PathPositionVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:292 + pybind11::class_, PyCallBack_bdsg_PathPositionVectorizableOverlay, bdsg::PathVectorizableOverlay, handlegraph::PathPositionHandleGraph> cl(M("bdsg"), "PathPositionVectorizableOverlay", ""); + cl.def( pybind11::init(), pybind11::arg("path_position_graph") ); + + cl.def( pybind11::init( [](){ return new bdsg::PathPositionVectorizableOverlay(); }, [](){ return new PyCallBack_bdsg_PathPositionVectorizableOverlay(); } ) ); + cl.def("get_path_length", (unsigned long (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::PathPositionVectorizableOverlay::get_path_length, "Returns the length of a path measured in bases of sequence.\n\nC++: bdsg::PathPositionVectorizableOverlay::get_path_length(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); + cl.def("get_position_of_step", (unsigned long (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PathPositionVectorizableOverlay::get_position_of_step, "Returns the position along the path of the beginning of this step measured in\n bases of sequence. In a circular path, positions start at the step returned by\n path_begin().\n\nC++: bdsg::PathPositionVectorizableOverlay::get_position_of_step(const struct handlegraph::step_handle_t &) const --> unsigned long", pybind11::arg("step")); + cl.def("get_step_at_position", (struct handlegraph::step_handle_t (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::path_handle_t &, const unsigned long &) const) &bdsg::PathPositionVectorizableOverlay::get_step_at_position, "Returns the step at this position, measured in bases of sequence starting at\n the step returned by path_begin(). If the position is past the end of the\n path, returns path_end().\n\nC++: bdsg::PathPositionVectorizableOverlay::get_step_at_position(const struct handlegraph::path_handle_t &, const unsigned long &) const --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("position")); + } } diff --git a/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays_1.cpp b/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays_1.cpp deleted file mode 100644 index 031399c6..00000000 --- a/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays_1.cpp +++ /dev/null @@ -1,817 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include // __str__ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - - -#ifndef BINDER_PYBIND11_TYPE_CASTER - #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) - PYBIND11_MAKE_OPAQUE(std::shared_ptr) -#endif - -// bdsg::PathPositionVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:292 -struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositionVectorizableOverlay { - using bdsg::PathPositionVectorizableOverlay::PathPositionVectorizableOverlay; - - unsigned long get_path_length(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_length"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathPositionVectorizableOverlay::get_path_length(a0); - } - unsigned long get_position_of_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_position_of_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathPositionVectorizableOverlay::get_position_of_step(a0); - } - struct handlegraph::step_handle_t get_step_at_position(const struct handlegraph::path_handle_t & a0, const unsigned long & a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_at_position"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathPositionVectorizableOverlay::get_step_at_position(a0, a1); - } - unsigned long get_path_count() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_count"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_path_count(); - } - bool has_path(const std::string & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_path"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::has_path(a0); - } - struct handlegraph::path_handle_t get_path_handle(const std::string & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_path_handle(a0); - } - std::string get_path_name(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_name"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_path_name(a0); - } - bool get_is_circular(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_circular"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_is_circular(a0); - } - unsigned long get_step_count(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_step_count(a0); - } - struct handlegraph::handle_t get_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle_of_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_handle_of_step(a0); - } - struct handlegraph::path_handle_t get_path_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle_of_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_path_handle_of_step(a0); - } - struct handlegraph::step_handle_t path_begin(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_begin"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::path_begin(a0); - } - struct handlegraph::step_handle_t path_end(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_end"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::path_end(a0); - } - struct handlegraph::step_handle_t path_back(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_back"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::path_back(a0); - } - struct handlegraph::step_handle_t path_front_end(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_front_end"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::path_front_end(a0); - } - bool has_next_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_next_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::has_next_step(a0); - } - bool has_previous_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_previous_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::has_previous_step(a0); - } - struct handlegraph::step_handle_t get_next_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_next_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_next_step(a0); - } - struct handlegraph::step_handle_t get_previous_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_previous_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_previous_step(a0); - } - bool for_each_path_handle_impl(const class std::function & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::for_each_path_handle_impl(a0); - } - bool for_each_step_on_handle_impl(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_on_handle_impl"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::for_each_step_on_handle_impl(a0, a1); - } - bool has_node(long long a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::has_node(a0); - } - struct handlegraph::handle_t get_handle(const long long & a0, bool a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_handle(a0, a1); - } - long long get_id(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_id(a0); - } - bool get_is_reverse(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_is_reverse(a0); - } - struct handlegraph::handle_t flip(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::flip(a0); - } - unsigned long get_length(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_length(a0); - } - std::string get_sequence(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_sequence(a0); - } - unsigned long get_degree(const struct handlegraph::handle_t & a0, bool a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_degree(a0, a1); - } - bool has_edge(const struct handlegraph::handle_t & a0, const struct handlegraph::handle_t & a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::has_edge(a0, a1); - } - char get_base(const struct handlegraph::handle_t & a0, unsigned long a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_base(a0, a1); - } - std::string get_subsequence(const struct handlegraph::handle_t & a0, unsigned long a1, unsigned long a2) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); - if (overload) { - auto o = overload.operator()(a0, a1, a2); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_subsequence(a0, a1, a2); - } - unsigned long get_node_count() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_node_count(); - } - long long min_node_id() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::min_node_id(); - } - long long max_node_id() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::max_node_id(); - } - unsigned long node_vector_offset(const long long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::node_vector_offset(a0); - } - long long node_at_vector_offset(const unsigned long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::node_at_vector_offset(a0); - } - unsigned long edge_index(const struct std::pair & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::edge_index(a0); - } - unsigned long id_to_rank(const long long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::id_to_rank(a0); - } - long long rank_to_id(const unsigned long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::rank_to_id(a0); - } - struct handlegraph::handle_t get_underlying_handle(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_underlying_handle(a0); - } - void index_nodes_and_edges() override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::index_nodes_and_edges(); - } - unsigned long handle_to_rank(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return RankedHandleGraph::handle_to_rank(a0); - } - struct handlegraph::handle_t rank_to_handle(const unsigned long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return RankedHandleGraph::rank_to_handle(a0); - } - unsigned long get_edge_count() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return HandleGraph::get_edge_count(); - } - unsigned long get_total_length() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return HandleGraph::get_total_length(); - } - bool follow_edges_impl(const struct handlegraph::handle_t & a0, bool a1, const class std::function & a2) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); - if (overload) { - auto o = overload.operator()(a0, a1, a2); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::follow_edges_impl\""); - } - bool for_each_handle_impl(const class std::function & a0, bool a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::for_each_handle_impl\""); - } - unsigned long get_step_count(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathHandleGraph::get_step_count(a0); - } - class std::vector steps_of_handle(const struct handlegraph::handle_t & a0, bool a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "steps_of_handle"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference>::value) { - static pybind11::detail::override_caster_t> caster; - return pybind11::detail::cast_ref>(std::move(o), caster); - } - else return pybind11::detail::cast_safe>(std::move(o)); - } - return PathHandleGraph::steps_of_handle(a0, a1); - } - bool is_empty(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "is_empty"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathHandleGraph::is_empty(a0); - } - enum handlegraph::PathSense get_sense(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sense"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_sense(a0); - } - std::string get_sample_name(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sample_name"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_sample_name(a0); - } - std::string get_locus_name(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_locus_name"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_locus_name(a0); - } - unsigned long get_haplotype(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_haplotype"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_haplotype(a0); - } - unsigned long get_phase_block(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_phase_block"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_phase_block(a0); - } - using _binder_ret_0 = struct std::pair; - _binder_ret_0 get_subrange(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subrange"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference<_binder_ret_0>::value) { - static pybind11::detail::override_caster_t<_binder_ret_0> caster; - return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); - } - else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); - } - return PathMetadata::get_subrange(a0); - } - bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); - if (overload) { - auto o = overload.operator()(a0, a1, a2); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); - } - bool for_each_step_position_on_handle(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_position_on_handle"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - else return pybind11::detail::cast_safe(std::move(o)); - } - return PathPositionHandleGraph::for_each_step_position_on_handle(a0, a1); - } -}; - -void bind_bdsg_overlays_vectorizable_overlays_1(std::function< pybind11::module &(std::string const &namespace_) > &M) -{ - { // bdsg::PathPositionVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:292 - pybind11::class_, PyCallBack_bdsg_PathPositionVectorizableOverlay, bdsg::PathVectorizableOverlay, handlegraph::PathPositionHandleGraph> cl(M("bdsg"), "PathPositionVectorizableOverlay", ""); - cl.def( pybind11::init(), pybind11::arg("path_position_graph") ); - - cl.def( pybind11::init( [](){ return new bdsg::PathPositionVectorizableOverlay(); }, [](){ return new PyCallBack_bdsg_PathPositionVectorizableOverlay(); } ) ); - cl.def("get_path_length", (unsigned long (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::PathPositionVectorizableOverlay::get_path_length, "Returns the length of a path measured in bases of sequence.\n\nC++: bdsg::PathPositionVectorizableOverlay::get_path_length(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); - cl.def("get_position_of_step", (unsigned long (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PathPositionVectorizableOverlay::get_position_of_step, "Returns the position along the path of the beginning of this step measured in\n bases of sequence. In a circular path, positions start at the step returned by\n path_begin().\n\nC++: bdsg::PathPositionVectorizableOverlay::get_position_of_step(const struct handlegraph::step_handle_t &) const --> unsigned long", pybind11::arg("step")); - cl.def("get_step_at_position", (struct handlegraph::step_handle_t (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::path_handle_t &, const unsigned long &) const) &bdsg::PathPositionVectorizableOverlay::get_step_at_position, "Returns the step at this position, measured in bases of sequence starting at\n the step returned by path_begin(). If the position is past the end of the\n path, returns path_end().\n\nC++: bdsg::PathPositionVectorizableOverlay::get_step_at_position(const struct handlegraph::path_handle_t &, const unsigned long &) const --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("position")); - } -} diff --git a/bdsg/cmake_bindings/bdsg/packed_graph.cpp b/bdsg/cmake_bindings/bdsg/packed_graph.cpp index b45fcb40..54d20fe2 100644 --- a/bdsg/cmake_bindings/bdsg/packed_graph.cpp +++ b/bdsg/cmake_bindings/bdsg/packed_graph.cpp @@ -10,12 +10,12 @@ #include #include #include +#include #include #include #include // __str__ #include #include -#include #include #include #include @@ -42,16 +42,16 @@ struct PyCallBack_bdsg_PackedGraph : public bdsg::PackedGraph { using bdsg::PackedGraph::PackedGraph; - class bdsg::BasePackedGraph<> * get() override { + class bdsg::BasePackedGraph * get() override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "get"); if (overload) { auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference *>::value) { - static pybind11::detail::override_caster_t *> caster; - return pybind11::detail::cast_ref *>(std::move(o), caster); + if (pybind11::detail::cast_is_temporary_value_reference *>::value) { + static pybind11::detail::override_caster_t *> caster; + return pybind11::detail::cast_ref *>(std::move(o), caster); } - else return pybind11::detail::cast_safe *>(std::move(o)); + else return pybind11::detail::cast_safe *>(std::move(o)); } return PackedGraph::get(); } @@ -810,6 +810,19 @@ struct PyCallBack_bdsg_PackedGraph : public bdsg::PackedGraph { } return GraphProxy::destroy_path(a0); } + void destroy_paths(const class std::vector & a0) override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "destroy_paths"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return GraphProxy::destroy_paths(a0); + } struct handlegraph::path_handle_t create_path_handle(const std::string & a0, bool a1) override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "create_path_handle"); @@ -1845,6 +1858,19 @@ struct PyCallBack_bdsg_MappedPackedGraph : public bdsg::MappedPackedGraph { } return GraphProxy::destroy_path(a0); } + void destroy_paths(const class std::vector & a0) override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "destroy_paths"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return GraphProxy::destroy_paths(a0); + } struct handlegraph::path_handle_t create_path_handle(const std::string & a0, bool a1) override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "create_path_handle"); @@ -2046,7 +2072,7 @@ struct PyCallBack_bdsg_MappedPackedGraph : public bdsg::MappedPackedGraph { void bind_bdsg_packed_graph(std::function< pybind11::module &(std::string const &namespace_) > &M) { { // bdsg::PackedGraph file:bdsg/packed_graph.hpp line:27 - pybind11::class_, PyCallBack_bdsg_PackedGraph, bdsg::GraphProxy>> cl(M("bdsg"), "PackedGraph", ""); + pybind11::class_, PyCallBack_bdsg_PackedGraph, bdsg::GraphProxy>> cl(M("bdsg"), "PackedGraph", ""); cl.def( pybind11::init( [](){ return new bdsg::PackedGraph(); }, [](){ return new PyCallBack_bdsg_PackedGraph(); } ) ); cl.def( pybind11::init( [](PyCallBack_bdsg_PackedGraph const &o){ return new PyCallBack_bdsg_PackedGraph(o); } ) ); cl.def( pybind11::init( [](bdsg::PackedGraph const &o){ return new bdsg::PackedGraph(o); } ) ); diff --git a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp index 1298fde7..f93117d7 100644 --- a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp +++ b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp @@ -6,12 +6,12 @@ #include #include #include +#include #include #include #include // __str__ #include #include -#include #include #include @@ -473,6 +473,9 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("distance_in_parent", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0, const struct handlegraph::net_handle_t & a1, const struct handlegraph::net_handle_t & a2) -> unsigned long { return o.distance_in_parent(a0, a1, a2); }, "", pybind11::arg("parent"), pybind11::arg("child1"), pybind11::arg("child2")); cl.def("distance_in_parent", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0, const struct handlegraph::net_handle_t & a1, const struct handlegraph::net_handle_t & a2, const class handlegraph::HandleGraph * a3) -> unsigned long { return o.distance_in_parent(a0, a1, a2, a3); }, "", pybind11::arg("parent"), pybind11::arg("child1"), pybind11::arg("child2"), pybind11::arg("graph")); cl.def("distance_in_parent", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &, const class handlegraph::HandleGraph *, unsigned long) const) &bdsg::SnarlDistanceIndex::distance_in_parent, "C++: bdsg::SnarlDistanceIndex::distance_in_parent(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &, const class handlegraph::HandleGraph *, unsigned long) const --> unsigned long", pybind11::arg("parent"), pybind11::arg("child1"), pybind11::arg("child2"), pybind11::arg("graph"), pybind11::arg("distance_limit")); + cl.def("distance_in_snarl", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0, const unsigned long & a1, const bool & a2, const unsigned long & a3, const bool & a4) -> unsigned long { return o.distance_in_snarl(a0, a1, a2, a3, a4); }, "", pybind11::arg("parent"), pybind11::arg("rank1"), pybind11::arg("right_side1"), pybind11::arg("rank2"), pybind11::arg("right_side2")); + cl.def("distance_in_snarl", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0, const unsigned long & a1, const bool & a2, const unsigned long & a3, const bool & a4, const class handlegraph::HandleGraph * a5) -> unsigned long { return o.distance_in_snarl(a0, a1, a2, a3, a4, a5); }, "", pybind11::arg("parent"), pybind11::arg("rank1"), pybind11::arg("right_side1"), pybind11::arg("rank2"), pybind11::arg("right_side2"), pybind11::arg("graph")); + cl.def("distance_in_snarl", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const unsigned long &, const bool &, const unsigned long &, const bool &, const class handlegraph::HandleGraph *, unsigned long) const) &bdsg::SnarlDistanceIndex::distance_in_snarl, "C++: bdsg::SnarlDistanceIndex::distance_in_snarl(const struct handlegraph::net_handle_t &, const unsigned long &, const bool &, const unsigned long &, const bool &, const class handlegraph::HandleGraph *, unsigned long) const --> unsigned long", pybind11::arg("parent"), pybind11::arg("rank1"), pybind11::arg("right_side1"), pybind11::arg("rank2"), pybind11::arg("right_side2"), pybind11::arg("graph"), pybind11::arg("distance_limit")); cl.def("max_distance_in_parent", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0, const struct handlegraph::net_handle_t & a1, const struct handlegraph::net_handle_t & a2) -> unsigned long { return o.max_distance_in_parent(a0, a1, a2); }, "", pybind11::arg("parent"), pybind11::arg("child1"), pybind11::arg("child2")); cl.def("max_distance_in_parent", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0, const struct handlegraph::net_handle_t & a1, const struct handlegraph::net_handle_t & a2, const class handlegraph::HandleGraph * a3) -> unsigned long { return o.max_distance_in_parent(a0, a1, a2, a3); }, "", pybind11::arg("parent"), pybind11::arg("child1"), pybind11::arg("child2"), pybind11::arg("graph")); cl.def("max_distance_in_parent", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &, const class handlegraph::HandleGraph *, unsigned long) const) &bdsg::SnarlDistanceIndex::max_distance_in_parent, "Find the maximum distance between two children in the parent. \nThis is the same as distance_in_parent for everything except children of chains\n\nC++: bdsg::SnarlDistanceIndex::max_distance_in_parent(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &, const class handlegraph::HandleGraph *, unsigned long) const --> unsigned long", pybind11::arg("parent"), pybind11::arg("child1"), pybind11::arg("child2"), pybind11::arg("graph"), pybind11::arg("distance_limit")); @@ -499,16 +502,20 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("get_handle_from_connected_component", (struct handlegraph::net_handle_t (bdsg::SnarlDistanceIndex::*)(unsigned long) const) &bdsg::SnarlDistanceIndex::get_handle_from_connected_component, "Given the connected component number (from get_connected_component_number), get the\nroot-level handle pointing to it.\nIf the connected component is a root-level snarl, then this may return a \"root\" handle,\nbut it will actually point to the snarl\n\nC++: bdsg::SnarlDistanceIndex::get_handle_from_connected_component(unsigned long) const --> struct handlegraph::net_handle_t", pybind11::arg("num")); cl.def("has_connectivity", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, enum handlegraph::SnarlDecomposition::endpoint_t, enum handlegraph::SnarlDecomposition::endpoint_t) const) &bdsg::SnarlDistanceIndex::has_connectivity, "Is there a path between the start and end endpoints within the net handle?\n\nC++: bdsg::SnarlDistanceIndex::has_connectivity(const struct handlegraph::net_handle_t &, enum handlegraph::SnarlDecomposition::endpoint_t, enum handlegraph::SnarlDecomposition::endpoint_t) const --> bool", pybind11::arg("net"), pybind11::arg("start"), pybind11::arg("end")); cl.def("has_external_connectivity", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, enum handlegraph::SnarlDecomposition::endpoint_t, enum handlegraph::SnarlDecomposition::endpoint_t) const) &bdsg::SnarlDistanceIndex::has_external_connectivity, "Is there a path between the start and end endpoints outside the net handle?\nThis is used for children of the root\n\nC++: bdsg::SnarlDistanceIndex::has_external_connectivity(const struct handlegraph::net_handle_t &, enum handlegraph::SnarlDecomposition::endpoint_t, enum handlegraph::SnarlDecomposition::endpoint_t) const --> bool", pybind11::arg("net"), pybind11::arg("start"), pybind11::arg("end")); - cl.def("get_prefix_sum_value", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t) const) &bdsg::SnarlDistanceIndex::get_prefix_sum_value, "Get the prefix sum value for a node in a chain.\nFails if the parent of net is not a chain\n\nC++: bdsg::SnarlDistanceIndex::get_prefix_sum_value(const struct handlegraph::net_handle_t) const --> unsigned long", pybind11::arg("net")); - cl.def("get_forward_loop_value", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t) const) &bdsg::SnarlDistanceIndex::get_forward_loop_value, "Get the prefix sum value for a node in a chain.\nFails if the parent of net is not a chain\n\nC++: bdsg::SnarlDistanceIndex::get_forward_loop_value(const struct handlegraph::net_handle_t) const --> unsigned long", pybind11::arg("net")); - cl.def("get_reverse_loop_value", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t) const) &bdsg::SnarlDistanceIndex::get_reverse_loop_value, "Get the prefix sum value for a node in a chain.\nFails if the parent of net is not a chain\n\nC++: bdsg::SnarlDistanceIndex::get_reverse_loop_value(const struct handlegraph::net_handle_t) const --> unsigned long", pybind11::arg("net")); + cl.def("get_prefix_sum_value", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_prefix_sum_value, "Get the prefix sum value for a node in a chain.\nFails if the parent of net is not a chain\n\nC++: bdsg::SnarlDistanceIndex::get_prefix_sum_value(const struct handlegraph::net_handle_t &) const --> unsigned long", pybind11::arg("net")); + cl.def("get_max_prefix_sum_value", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_max_prefix_sum_value, "Get the maximum prefix sum value for a node in a chain.\nFails if the parent of net is not a chain\n\nC++: bdsg::SnarlDistanceIndex::get_max_prefix_sum_value(const struct handlegraph::net_handle_t &) const --> unsigned long", pybind11::arg("net")); + cl.def("get_forward_loop_value", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_forward_loop_value, "Get the forward loop value for a node in a chain.\nFails if the parent of net is not a chain\n\nC++: bdsg::SnarlDistanceIndex::get_forward_loop_value(const struct handlegraph::net_handle_t &) const --> unsigned long", pybind11::arg("net")); + cl.def("get_reverse_loop_value", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_reverse_loop_value, "Get the reverse value for a node in a chain.\nFails if the parent of net is not a chain\n\nC++: bdsg::SnarlDistanceIndex::get_reverse_loop_value(const struct handlegraph::net_handle_t &) const --> unsigned long", pybind11::arg("net")); cl.def("get_chain_component", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0) -> unsigned long { return o.get_chain_component(a0); }, "", pybind11::arg("net")); - cl.def("get_chain_component", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t, bool) const) &bdsg::SnarlDistanceIndex::get_chain_component, "C++: bdsg::SnarlDistanceIndex::get_chain_component(const struct handlegraph::net_handle_t, bool) const --> unsigned long", pybind11::arg("net"), pybind11::arg("get_end")); + cl.def("get_chain_component", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, bool) const) &bdsg::SnarlDistanceIndex::get_chain_component, "C++: bdsg::SnarlDistanceIndex::get_chain_component(const struct handlegraph::net_handle_t &, bool) const --> unsigned long", pybind11::arg("net"), pybind11::arg("get_end")); cl.def("get_root", (struct handlegraph::net_handle_t (bdsg::SnarlDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::get_root, "Get a net handle referring to a tip-to-tip traversal of the contents of the root snarl.\n\nC++: bdsg::SnarlDistanceIndex::get_root() const --> struct handlegraph::net_handle_t"); cl.def("is_root", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_root, "Return true if the given handle refers to (a traversal of) the root\nsnarl, and false otherwise.\n\nC++: bdsg::SnarlDistanceIndex::is_root(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_root_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_root_snarl, "Return true if the given handle refers to (a traversal of) a snarl of the root,\nwhich is considered to be the root but actually refers to a subset of the children \nof the root that are connected\n\nC++: bdsg::SnarlDistanceIndex::is_root_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_snarl, "Returns true if the given net handle refers to (a traversal of) a snarl.\n\nC++: bdsg::SnarlDistanceIndex::is_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); - cl.def("is_simple_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_simple_snarl, "Returns true if the given net handle refers to (a traversal of) a simple snarl\nA simple snarl is a bubble where each child node can only reach the boundary nodes,\nand each side of a node reaches a different boundary node\n\nC++: bdsg::SnarlDistanceIndex::is_simple_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); + cl.def("is_dag", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_dag, "Return true if the given snarl is a DAG and false otherwise\nReturns true if the given net_handle_t is not a snarl\n\nC++: bdsg::SnarlDistanceIndex::is_dag(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("snarl")); + cl.def("non_dag_edge_count", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const class handlegraph::HandleGraph *) const) &bdsg::SnarlDistanceIndex::non_dag_edge_count, "Given a snarl, return the number of non-dag edges it contains\n0 for a dag\n\nC++: bdsg::SnarlDistanceIndex::non_dag_edge_count(const struct handlegraph::net_handle_t &, const class handlegraph::HandleGraph *) const --> unsigned long", pybind11::arg("snarl"), pybind11::arg("graph")); + cl.def("is_simple_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_simple_snarl, "Returns true if the given net handle refers to (a traversal of) a simple snarl\nA simple snarl is a bubble where each child node can only reach the boundary nodes,\nand each side of a node reaches a different boundary node\nThere may also be an edge connecting the two boundary nodes but no additional \nedges are allowed\n\nC++: bdsg::SnarlDistanceIndex::is_simple_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); + cl.def("is_regular_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_regular_snarl, "Returns true if the given net handle refers to (a traversal of) a regular snarl\nA regular snarl is the same as a simple snarl, except that the children may be\nnested chains, rather than being restricted to nodes \n\nC++: bdsg::SnarlDistanceIndex::is_regular_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_chain, "Returns true if the given net handle refers to (a traversal of) a chain.\n\nC++: bdsg::SnarlDistanceIndex::is_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_multicomponent_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_multicomponent_chain, "Returns true if the given net handle refers to (a traversal of) a chain that is not start-end connected\n\nC++: bdsg::SnarlDistanceIndex::is_multicomponent_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_looping_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_looping_chain, "Returns true if the given net handle refers to (a traversal of) a chain that loops (a chain where the first and last node are the same).\n\nC++: bdsg::SnarlDistanceIndex::is_looping_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); @@ -527,7 +534,9 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("ends_at", (enum handlegraph::SnarlDecomposition::endpoint_t (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::ends_at, "Return the kind of location at which the given traversal ends.\n\nC++: bdsg::SnarlDistanceIndex::ends_at(const struct handlegraph::net_handle_t &) const --> enum handlegraph::SnarlDecomposition::endpoint_t", pybind11::arg("traversal")); cl.def("get_rank_in_parent", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_rank_in_parent, "For a child of a snarl, the rank is used to calculate the distance\n\nC++: bdsg::SnarlDistanceIndex::get_rank_in_parent(const struct handlegraph::net_handle_t &) const --> unsigned long", pybind11::arg("net")); cl.def("connected_component_count", (unsigned long (bdsg::SnarlDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::connected_component_count, "How many connected components are in this graph?\nThis returns the number of topological connected components, not necessarily the \nnumber of nodes in the top-level snarl \n\nC++: bdsg::SnarlDistanceIndex::connected_component_count() const --> unsigned long"); + cl.def("get_snarl_child_from_rank", (struct handlegraph::net_handle_t (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const unsigned long &) const) &bdsg::SnarlDistanceIndex::get_snarl_child_from_rank, "Get the child of a snarl from its rank. This shouldn't be exposed to the public interface but I need it\nPlease don't use it\nFor 0 or 1, returns the sentinel facing in. Otherwise return the child as a chain going START_END\n\nC++: bdsg::SnarlDistanceIndex::get_snarl_child_from_rank(const struct handlegraph::net_handle_t &, const unsigned long &) const --> struct handlegraph::net_handle_t", pybind11::arg("snarl"), pybind11::arg("rank")); cl.def("get_parent_traversal", (struct handlegraph::net_handle_t (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_parent_traversal, "Get a net handle for traversals of a snarl or chain that contains\nthe given oriented bounding node traversals or sentinels. Given two\nsentinels for a snarl, produces a net handle to a start-to-end,\nend-to-end, end-to-start, or start-to-start traversal of that snarl.\nGiven handles to traversals of the bounding nodes of a chain, similarly\nproduces a net handle to a traversal of the chain.\n\nFor a chain, either or both handles can also be a snarl containing tips,\nfor a tip-to-start, tip-to-end, start-to-tip, end-to-tip, or tip-to-tip\ntraversal. Similarly, for a snarl, either or both handles can be a chain\nin the snarl that contains internal tips, or that has no edges on the\nappropriate end.\n\nMay only be called if a path actually exists between the given start\nand end.\n\nC++: bdsg::SnarlDistanceIndex::get_parent_traversal(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &) const --> struct handlegraph::net_handle_t", pybind11::arg("traversal_start"), pybind11::arg("traversal_end")); + cl.def_static("has_distances", (const bool (*)(enum bdsg::SnarlDistanceIndex::record_t)) &bdsg::SnarlDistanceIndex::has_distances, "C++: bdsg::SnarlDistanceIndex::has_distances(enum bdsg::SnarlDistanceIndex::record_t) --> const bool", pybind11::arg("type")); cl.def_static("get_record_handle_type", (const enum bdsg::SnarlDistanceIndex::net_handle_record_t (*)(enum bdsg::SnarlDistanceIndex::record_t)) &bdsg::SnarlDistanceIndex::get_record_handle_type, "Given the type of the record, return the handle type. Some record types can represent multiple things,\nfor example a simple snarl record is used to represent a snarl, and the nodes/trivial chains in it.\nThis will return whatever is higher on the snarl tree. A simple snarl will be considered a snarl,\na root snarl will be considered a root, etc\n\nC++: bdsg::SnarlDistanceIndex::get_record_handle_type(enum bdsg::SnarlDistanceIndex::record_t) --> const enum bdsg::SnarlDistanceIndex::net_handle_record_t", pybind11::arg("type")); cl.def_static("get_record_offset", (const unsigned long (*)(const struct handlegraph::net_handle_t &)) &bdsg::SnarlDistanceIndex::get_record_offset, "The offset into records that this handle points to\n\nC++: bdsg::SnarlDistanceIndex::get_record_offset(const struct handlegraph::net_handle_t &) --> const unsigned long", pybind11::arg("net_handle")); cl.def_static("get_node_record_offset", (const unsigned long (*)(const struct handlegraph::net_handle_t &)) &bdsg::SnarlDistanceIndex::get_node_record_offset, "The offset of a node in a trivial snarl (0 if it isn't a node in a trivial snarl)\n\nC++: bdsg::SnarlDistanceIndex::get_node_record_offset(const struct handlegraph::net_handle_t &) --> const unsigned long", pybind11::arg("net_handle")); @@ -545,6 +554,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def_static("get_end_endpoint", (const enum handlegraph::SnarlDecomposition::endpoint_t (*)(const struct handlegraph::net_handle_t &)) &bdsg::SnarlDistanceIndex::get_end_endpoint, "C++: bdsg::SnarlDistanceIndex::get_end_endpoint(const struct handlegraph::net_handle_t &) --> const enum handlegraph::SnarlDecomposition::endpoint_t", pybind11::arg("net")); cl.def_static("connectivity_to_endpoints", (const struct std::pair (*)(const enum bdsg::SnarlDistanceIndex::connectivity_t &)) &bdsg::SnarlDistanceIndex::connectivity_to_endpoints, "C++: bdsg::SnarlDistanceIndex::connectivity_to_endpoints(const enum bdsg::SnarlDistanceIndex::connectivity_t &) --> const struct std::pair", pybind11::arg("connectivity")); cl.def("set_snarl_size_limit", (void (bdsg::SnarlDistanceIndex::*)(unsigned long)) &bdsg::SnarlDistanceIndex::set_snarl_size_limit, "C++: bdsg::SnarlDistanceIndex::set_snarl_size_limit(unsigned long) --> void", pybind11::arg("size")); + cl.def("set_only_top_level_chain_distances", (void (bdsg::SnarlDistanceIndex::*)(bool)) &bdsg::SnarlDistanceIndex::set_only_top_level_chain_distances, "C++: bdsg::SnarlDistanceIndex::set_only_top_level_chain_distances(bool) --> void", pybind11::arg("only_chain")); cl.def("net_handle_as_string", (std::string (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::net_handle_as_string, "C++: bdsg::SnarlDistanceIndex::net_handle_as_string(const struct handlegraph::net_handle_t &) const --> std::string", pybind11::arg("net")); cl.def("traverse_decomposition", (bool (bdsg::SnarlDistanceIndex::*)(const class std::function &, const class std::function &, const class std::function &) const) &bdsg::SnarlDistanceIndex::traverse_decomposition, "C++: bdsg::SnarlDistanceIndex::traverse_decomposition(const class std::function &, const class std::function &, const class std::function &) const --> bool", pybind11::arg("snarl_iteratee"), pybind11::arg("chain_iteratee"), pybind11::arg("node_iteratee")); cl.def("traverse_decomposition_helper", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const class std::function &, const class std::function &, const class std::function &) const) &bdsg::SnarlDistanceIndex::traverse_decomposition_helper, "C++: bdsg::SnarlDistanceIndex::traverse_decomposition_helper(const struct handlegraph::net_handle_t &, const class std::function &, const class std::function &, const class std::function &) const --> bool", pybind11::arg("net"), pybind11::arg("snarl_iteratee"), pybind11::arg("chain_iteratee"), pybind11::arg("node_iteratee")); @@ -562,7 +572,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def_static("bit_width", (unsigned long (*)(unsigned long)) &bdsg::SnarlDistanceIndex::bit_width, "C++: bdsg::SnarlDistanceIndex::bit_width(unsigned long) --> unsigned long", pybind11::arg("value")); cl.def("time_accesses", (void (bdsg::SnarlDistanceIndex::*)()) &bdsg::SnarlDistanceIndex::time_accesses, "C++: bdsg::SnarlDistanceIndex::time_accesses() --> void"); - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex file:bdsg/snarl_distance_index.hpp line:1430 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex file:bdsg/snarl_distance_index.hpp line:1480 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "TemporaryDistanceIndex", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex(); } ) ); @@ -581,9 +591,8 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def_readwrite("use_oversized_snarls", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::use_oversized_snarls); cl.def("structure_start_end_as_string", (std::string (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)(struct std::pair) const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::structure_start_end_as_string, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::structure_start_end_as_string(struct std::pair) const --> std::string", pybind11::arg("index")); cl.def("get_max_record_length", (unsigned long (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length() const --> unsigned long"); - cl.def("assign", (class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)(const class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::operator=(const class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &) --> class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &", pybind11::return_value_policy::automatic, pybind11::arg("")); - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1448 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1498 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "TemporaryRecord", ""); cl.def( pybind11::init( [](bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord const &o){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord(o); } ) ); @@ -591,73 +600,73 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1450 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1500 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryChainRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord(); } ) ); cl.def( pybind11::init( [](bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord const &o){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord(o); } ) ); cl.def_readwrite("start_node_id", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::start_node_id); - cl.def_readwrite("start_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::start_node_rev); cl.def_readwrite("end_node_id", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::end_node_id); - cl.def_readwrite("end_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::end_node_rev); cl.def_readwrite("end_node_length", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::end_node_length); cl.def_readwrite("tree_depth", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::tree_depth); cl.def_readwrite("parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::parent); cl.def_readwrite("min_length", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::min_length); cl.def_readwrite("max_length", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::max_length); - cl.def_readwrite("children", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::children); - cl.def_readwrite("prefix_sum", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::prefix_sum); - cl.def_readwrite("max_prefix_sum", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::max_prefix_sum); - cl.def_readwrite("forward_loops", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::forward_loops); - cl.def_readwrite("backward_loops", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::backward_loops); - cl.def_readwrite("chain_components", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::chain_components); cl.def_readwrite("distance_left_start", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::distance_left_start); cl.def_readwrite("distance_right_start", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::distance_right_start); cl.def_readwrite("distance_left_end", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::distance_left_end); cl.def_readwrite("distance_right_end", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::distance_right_end); cl.def_readwrite("rank_in_parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::rank_in_parent); + cl.def_readwrite("root_snarl_index", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::root_snarl_index); + cl.def_readwrite("start_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::start_node_rev); + cl.def_readwrite("end_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::end_node_rev); cl.def_readwrite("reversed_in_parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::reversed_in_parent); cl.def_readwrite("is_trivial", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::is_trivial); cl.def_readwrite("is_tip", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::is_tip); - cl.def_readwrite("root_snarl_index", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::root_snarl_index); cl.def_readwrite("loopable", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::loopable); - cl.def("get_max_record_length", (unsigned long (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::*)() const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::get_max_record_length() const --> unsigned long"); - cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def_readwrite("children", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::children); + cl.def_readwrite("prefix_sum", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::prefix_sum); + cl.def_readwrite("max_prefix_sum", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::max_prefix_sum); + cl.def_readwrite("forward_loops", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::forward_loops); + cl.def_readwrite("backward_loops", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::backward_loops); + cl.def_readwrite("chain_components", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::chain_components); + cl.def("get_max_record_length", (unsigned long (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::*)(bool) const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::get_max_record_length(bool) const --> unsigned long", pybind11::arg("include_distances")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1485 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1540 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporarySnarlRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord(); } ) ); cl.def( pybind11::init( [](bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord const &o){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord(o); } ) ); + cl.def_readwrite("parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::parent); cl.def_readwrite("start_node_id", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::start_node_id); - cl.def_readwrite("start_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::start_node_rev); cl.def_readwrite("start_node_length", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::start_node_length); cl.def_readwrite("end_node_id", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::end_node_id); - cl.def_readwrite("end_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::end_node_rev); cl.def_readwrite("end_node_length", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::end_node_length); cl.def_readwrite("node_count", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::node_count); cl.def_readwrite("min_length", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::min_length); cl.def_readwrite("max_length", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::max_length); cl.def_readwrite("max_distance", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::max_distance); cl.def_readwrite("tree_depth", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::tree_depth); - cl.def_readwrite("parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::parent); - cl.def_readwrite("children", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::children); - cl.def_readwrite("tippy_child_ranks", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::tippy_child_ranks); - cl.def_readwrite("distances", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::distances); cl.def_readwrite("distance_start_start", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::distance_start_start); cl.def_readwrite("distance_end_end", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::distance_end_end); cl.def_readwrite("rank_in_parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::rank_in_parent); cl.def_readwrite("reversed_in_parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::reversed_in_parent); + cl.def_readwrite("start_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::start_node_rev); + cl.def_readwrite("end_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::end_node_rev); cl.def_readwrite("is_trivial", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::is_trivial); cl.def_readwrite("is_simple", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::is_simple); cl.def_readwrite("is_tip", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::is_tip); cl.def_readwrite("is_root_snarl", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::is_root_snarl); + cl.def_readwrite("include_distances", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::include_distances); + cl.def_readwrite("children", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::children); + cl.def_readwrite("tippy_child_ranks", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::tippy_child_ranks); + cl.def_readwrite("distances", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::distances); cl.def("get_max_record_length", (unsigned long (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::*)() const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::get_max_record_length() const --> unsigned long"); cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1515 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1572 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryNodeRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord(); } ) ); @@ -666,15 +675,14 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def_readwrite("parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::parent); cl.def_readwrite("node_length", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::node_length); cl.def_readwrite("rank_in_parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::rank_in_parent); - cl.def_readwrite("reversed_in_parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::reversed_in_parent); - cl.def_readwrite("is_tip", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::is_tip); cl.def_readwrite("root_snarl_index", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::root_snarl_index); cl.def_readwrite("distance_left_start", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::distance_left_start); cl.def_readwrite("distance_right_start", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::distance_right_start); cl.def_readwrite("distance_left_end", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::distance_left_end); cl.def_readwrite("distance_right_end", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::distance_right_end); + cl.def_readwrite("reversed_in_parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::reversed_in_parent); + cl.def_readwrite("is_tip", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::is_tip); cl.def_static("get_max_record_length", (const unsigned long (*)()) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::get_max_record_length() --> const unsigned long"); - cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } } diff --git a/bdsg/cmake_bindings/handlegraph/expanding_overlay_graph.cpp b/bdsg/cmake_bindings/handlegraph/expanding_overlay_graph.cpp index 2dd9d962..9635efa5 100644 --- a/bdsg/cmake_bindings/handlegraph/expanding_overlay_graph.cpp +++ b/bdsg/cmake_bindings/handlegraph/expanding_overlay_graph.cpp @@ -2,10 +2,10 @@ #include #include #include +#include #include #include // __str__ #include -#include #include #include diff --git a/bdsg/cmake_bindings/handlegraph/handle_graph.cpp b/bdsg/cmake_bindings/handlegraph/handle_graph.cpp index 917df700..e87f9833 100644 --- a/bdsg/cmake_bindings/handlegraph/handle_graph.cpp +++ b/bdsg/cmake_bindings/handlegraph/handle_graph.cpp @@ -1,10 +1,10 @@ #include #include #include +#include #include #include // __str__ #include -#include #include #include diff --git a/bdsg/cmake_bindings/handlegraph/mutable_path_metadata.cpp b/bdsg/cmake_bindings/handlegraph/mutable_path_metadata.cpp index 33a0986b..db0cf841 100644 --- a/bdsg/cmake_bindings/handlegraph/mutable_path_metadata.cpp +++ b/bdsg/cmake_bindings/handlegraph/mutable_path_metadata.cpp @@ -6,10 +6,10 @@ #include #include #include +#include #include #include // __str__ #include -#include #include #include @@ -223,6 +223,19 @@ struct PyCallBack_handlegraph_MutablePathHandleGraph : public handlegraph::Mutab } pybind11::pybind11_fail("Tried to call pure virtual function \"MutablePathHandleGraph::destroy_path\""); } + void destroy_paths(const class std::vector & a0) override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "destroy_paths"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return MutablePathHandleGraph::destroy_paths(a0); + } struct handlegraph::path_handle_t create_path_handle(const std::string & a0, bool a1) override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "create_path_handle"); @@ -1340,6 +1353,7 @@ void bind_handlegraph_mutable_path_metadata(std::function< pybind11::module &(st cl.def( pybind11::init( [](){ return new PyCallBack_handlegraph_MutablePathHandleGraph(); } ) ); cl.def(pybind11::init()); cl.def("destroy_path", (void (handlegraph::MutablePathHandleGraph::*)(const struct handlegraph::path_handle_t &)) &handlegraph::MutablePathHandleGraph::destroy_path, "Destroy the given path. Invalidates handles to the path and its steps.\n\nC++: handlegraph::MutablePathHandleGraph::destroy_path(const struct handlegraph::path_handle_t &) --> void", pybind11::arg("path_handle")); + cl.def("destroy_paths", (void (handlegraph::MutablePathHandleGraph::*)(const class std::vector &)) &handlegraph::MutablePathHandleGraph::destroy_paths, "Destroy the given set of paths. Invalidates handles to all the paths and their steps.\n\nC++: handlegraph::MutablePathHandleGraph::destroy_paths(const class std::vector &) --> void", pybind11::arg("paths")); cl.def("create_path_handle", [](handlegraph::MutablePathHandleGraph &o, const std::string & a0) -> handlegraph::path_handle_t { return o.create_path_handle(a0); }, "", pybind11::arg("name")); cl.def("create_path_handle", (struct handlegraph::path_handle_t (handlegraph::MutablePathHandleGraph::*)(const std::string &, bool)) &handlegraph::MutablePathHandleGraph::create_path_handle, "Create a path with the given name. The caller must ensure that no path\n with the given name exists already, or the behavior is undefined.\n Returns a handle to the created empty path. Handles to other paths must\n remain valid.\n\nC++: handlegraph::MutablePathHandleGraph::create_path_handle(const std::string &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("name"), pybind11::arg("is_circular")); cl.def("rename_path", (struct handlegraph::path_handle_t (handlegraph::MutablePathHandleGraph::*)(const struct handlegraph::path_handle_t &, const std::string &)) &handlegraph::MutablePathHandleGraph::rename_path, "Renames a path. Existing path_handle_t's may become invalidated..\n\nC++: handlegraph::MutablePathHandleGraph::rename_path(const struct handlegraph::path_handle_t &, const std::string &) --> struct handlegraph::path_handle_t", pybind11::arg("path_handle"), pybind11::arg("new_name")); diff --git a/bdsg/cmake_bindings/handlegraph/mutable_path_mutable_handle_graph.cpp b/bdsg/cmake_bindings/handlegraph/mutable_path_mutable_handle_graph.cpp index b31dff07..ac466794 100644 --- a/bdsg/cmake_bindings/handlegraph/mutable_path_mutable_handle_graph.cpp +++ b/bdsg/cmake_bindings/handlegraph/mutable_path_mutable_handle_graph.cpp @@ -13,12 +13,12 @@ #include #include #include +#include #include #include #include // __str__ #include #include -#include #include #include @@ -56,6 +56,19 @@ struct PyCallBack_handlegraph_MutablePathMutableHandleGraph : public handlegraph } pybind11::pybind11_fail("Tried to call pure virtual function \"MutablePathHandleGraph::destroy_path\""); } + void destroy_paths(const class std::vector & a0) override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "destroy_paths"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return MutablePathHandleGraph::destroy_paths(a0); + } struct handlegraph::path_handle_t create_path_handle(const std::string & a0, bool a1) override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "create_path_handle"); @@ -1370,6 +1383,19 @@ struct PyCallBack_handlegraph_MutablePathDeletableHandleGraph : public handlegra } pybind11::pybind11_fail("Tried to call pure virtual function \"MutablePathHandleGraph::destroy_path\""); } + void destroy_paths(const class std::vector & a0) override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "destroy_paths"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return MutablePathHandleGraph::destroy_paths(a0); + } struct handlegraph::path_handle_t create_path_handle(const std::string & a0, bool a1) override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "create_path_handle"); @@ -2309,7 +2335,7 @@ void bind_handlegraph_mutable_path_mutable_handle_graph(std::function< pybind11: cl.def(pybind11::init()); cl.def("assign", (class handlegraph::MutablePathDeletableHandleGraph & (handlegraph::MutablePathDeletableHandleGraph::*)(const class handlegraph::MutablePathDeletableHandleGraph &)) &handlegraph::MutablePathDeletableHandleGraph::operator=, "C++: handlegraph::MutablePathDeletableHandleGraph::operator=(const class handlegraph::MutablePathDeletableHandleGraph &) --> class handlegraph::MutablePathDeletableHandleGraph &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // handlegraph::Serializable file:handlegraph/serializable.hpp line:20 + { // handlegraph::Serializable file:handlegraph/serializable.hpp line:22 pybind11::class_> cl(M("handlegraph"), "Serializable", ""); cl.def("get_magic_number", (unsigned int (handlegraph::Serializable::*)() const) &handlegraph::Serializable::get_magic_number, "Returns a number that is specific to the serialized implementation for type\n checking. Does not depend on the contents of any particular instantiation\n (i.e. behaves as if static, but cannot be static and virtual).\n\nC++: handlegraph::Serializable::get_magic_number() const --> unsigned int"); cl.def("deserialize", (void (handlegraph::Serializable::*)(const std::string &)) &handlegraph::Serializable::deserialize, "Sets the contents of this object to the contents of a serialized object\n from a file. The serialized object must be from the same implementation\n of this interface as is calling deserialize(). Can only be called on an\n empty object.\n\nC++: handlegraph::Serializable::deserialize(const std::string &) --> void", pybind11::arg("filename")); diff --git a/bdsg/cmake_bindings/handlegraph/path_handle_graph.cpp b/bdsg/cmake_bindings/handlegraph/path_handle_graph.cpp index aad2d748..f8742b58 100644 --- a/bdsg/cmake_bindings/handlegraph/path_handle_graph.cpp +++ b/bdsg/cmake_bindings/handlegraph/path_handle_graph.cpp @@ -3,10 +3,10 @@ #include #include #include +#include #include #include // __str__ #include -#include #include #include diff --git a/bdsg/cmake_bindings/handlegraph/path_metadata.cpp b/bdsg/cmake_bindings/handlegraph/path_metadata.cpp index 5f235982..14977afc 100644 --- a/bdsg/cmake_bindings/handlegraph/path_metadata.cpp +++ b/bdsg/cmake_bindings/handlegraph/path_metadata.cpp @@ -3,10 +3,10 @@ #include #include #include +#include #include #include // __str__ #include -#include #include #include diff --git a/bdsg/cmake_bindings/handlegraph/path_position_handle_graph.cpp b/bdsg/cmake_bindings/handlegraph/path_position_handle_graph.cpp index cdf1c1db..cf928e47 100644 --- a/bdsg/cmake_bindings/handlegraph/path_position_handle_graph.cpp +++ b/bdsg/cmake_bindings/handlegraph/path_position_handle_graph.cpp @@ -4,10 +4,10 @@ #include #include #include +#include #include #include // __str__ #include -#include #include #include diff --git a/bdsg/cmake_bindings/handlegraph/trivially_serializable.cpp b/bdsg/cmake_bindings/handlegraph/trivially_serializable.cpp index 09b29c9b..56f6dc92 100644 --- a/bdsg/cmake_bindings/handlegraph/trivially_serializable.cpp +++ b/bdsg/cmake_bindings/handlegraph/trivially_serializable.cpp @@ -2,12 +2,12 @@ #include #include #include +#include #include #include #include // __str__ #include #include -#include #include #include diff --git a/bdsg/cmake_bindings/std/bdsg/internal/binder_hook_bind.cpp b/bdsg/cmake_bindings/std/bdsg/internal/binder_hook_bind.cpp index e912cbe4..4bcf9312 100644 --- a/bdsg/cmake_bindings/std/bdsg/internal/binder_hook_bind.cpp +++ b/bdsg/cmake_bindings/std/bdsg/internal/binder_hook_bind.cpp @@ -1,4 +1,5 @@ #include +#include #include #include // __str__ #include @@ -29,6 +30,9 @@ void bind_std_bdsg_internal_binder_hook_bind(std::function< pybind11::module &(s // std::vector file:bdsg/internal/binder_hook_bind.hpp line:30 binder::vector_binder>(M("std"), "handlegraph_handle_t", "std_allocator_handlegraph_handle_t_t"); + // std::vector file:bdsg/internal/binder_hook_bind.hpp line:31 + binder::vector_binder>(M("std"), "handlegraph_path_handle_t", "std_allocator_handlegraph_path_handle_t_t"); + // std::vector file:bdsg/internal/binder_hook_bind.hpp line:32 binder::vector_binder>(M("std"), "handlegraph_step_handle_t", "std_allocator_handlegraph_step_handle_t_t"); From 949a59f7b1e0d3476238f6dc8cbb6ffb33a92e76 Mon Sep 17 00:00:00 2001 From: Jordan Eizenga Date: Tue, 17 Dec 2024 17:00:57 -0500 Subject: [PATCH 3/9] update libhandlegraph --- bdsg/deps/libhandlegraph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdsg/deps/libhandlegraph b/bdsg/deps/libhandlegraph index ccc11459..0e70dadb 160000 --- a/bdsg/deps/libhandlegraph +++ b/bdsg/deps/libhandlegraph @@ -1 +1 @@ -Subproject commit ccc11459019680ae53b65bcc19077d41ecff3075 +Subproject commit 0e70dadb5054568d8071e280b3b7b11b5658937f From 20f761a01e2c02361d577921221b97dfb881b262 Mon Sep 17 00:00:00 2001 From: Adam Novak Date: Tue, 17 Dec 2024 18:10:15 -0500 Subject: [PATCH 4/9] Take over managing pybind11 and use binder that can use the right llvm --- CMakeLists.txt | 13 +++++++++---- make_and_run_binder.py | 35 ++++++++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cefd3d6f..302ac164 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,10 +189,13 @@ target_include_directories(sparsepp INTERFACE "${bdsg_DIR}/deps/sparsepp/") add_subdirectory("${bdsg_DIR}/deps/mio") if (BUILD_PYTHON_BINDINGS) + # Binder (because some generated bindings depend on headers packaged with Binder) + # See also: Binder commit defined in make_and_run_binder.py which actually generates bindings. + set(BINDER_COMMIT a1f81c86b75075aea2a7aab2c02f45f95fd5fe84) ExternalProject_Add(binder - GIT_REPOSITORY "https://github.com/RosettaCommons/binder.git" - GIT_TAG "ee2ecff151d125c3add072a7765aebad6f42a70d" + GIT_REPOSITORY "https://github.com/adamnovak/binder.git" + GIT_TAG "${BINDER_COMMIT}" # we don't actually build or install Binder via its CMake because we just need its headers #CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR} CONFIGURE_COMMAND "" @@ -202,6 +205,8 @@ if (BUILD_PYTHON_BINDINGS) set(binder_INCLUDE "${INSTALL_DIR}/${CMAKE_INSTALL_INCLUDEDIR}") # pybind11 + # See also: pybind11 commit defined in make_and_run_binder.py. + set(PYBIND11_COMMIT 5b0a6fc2017fcc176545afe3e09c9f9885283242) if (CMAKE_MAJOR_VERSION EQUAL "3" AND CMAKE_MINOR_VERSION EQUAL "10") # We need pybind11 installed in ./pybind11 *before* CMake can finish processing this file. # On CMake 3.11+ we can do that with FetchContent @@ -209,7 +214,7 @@ if (BUILD_PYTHON_BINDINGS) if (NOT EXISTS "${PROJECT_SOURCE_DIR}/pybind11") message(WARNING "Running on CMake without FetchContent_Declare; attempting to download pybind11 manually") execute_process(COMMAND git clone https://github.com/RosettaCommons/pybind11.git "${PROJECT_SOURCE_DIR}/pybind11") - execute_process(COMMAND git checkout 5b0a6fc2017fcc176545afe3e09c9f9885283242 + execute_process(COMMAND git checkout "${PYBIND11_COMMIT}" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/pybind11") endif() @@ -225,7 +230,7 @@ if (BUILD_PYTHON_BINDINGS) FetchContent_Declare( pybind11 GIT_REPOSITORY https://github.com/RosettaCommons/pybind11.git - GIT_TAG 5b0a6fc2017fcc176545afe3e09c9f9885283242 + GIT_TAG "${PYBIND11_COMMIT}" ) FetchContent_GetProperties(pybind11) if (NOT pybind11_POPULATED) diff --git a/make_and_run_binder.py b/make_and_run_binder.py index 15496fc4..122cb8cb 100755 --- a/make_and_run_binder.py +++ b/make_and_run_binder.py @@ -23,19 +23,31 @@ python_module_name = 'bdsg' # We have one global notion of what an include looks like -INCLUDE_REGEX = re.compile('^\s*#include\s+(["<])(.*)([">])') +INCLUDE_REGEX = re.compile(r'^\s*#include\s+(["<])(.*)([">])') # We have one master list of source code extensions SOURCE_EXTENSIONS = ['hpp', 'cpp', 'h', 'cc', 'c'] def clone_repos(): - ''' download the most recent copy of binder from git ''' + ''' download the most correct binder and pybind11 from git ''' if not glob.glob("binder"): print("Binder not found, cloning repo...") - subprocess.check_call(['git', 'clone', 'https://github.com/RosettaCommons/binder.git', 'binder']) + subprocess.check_call(['git', 'clone', 'https://github.com/adamnovak/binder.git', 'binder']) parent = os.getcwd() os.chdir('binder') - subprocess.check_call(['git', 'checkout', 'ee2ecff151d125c3add072a7765aebad6f42a70d']) + # See also: Binder commit defined in CMakeLists.txt for header files. + subprocess.check_call(['git', 'checkout', 'a1f81c86b75075aea2a7aab2c02f45f95fd5fe84']) os.chdir(parent) + if not glob.glob("binder/build/pybind11"): + print("pybind11 not found, cloning repo...") + parent = os.getcwd() + os.chdir('binder') + os.makedirs('build', exist_ok=True) + subprocess.check_call(['git', 'clone', 'https://github.com/RosettaCommons/pybind11.git', 'build/pybind11']) + os.chdir('build/pybind11') + # See also: pybind11 commit defined in CMakeLists.txt + subprocess.check_call(['git', 'checkout', '5b0a6fc2017fcc176545afe3e09c9f9885283242']) + os.chdir(parent) + def build_binder(): ''' @@ -46,10 +58,19 @@ def build_binder(): ''' if not glob.glob("./build/*/*/bin/*"): print("Binder not compiled, using packaged build.py...") - # Make Binder use out pybind11 version - subprocess.check_call(['sed', '-i', "s/^_pybind11_version_ = .*/_pybind11_version_ = '5b0a6fc2017fcc176545afe3e09c9f9885283242'/g", 'build.py']) # TODO: Use CPU counting that accounts for container quotas? - subprocess.check_call([sys.executable, 'build.py', '--jobs', str(multiprocessing.cpu_count())]) + subprocess.check_call( + [ + sys.executable, + 'build.py', + '--compiler', + 'clang' if platform.system() == 'Darwin' else 'gcc', + '--jobs', + str(multiprocessing.cpu_count()), + '--pybind11', + os.path.join(os.getcwd(), 'build/pybind11') + ] + ) return "binder/" + glob.glob('./build/*/*/bin/')[0] + "binder" def all_sources_and_headers(include_deps=False): From 111ad8becf0c8fe704c81b1a479f46eb24b6e726 Mon Sep 17 00:00:00 2001 From: Adam Novak Date: Tue, 17 Dec 2024 19:44:40 -0500 Subject: [PATCH 5/9] Use Binder that doesn't try to build the llvm benchmarks --- CMakeLists.txt | 2 +- make_and_run_binder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 302ac164..4741a793 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,7 +192,7 @@ if (BUILD_PYTHON_BINDINGS) # Binder (because some generated bindings depend on headers packaged with Binder) # See also: Binder commit defined in make_and_run_binder.py which actually generates bindings. - set(BINDER_COMMIT a1f81c86b75075aea2a7aab2c02f45f95fd5fe84) + set(BINDER_COMMIT d5ef611f80cc91848db1fbd09d26b97013aa4db5) ExternalProject_Add(binder GIT_REPOSITORY "https://github.com/adamnovak/binder.git" GIT_TAG "${BINDER_COMMIT}" diff --git a/make_and_run_binder.py b/make_and_run_binder.py index 122cb8cb..3155ce2e 100755 --- a/make_and_run_binder.py +++ b/make_and_run_binder.py @@ -35,7 +35,7 @@ def clone_repos(): parent = os.getcwd() os.chdir('binder') # See also: Binder commit defined in CMakeLists.txt for header files. - subprocess.check_call(['git', 'checkout', 'a1f81c86b75075aea2a7aab2c02f45f95fd5fe84']) + subprocess.check_call(['git', 'checkout', 'a270d8f8e8b2e0a9638bcf80b16e466e70ac8dc0']) os.chdir(parent) if not glob.glob("binder/build/pybind11"): print("pybind11 not found, cloning repo...") From 4b179367d53f7648c2c2a123f336f70df7573ea7 Mon Sep 17 00:00:00 2001 From: Adam Novak Date: Tue, 17 Dec 2024 21:54:14 -0500 Subject: [PATCH 6/9] Show Binder where omp.h is, not that it can parse it --- make_and_run_binder.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/make_and_run_binder.py b/make_and_run_binder.py index 3155ce2e..30a65e44 100755 --- a/make_and_run_binder.py +++ b/make_and_run_binder.py @@ -35,7 +35,7 @@ def clone_repos(): parent = os.getcwd() os.chdir('binder') # See also: Binder commit defined in CMakeLists.txt for header files. - subprocess.check_call(['git', 'checkout', 'a270d8f8e8b2e0a9638bcf80b16e466e70ac8dc0']) + subprocess.check_call(['git', 'checkout', 'd5ef611f80cc91848db1fbd09d26b97013aa4db5']) os.chdir(parent) if not glob.glob("binder/build/pybind11"): print("pybind11 not found, cloning repo...") @@ -249,6 +249,16 @@ def make_bindings_code(all_includes_fn, binder_executable): # Also make sure to look for libomp from macports or homebrew, like CMakeLists.txt does command.append('-I/opt/local/include/libomp') command.append('-I/usr/local/include') + else: + # With current GCC, Clang can't find the multiarch-specific *and* + # GCC-version-specific include path where the OpenMP headers live. + # So help it out. + # TODO: We're assuming we're using GCC. + compiler_version = int(subprocess.check_output(["gcc", "-dumpversion"]).decode('utf-8').split('.')[0]) + compiler_triple = subprocess.check_output(["gcc", "-dumpmachine"]).decode('utf-8').strip() + command.append('-I' + f"/usr/lib/gcc/{compiler_triple}/{compiler_version}/include") + # TODO: It also can't *parse* the GCC13 omp.h once it finds it, due to https://github.com/llvm/llvm-project/issues/51607 + # But it seems to generate bindings anyway? # Find Jansson jansson_flags = subprocess.check_output(['pkg-config', '--cflags', 'jansson']).decode('utf-8').strip().split(' ') From 77d8c3fcd0ffe95c3d5d5ab34d5d76c9a85210b8 Mon Sep 17 00:00:00 2001 From: Adam Novak Date: Wed, 18 Dec 2024 11:52:21 -0500 Subject: [PATCH 7/9] Use macros to hide GCC's hard attributes from Binder --- bdsg/include/bdsg/internal/binder_hook_bind.hpp | 8 ++++++++ make_and_run_binder.py | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bdsg/include/bdsg/internal/binder_hook_bind.hpp b/bdsg/include/bdsg/internal/binder_hook_bind.hpp index d456779f..41029de0 100644 --- a/bdsg/include/bdsg/internal/binder_hook_bind.hpp +++ b/bdsg/include/bdsg/internal/binder_hook_bind.hpp @@ -4,6 +4,14 @@ // Components needed at binding generation time to make pybind11/Binder work for the library. // Forced to be used as a source for things to bind, even though nothing includes it. +// We need to include the OpenMP header with compiler attribute support +// disabled, because Binder can't understand the malloc attribute used in GCC +// 13's omp.h. See . +// Do this before anything else can use omp.h. +#define __attribute__(...) +#include +#undef __attribute__ + #include #include diff --git a/make_and_run_binder.py b/make_and_run_binder.py index 30a65e44..10682ad3 100755 --- a/make_and_run_binder.py +++ b/make_and_run_binder.py @@ -257,8 +257,8 @@ def make_bindings_code(all_includes_fn, binder_executable): compiler_version = int(subprocess.check_output(["gcc", "-dumpversion"]).decode('utf-8').split('.')[0]) compiler_triple = subprocess.check_output(["gcc", "-dumpmachine"]).decode('utf-8').strip() command.append('-I' + f"/usr/lib/gcc/{compiler_triple}/{compiler_version}/include") - # TODO: It also can't *parse* the GCC13 omp.h once it finds it, due to https://github.com/llvm/llvm-project/issues/51607 - # But it seems to generate bindings anyway? + # We rely on macro hacks in binder_hook_bind.hpp to translate the file + # into something Binder can understand. # Find Jansson jansson_flags = subprocess.check_output(['pkg-config', '--cflags', 'jansson']).decode('utf-8').strip().split(' ') From 35de57eb51211ba98496bab3912199c3dddc80da Mon Sep 17 00:00:00 2001 From: Adam Novak Date: Wed, 18 Dec 2024 12:25:15 -0500 Subject: [PATCH 8/9] Use Binder that tracks LLVM version of CMake files --- CMakeLists.txt | 2 +- make_and_run_binder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4741a793..a80916e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,7 +192,7 @@ if (BUILD_PYTHON_BINDINGS) # Binder (because some generated bindings depend on headers packaged with Binder) # See also: Binder commit defined in make_and_run_binder.py which actually generates bindings. - set(BINDER_COMMIT d5ef611f80cc91848db1fbd09d26b97013aa4db5) + set(BINDER_COMMIT b6cac94c78ade6c6ffcbda629ffa520561a31788) ExternalProject_Add(binder GIT_REPOSITORY "https://github.com/adamnovak/binder.git" GIT_TAG "${BINDER_COMMIT}" diff --git a/make_and_run_binder.py b/make_and_run_binder.py index 10682ad3..7e7a0547 100755 --- a/make_and_run_binder.py +++ b/make_and_run_binder.py @@ -35,7 +35,7 @@ def clone_repos(): parent = os.getcwd() os.chdir('binder') # See also: Binder commit defined in CMakeLists.txt for header files. - subprocess.check_call(['git', 'checkout', 'd5ef611f80cc91848db1fbd09d26b97013aa4db5']) + subprocess.check_call(['git', 'checkout', 'b6cac94c78ade6c6ffcbda629ffa520561a31788']) os.chdir(parent) if not glob.glob("binder/build/pybind11"): print("pybind11 not found, cloning repo...") From 11b5705fe5ae2436c68b6ee80e4398913f00675f Mon Sep 17 00:00:00 2001 From: Jordan Eizenga Date: Wed, 18 Dec 2024 13:20:13 -0500 Subject: [PATCH 9/9] update bindings with fixed interface --- bdsg/cmake_bindings/bdsg/graph_proxy.cpp | 1 + bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp | 1 + .../bdsg/internal/base_packed_graph.cpp | 1 + .../cmake_bindings/bdsg/internal/hash_map.cpp | 1 + bdsg/cmake_bindings/bdsg/packed_graph.cpp | 26 +++++++++++++++++++ .../bdsg/snarl_distance_index.cpp | 17 ++++++------ 6 files changed, 38 insertions(+), 9 deletions(-) diff --git a/bdsg/cmake_bindings/bdsg/graph_proxy.cpp b/bdsg/cmake_bindings/bdsg/graph_proxy.cpp index d5eda612..0b69ac83 100644 --- a/bdsg/cmake_bindings/bdsg/graph_proxy.cpp +++ b/bdsg/cmake_bindings/bdsg/graph_proxy.cpp @@ -107,6 +107,7 @@ void bind_bdsg_graph_proxy(std::function< pybind11::module &(std::string const & cl.def("destroy_handle", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::destroy_handle, "C++: bdsg::GraphProxy >::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); cl.def("destroy_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::destroy_edge, "C++: bdsg::GraphProxy >::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::GraphProxy >::truncate_handle, "C++: bdsg::GraphProxy >::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); + cl.def("change_sequence", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const std::string &)) &bdsg::GraphProxy >::change_sequence, "C++: bdsg::GraphProxy >::change_sequence(const struct handlegraph::handle_t &, const std::string &) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("sequence")); cl.def("clear", (void (bdsg::GraphProxy>::*)()) &bdsg::GraphProxy >::clear, "C++: bdsg::GraphProxy >::clear() --> void"); cl.def("create_path", [](bdsg::GraphProxy> &o, const enum handlegraph::PathSense & a0, const std::string & a1, const std::string & a2, const unsigned long & a3, const unsigned long & a4, const struct std::pair & a5) -> handlegraph::path_handle_t { return o.create_path(a0, a1, a2, a3, a4, a5); }, "", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange")); cl.def("create_path", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool)) &bdsg::GraphProxy >::create_path, "C++: bdsg::GraphProxy >::create_path(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange"), pybind11::arg("is_circular")); diff --git a/bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp b/bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp index caa912d0..772f2343 100644 --- a/bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp +++ b/bdsg/cmake_bindings/bdsg/graph_proxy_1.cpp @@ -106,6 +106,7 @@ void bind_bdsg_graph_proxy_1(std::function< pybind11::module &(std::string const cl.def("destroy_handle", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::destroy_handle, "C++: bdsg::GraphProxy >::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); cl.def("destroy_edge", (void (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::GraphProxy >::destroy_edge, "C++: bdsg::GraphProxy >::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::GraphProxy >::truncate_handle, "C++: bdsg::GraphProxy >::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); + cl.def("change_sequence", (struct handlegraph::handle_t (bdsg::GraphProxy>::*)(const struct handlegraph::handle_t &, const std::string &)) &bdsg::GraphProxy >::change_sequence, "C++: bdsg::GraphProxy >::change_sequence(const struct handlegraph::handle_t &, const std::string &) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("sequence")); cl.def("clear", (void (bdsg::GraphProxy>::*)()) &bdsg::GraphProxy >::clear, "C++: bdsg::GraphProxy >::clear() --> void"); cl.def("create_path", [](bdsg::GraphProxy> &o, const enum handlegraph::PathSense & a0, const std::string & a1, const std::string & a2, const unsigned long & a3, const unsigned long & a4, const struct std::pair & a5) -> handlegraph::path_handle_t { return o.create_path(a0, a1, a2, a3, a4, a5); }, "", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange")); cl.def("create_path", (struct handlegraph::path_handle_t (bdsg::GraphProxy>::*)(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool)) &bdsg::GraphProxy >::create_path, "C++: bdsg::GraphProxy >::create_path(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange"), pybind11::arg("is_circular")); diff --git a/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp b/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp index 95becc5a..5747eebb 100644 --- a/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp +++ b/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp @@ -62,6 +62,7 @@ void bind_bdsg_internal_base_packed_graph(std::function< pybind11::module &(std: cl.def("create_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const std::string &)) &bdsg::BasePackedGraph::create_handle, "C++: bdsg::BasePackedGraph::create_handle(const std::string &) --> struct handlegraph::handle_t", pybind11::arg("sequence")); cl.def("create_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const std::string &, const long long &)) &bdsg::BasePackedGraph::create_handle, "C++: bdsg::BasePackedGraph::create_handle(const std::string &, const long long &) --> struct handlegraph::handle_t", pybind11::arg("sequence"), pybind11::arg("id")); cl.def("destroy_handle", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph::destroy_handle, "C++: bdsg::BasePackedGraph::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); + cl.def("change_sequence", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const std::string &)) &bdsg::BasePackedGraph::change_sequence, "C++: bdsg::BasePackedGraph::change_sequence(const struct handlegraph::handle_t &, const std::string &) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("sequence")); cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::BasePackedGraph::truncate_handle, "C++: bdsg::BasePackedGraph::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); cl.def("create_edge", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph::create_edge, "C++: bdsg::BasePackedGraph::create_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); cl.def("destroy_edge", (void (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::BasePackedGraph::destroy_edge, "C++: bdsg::BasePackedGraph::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); diff --git a/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp b/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp index 8343919f..d30b4488 100644 --- a/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp +++ b/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp @@ -1130,6 +1130,7 @@ void bind_bdsg_internal_hash_map(std::function< pybind11::module &(std::string c cl.def("create_handle", (struct handlegraph::handle_t (bdsg::HashGraph::*)(const std::string &)) &bdsg::HashGraph::create_handle, "Create a new node with the given sequence and return the handle.\n The sequence may not be empty.\n\nC++: bdsg::HashGraph::create_handle(const std::string &) --> struct handlegraph::handle_t", pybind11::arg("sequence")); cl.def("create_handle", (struct handlegraph::handle_t (bdsg::HashGraph::*)(const std::string &, const long long &)) &bdsg::HashGraph::create_handle, "Create a new node with the given id and sequence, then return the handle.\n The sequence may not be empty.\n The ID must be strictly greater than 0.\n\nC++: bdsg::HashGraph::create_handle(const std::string &, const long long &) --> struct handlegraph::handle_t", pybind11::arg("sequence"), pybind11::arg("id")); cl.def("destroy_handle", (void (bdsg::HashGraph::*)(const struct handlegraph::handle_t &)) &bdsg::HashGraph::destroy_handle, "Remove the node belonging to the given handle and all of its edges.\n Destroys any paths in which the node participates.\n Invalidates the destroyed handle.\n May be called during serial for_each_handle iteration **ONLY** on the node being iterated.\n May **NOT** be called during parallel for_each_handle iteration.\n May **NOT** be called on the node from which edges are being followed during follow_edges.\n May **NOT** be called during iteration over paths, if it would destroy a path.\n May **NOT** be called during iteration along a path, if it would destroy that path.\n\nC++: bdsg::HashGraph::destroy_handle(const struct handlegraph::handle_t &) --> void", pybind11::arg("handle")); + cl.def("change_sequence", (struct handlegraph::handle_t (bdsg::HashGraph::*)(const struct handlegraph::handle_t &, const std::string &)) &bdsg::HashGraph::change_sequence, "Change the sequence of handle to a new sequence. Returns a (possibly alterered)\n handle to the node with the new sequence. May invalidate the existing handle. Updates\n paths if called through an inheriting MutablePath interface.\n\nC++: bdsg::HashGraph::change_sequence(const struct handlegraph::handle_t &, const std::string &) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("sequence")); cl.def("create_edge", (void (bdsg::HashGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::HashGraph::create_edge, "Create an edge connecting the given handles in the given order and orientations.\n Ignores existing edges.\n\nC++: bdsg::HashGraph::create_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); cl.def("destroy_edge", (void (bdsg::HashGraph::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &)) &bdsg::HashGraph::destroy_edge, "Remove the edge connecting the given handles in the given order and orientations.\n Ignores nonexistent edges.\n Does not update any stored paths.\n\nC++: bdsg::HashGraph::destroy_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) --> void", pybind11::arg("left"), pybind11::arg("right")); cl.def("truncate_handle", (struct handlegraph::handle_t (bdsg::HashGraph::*)(const struct handlegraph::handle_t &, bool, unsigned long)) &bdsg::HashGraph::truncate_handle, "Shorten a node by truncating either the left or right side of the node, relative to the orientation\n of the handle, starting from a given offset along the nodes sequence. Any edges on the truncated\n end of the node are deleted. Returns a (possibly altered) handle to the truncated node.\n May invalid stored paths.\n\nC++: bdsg::HashGraph::truncate_handle(const struct handlegraph::handle_t &, bool, unsigned long) --> struct handlegraph::handle_t", pybind11::arg("handle"), pybind11::arg("trunc_left"), pybind11::arg("offset")); diff --git a/bdsg/cmake_bindings/bdsg/packed_graph.cpp b/bdsg/cmake_bindings/bdsg/packed_graph.cpp index 54d20fe2..0b627a93 100644 --- a/bdsg/cmake_bindings/bdsg/packed_graph.cpp +++ b/bdsg/cmake_bindings/bdsg/packed_graph.cpp @@ -928,6 +928,19 @@ struct PyCallBack_bdsg_PackedGraph : public bdsg::PackedGraph { } return GraphProxy::truncate_handle(a0, a1, a2); } + struct handlegraph::handle_t change_sequence(const struct handlegraph::handle_t & a0, const std::string & a1) override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "change_sequence"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return GraphProxy::change_sequence(a0, a1); + } void clear() override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "clear"); @@ -1976,6 +1989,19 @@ struct PyCallBack_bdsg_MappedPackedGraph : public bdsg::MappedPackedGraph { } return GraphProxy::truncate_handle(a0, a1, a2); } + struct handlegraph::handle_t change_sequence(const struct handlegraph::handle_t & a0, const std::string & a1) override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "change_sequence"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + else return pybind11::detail::cast_safe(std::move(o)); + } + return GraphProxy::change_sequence(a0, a1); + } void clear() override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "clear"); diff --git a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp index f93117d7..42d2e2f4 100644 --- a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp +++ b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp @@ -32,7 +32,7 @@ PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif -// bdsg::SnarlDistanceIndex file:bdsg/snarl_distance_index.hpp line:148 +// bdsg::SnarlDistanceIndex file:bdsg/snarl_distance_index.hpp line:181 struct PyCallBack_bdsg_SnarlDistanceIndex : public bdsg::SnarlDistanceIndex { using bdsg::SnarlDistanceIndex::SnarlDistanceIndex; @@ -404,7 +404,7 @@ struct PyCallBack_bdsg_SnarlDistanceIndex : public bdsg::SnarlDistanceIndex { void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::string const &namespace_) > &M) { - { // bdsg::SnarlDistanceIndex file:bdsg/snarl_distance_index.hpp line:148 + { // bdsg::SnarlDistanceIndex file:bdsg/snarl_distance_index.hpp line:181 pybind11::class_, PyCallBack_bdsg_SnarlDistanceIndex, handlegraph::SnarlDecomposition, handlegraph::TriviallySerializable> cl(M("bdsg"), "SnarlDistanceIndex", "The distance index, which also acts as a snarl decomposition.\n\n The distance index provides an interface to traverse the snarl tree and to\n find minimum distances between two sibling nodes in the snarl tree (eg\n between two chains that are children of the same snarl).\n\n It also provides a method for quickly calculating the minimum distance\n between two positions on the graph.\n\n The implementation here is tightly coupled with the filling-in code in vg\n (see vg::fill_in_distance_index()). To make a SnarlDistanceIndex that\n actually works, you have to construct the object, and then call\n get_snarl_tree_records() with zero or more TemporaryDistanceIndex objects\n for connected components, and a graph.\n\n The TemporaryDistanceIndex needs to have a variety of TemporaryRecord\n implementation classes (TemporaryChainRecord, TemporarySnarlRecord,\n TemporaryNodeRecord) set up and added to it; this all has to be done \"by\n hand\", as it were, because no code is in this library to help you do it.\n\n "); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex(); }, [](){ return new PyCallBack_bdsg_SnarlDistanceIndex(); } ) ); @@ -430,7 +430,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin .export_values(); - pybind11::enum_(cl, "record_t", pybind11::arithmetic(), "A record_t is the type of structure that a record can be.\n\nNODE, SNARL, and CHAIN indicate that they don't store distances.\nSIMPLE_SNARL is a snarl with all children connecting only to the boundary nodes in one direction.\nOVERSIZED_SNARL only stores distances to the boundaries.\nROOT_SNARL represents a connected component of the root. It has no start or end node so \n its children technically belong to the root.\nMULTICOMPONENT_CHAIN can represent a chain with snarls that are not start-end connected.\n The chain is split up into components between these snarls, each node is tagged with\n which component it belongs to.") + pybind11::enum_(cl, "record_t", pybind11::arithmetic(), "A record_t is the type of structure that a record can be.\n The actual distance index is stored as a series of \"records\" for each snarl/node/chain. \n The record type defines what is stored in a record\n\nNODE, SNARL, and CHAIN indicate that they don't store distances.\nSIMPLE_SNARL is a snarl with all children connecting only to the boundary nodes in one direction (ie, a bubble).\nTRIVIAL_SNARL represents consecutive nodes in a chain. \nNODE represents a node that is a trivial chain. A node can only be the child of a snarl.\nOVERSIZED_SNARL only stores distances to the boundaries.\nROOT_SNARL represents a connected component of the root. It has no start or end node so \n its children technically belong to the root.\nMULTICOMPONENT_CHAIN can represent a chain with snarls that are not start-end connected.\n The chain is split up into components between these snarls, each node is tagged with\n which component it belongs to.") .value("ROOT", bdsg::SnarlDistanceIndex::ROOT) .value("NODE", bdsg::SnarlDistanceIndex::NODE) .value("DISTANCED_NODE", bdsg::SnarlDistanceIndex::DISTANCED_NODE) @@ -513,7 +513,6 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("is_root_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_root_snarl, "Return true if the given handle refers to (a traversal of) a snarl of the root,\nwhich is considered to be the root but actually refers to a subset of the children \nof the root that are connected\n\nC++: bdsg::SnarlDistanceIndex::is_root_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_snarl, "Returns true if the given net handle refers to (a traversal of) a snarl.\n\nC++: bdsg::SnarlDistanceIndex::is_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_dag", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_dag, "Return true if the given snarl is a DAG and false otherwise\nReturns true if the given net_handle_t is not a snarl\n\nC++: bdsg::SnarlDistanceIndex::is_dag(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("snarl")); - cl.def("non_dag_edge_count", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const class handlegraph::HandleGraph *) const) &bdsg::SnarlDistanceIndex::non_dag_edge_count, "Given a snarl, return the number of non-dag edges it contains\n0 for a dag\n\nC++: bdsg::SnarlDistanceIndex::non_dag_edge_count(const struct handlegraph::net_handle_t &, const class handlegraph::HandleGraph *) const --> unsigned long", pybind11::arg("snarl"), pybind11::arg("graph")); cl.def("is_simple_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_simple_snarl, "Returns true if the given net handle refers to (a traversal of) a simple snarl\nA simple snarl is a bubble where each child node can only reach the boundary nodes,\nand each side of a node reaches a different boundary node\nThere may also be an edge connecting the two boundary nodes but no additional \nedges are allowed\n\nC++: bdsg::SnarlDistanceIndex::is_simple_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_regular_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_regular_snarl, "Returns true if the given net handle refers to (a traversal of) a regular snarl\nA regular snarl is the same as a simple snarl, except that the children may be\nnested chains, rather than being restricted to nodes \n\nC++: bdsg::SnarlDistanceIndex::is_regular_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_chain, "Returns true if the given net handle refers to (a traversal of) a chain.\n\nC++: bdsg::SnarlDistanceIndex::is_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); @@ -572,7 +571,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def_static("bit_width", (unsigned long (*)(unsigned long)) &bdsg::SnarlDistanceIndex::bit_width, "C++: bdsg::SnarlDistanceIndex::bit_width(unsigned long) --> unsigned long", pybind11::arg("value")); cl.def("time_accesses", (void (bdsg::SnarlDistanceIndex::*)()) &bdsg::SnarlDistanceIndex::time_accesses, "C++: bdsg::SnarlDistanceIndex::time_accesses() --> void"); - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex file:bdsg/snarl_distance_index.hpp line:1480 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex file:bdsg/snarl_distance_index.hpp line:1524 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "TemporaryDistanceIndex", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex(); } ) ); @@ -592,7 +591,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("structure_start_end_as_string", (std::string (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)(struct std::pair) const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::structure_start_end_as_string, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::structure_start_end_as_string(struct std::pair) const --> std::string", pybind11::arg("index")); cl.def("get_max_record_length", (unsigned long (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length() const --> unsigned long"); - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1498 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1544 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "TemporaryRecord", ""); cl.def( pybind11::init( [](bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord const &o){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord(o); } ) ); @@ -600,7 +599,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1500 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1546 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryChainRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord(); } ) ); @@ -633,7 +632,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("get_max_record_length", (unsigned long (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::*)(bool) const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::get_max_record_length(bool) const --> unsigned long", pybind11::arg("include_distances")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1540 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1588 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporarySnarlRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord(); } ) ); @@ -666,7 +665,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1572 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1621 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryNodeRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord(); } ) );