Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 0 additions & 93 deletions src/subcommand/join_main.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions src/vg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4880,51 +4880,6 @@ void VG::connect_nodes_to_node(vector<NodeTraversal>& nodes, NodeTraversal node)
}
}

// join all subgraphs together to a "null" head node
Node* VG::join_heads(void) {
// Find the head nodes
vector<Node*> heads;
head_nodes(heads);

// Then create the new node (so it isn't picked up as a head)
current_id = max_node_id()+1;
Node* root = create_node("N");

// Wire it to all the heads and return
connect_node_to_nodes(root, heads);
return root;
}

void VG::join_heads(Node* node, bool from_start) {
vector<Node*> heads;
head_nodes(heads);

// If the node we have been given shows up as a head, remove it.
for(auto i = heads.begin(); i != heads.end(); ++i) {
if(*i == node) {
heads.erase(i);
break;
}
}

connect_node_to_nodes(node, heads, from_start);
}

void VG::join_tails(Node* node, bool to_end) {
vector<Node*> tails;
tail_nodes(tails);

// If the node we have been given shows up as a tail, remove it.
for(auto i = tails.begin(); i != tails.end(); ++i) {
if(*i == node) {
tails.erase(i);
break;
}
}

connect_nodes_to_node(tails, node, to_end);
}

void VG::add_start_end_markers(int length,
char start_char, char end_char,
Node*& start_node, Node*& end_node,
Expand Down
6 changes: 0 additions & 6 deletions src/vg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1256,12 +1256,6 @@ class VG : public Progressive, public MutablePathDeletableHandleGraph {
/// Collect the subgraph of a Node. TODO: what does that mean?
void collect_subgraph(Node* node, set<Node*>& subgraph);

/// Join head nodes of graph to common null node, creating a new single head.
Node* join_heads(void);
/// Join head nodes of graph to specified node. Optionally from the start/to the end of the new node.
void join_heads(Node* node, bool from_start = false);
/// Join tail nodes of graph to specified node. Optionally from the start/to the end of the new node.
void join_tails(Node* node, bool to_end = false);
/// Add singular head and tail null nodes to graph.
void wrap_with_null_nodes(void);
/// Add a start node and an end node, where all existing heads in the graph
Expand Down
Loading