Conversation
| .collect::<Vec<_>>(); | ||
| let source_edges = Edge::bulk_load(conn, &subgraph_edge_ids); | ||
|
|
||
| // Instead of reusing the existing edges, we create copies of the nodes and edges. This |
There was a problem hiding this comment.
This seemed like the easiest solution. From talking with Bob about it today, one problem is propagating annotations. If nodes change from one sample to a child sample, but represent the same part of a sequence, it's harder to pass annotations along. I'm open to other ideas for what to do
There was a problem hiding this comment.
what are the challenges hit when reusing nodes?
There was a problem hiding this comment.
Can you leave this comment here for future-me?
TODO: Annotation support. We do not reuse node ids because nodes control the graph topology. If we duplicated nodes via these operations, it would leave to unintentional cycles. A node cannot exist in 2 places. This will be non-intuitive for annotation propagation and needs to be handled.
src/graph_operators.rs
Outdated
| let new_end_edge = child_block_group_edges | ||
| .iter() | ||
| .find(|e| { | ||
| e.edge.target_node_id == PATH_END_NODE_ID |
There was a problem hiding this comment.
can you use the Node::is_start_node/etc. methods?
| new_path_edge_ids.push(concatenated_path_edges[concatenated_path_edges.len() - 1].id); | ||
|
|
||
| // Part 5: Create bg edges for the new edges | ||
| let mut chromosome_index_counter = edges_to_reuse |
There was a problem hiding this comment.
since we're adding +1 here, it seems like we're trying to get the first unused chromosome_index. If this is true, shouldn't this by max_by?
There was a problem hiding this comment.
🤦 No idea why I had min_by there, fixed
Chris7
left a comment
There was a problem hiding this comment.
Thanks for the info on reusing node ids. non-blocking comments added.
Add "make stitch" operation.