Skip to content

Commit

Permalink
Bug fix in ScaffoldRecord to avoid outputting duplicate records for s…
Browse files Browse the repository at this point in the history
…ingleton scaffolds.
  • Loading branch information
jts committed Mar 1, 2011
1 parent 10f2054 commit 27b9e39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Scaffold/ScaffoldRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ std::string ScaffoldRecord::generateString(const StringGraph* pGraph, int minOve
// Starting from the root, join the sequence(s) of the scaffold
// together along with the appropriate gaps/overlap
Vertex* pVertex = pGraph->getVertex(m_rootID);
pVertex->setColor(GC_BLACK);

assert(pVertex != NULL);

EdgeComp relativeComp = EC_SAME;
Expand All @@ -62,7 +64,6 @@ std::string ScaffoldRecord::generateString(const StringGraph* pGraph, int minOve
// Add in the sequences of linked contigs, if any
if(m_links.size() > 0)
{

EdgeDir rootDir = m_links[0].getDir();

// If this scaffold grows in the antisense direction,
Expand All @@ -79,6 +80,7 @@ std::string ScaffoldRecord::generateString(const StringGraph* pGraph, int minOve
const ScaffoldLink& link = m_links[i];

pVertex = pGraph->getVertex(link.endpointID);
pVertex->setColor(GC_BLACK);

// Calculate the strand this sequence is on relative to the root
if(link.getComp() == EC_REVERSE)
Expand Down Expand Up @@ -145,8 +147,6 @@ std::string ScaffoldRecord::generateString(const StringGraph* pGraph, int minOve

}

pGraph->getVertex(currID)->setColor(GC_BLACK);

sequence.append(resolvedSequence);
currID = link.endpointID;
prevComp = relativeComp;
Expand Down

0 comments on commit 27b9e39

Please sign in to comment.