Skip to content

Commit

Permalink
Added assert ScaffoldRecord::introduceGap to catch case where the exp…
Browse files Browse the repository at this point in the history
…ected overlap between scaffold components is not sane.
  • Loading branch information
jts committed Oct 11, 2010
1 parent 140c6dc commit a970410
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/SGA/scaffold2fasta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int scaffold2fastaMain(int argc, char** argv)
std::cout << "Find overlaps: " << (opt::resolveMask & RESOLVE_OVERLAP) << "\n";

if(opt::asqgFile.empty())
assert(false && "only asqg file is implemented atm");
assert(false && "only asqg mode is implemented, please provide an ASQG file");

StringGraph* pGraph = SGUtil::loadASQG(opt::asqgFile, 0, true);
std::istream* pReader = new std::ifstream(opt::scafFile.c_str());
Expand Down
1 change: 1 addition & 0 deletions src/Scaffold/ScaffoldRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ bool ScaffoldRecord::introduceGap(const std::string& contigString, const Scaffol
// Truncate the string using the expected overlap and add a gap with a fixed number of Ns
out.append(10, 'N');
int expectedOverlap = -1 * link.distance;
assert(expectedOverlap < (int)contigString.length());
out.append(contigString.substr(expectedOverlap));
}
else
Expand Down

0 comments on commit a970410

Please sign in to comment.