Skip to content

Commit

Permalink
Update stages
Browse files Browse the repository at this point in the history
  • Loading branch information
rvaser committed Apr 21, 2020
1 parent adc18ee commit 3890f8c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.9)

project(raven VERSION 1.1.3
project(raven VERSION 1.1.4
LANGUAGES CXX
DESCRIPTION "Raven is a de novo genome assembler for long uncorrected reads.")

Expand Down
9 changes: 6 additions & 3 deletions src/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ void Graph::Construct(std::vector<std::unique_ptr<biosoup::Sequence>>& sequences
} // NOLINT

void Graph::Assemble() {
if (stage_ > -1) {
if (stage_ < -3 || stage_ > -1) {
return;
}

Expand Down Expand Up @@ -1581,6 +1581,11 @@ void Graph::Polish(
return;
}

auto unitigs = GetUnitigs();
if (unitigs.empty()) {
return;
}

double q = 0.;
for (const auto& it : sequences) {
if (it->quality.empty()) {
Expand Down Expand Up @@ -1608,8 +1613,6 @@ void Graph::Polish(
cuda_banded_alignment,
cuda_alignment_batches);

auto unitigs = GetUnitigs();

while (stage_ < static_cast<std::int32_t>(num_rounds)) {
polisher->Initialize(unitigs, sequences);
auto polished = polisher->Polish(false);
Expand Down
20 changes: 10 additions & 10 deletions src/graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ class Graph {
// simplify with transitive reduction, tip prunning and bubble popping
void Assemble();

// inspired by (Myers 1995) & (Myers 2005)
std::uint32_t RemoveTransitiveEdges();

std::uint32_t RemoveTips();

std::uint32_t RemoveBubbles();

// remove long edges in force directed layout
std::uint32_t RemoveLongEdges(std::uint32_t num_round);

// Racon wrapper
void Polish(
const std::vector<std::unique_ptr<biosoup::Sequence>>& sequences,
Expand Down Expand Up @@ -91,6 +81,16 @@ class Graph {
void Store() const;

private:
// inspired by (Myers 1995) & (Myers 2005)
std::uint32_t RemoveTransitiveEdges();

std::uint32_t RemoveTips();

std::uint32_t RemoveBubbles();

// remove long edges in force directed layout
std::uint32_t RemoveLongEdges(std::uint32_t num_round);

friend cereal::access;

Graph() = default; // needed for cereal
Expand Down

0 comments on commit 3890f8c

Please sign in to comment.