Skip to content

Commit

Permalink
enabled chained gap closing
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonBankevich committed Nov 27, 2024
1 parent a8eee0e commit e923824
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/projects/dbg/graph_modification.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ namespace dbg {

class Connection {
public:
EdgeId tip1;
EdgeId tip2;
VertexId tip1;
VertexId tip2;
AlignmentForm al;

Connection(Edge &tip1, Edge &tip2, AlignmentForm al) : tip1(tip1.getId()), tip2(tip2.getId()), al(std::move(al)) {}
Connection(Edge &tip1, Edge &tip2, AlignmentForm al) : tip1(tip1.getFinish().getId()), tip2(tip2.getFinish().getId()), al(std::move(al)) {}
};
}
4 changes: 3 additions & 1 deletion src/projects/error_correction/gap_closing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ namespace dbg {
return std::move(res);
}

// TODO: split gap closing operation into seuence correction and adding new edge.
// TODO: make it work with a chain of isolated edges
void GapCloserPipeline(logging::Logger &logger, size_t threads, dbg::SparseDBG &dbg) {
GapCloser gap_closer(700, 10000, 311, 0.05);
std::vector<dbg::Connection> patches = gap_closer.GapPatches(logger, dbg, threads);
Expand All @@ -109,7 +111,7 @@ namespace dbg {
}
omp_set_num_threads(threads);
for(Connection &connection : patches) {
dbg.mergeTipsToEdge(*connection.tip1, connection.tip2->rc(), std::move(connection.al));
dbg.mergeTipsToEdge(connection.tip1->rc().front().rc(), connection.tip2->rc().front(), std::move(connection.al));
}
}
}

0 comments on commit e923824

Please sign in to comment.