Skip to content

Commit

Permalink
Ignore graph links for simple graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Itolstoganov committed Jun 5, 2023
1 parent b92b0df commit b919f2c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assembler/src/common/sequence/sequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Sequence {
size_t bytes_size = DataSize(size_);
ST *bytes = data_->data();

VERIFY(is_dignucl(s[0]) || is_nucl(s[0]));
//VERIFY(is_dignucl(s[0]) || is_nucl(s[0]));

// Which symbols does our string contain : 0123 or ACGT?
bool digit_str = is_dignucl(s[0]);
Expand Down
4 changes: 2 additions & 2 deletions assembler/src/projects/splitter/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ gfa::GFAReader ReadGraph(const gcfg &cfg,
FATAL_ERROR("Unknown graph representation type");
case GraphType::Multiplexed: {
gfa::GFAReader gfa(cfg.graph);
INFO("GFA segments: " << gfa.num_edges() << ", links: " << gfa.num_links() << ", paths: "
<< gfa.num_paths());
gfa.to_graph(graph, id_mapper);
INFO("GFA segments: " << gfa.num_edges() << ", links: " << gfa.num_links() << ", paths: "
<< gfa.num_paths());
return gfa;
}
}
Expand Down
16 changes: 12 additions & 4 deletions assembler/src/projects/splitter/path_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,18 @@ PathExtractor::ScaffoldLinks PathExtractor::GetScaffoldLinks(const VertexResults
const auto &vertex_result = vertex_entry.second;
auto vertex = vertex_entry.first;
DEBUG("Updating link storage");
for (const debruijn_graph::LinkId &link_id: graph_.links(vertex)) {
auto &link = graph_.link(link_id);
TRACE(link.link.first.int_id() << "," << link.link.second.int_id() << "," << link_id);
vertex_link_storage[link.link.first].insert(link.link.second);
if (graph_.is_complex(vertex)) {
for (const debruijn_graph::LinkId &link_id: graph_.links(vertex)) {
auto &link = graph_.link(link_id);
TRACE(link.link.first.int_id() << "," << link.link.second.int_id() << "," << link_id);
vertex_link_storage[link.link.first].insert(link.link.second);
}
} else {
for (const auto &in_edge: graph_.IncomingEdges(vertex)) {
for (const auto &out_edge: graph_.OutgoingEdges(vertex)) {
vertex_link_storage[in_edge].insert(out_edge);
}
}
}
DEBUG("Constructing path map");
for (const auto &entry: vertex_result.supported_pairs) {
Expand Down

0 comments on commit b919f2c

Please sign in to comment.