Skip to content

Commit

Permalink
Actually enforce minReadLength when computing corrected reads.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwalenz committed Sep 18, 2020
1 parent 268b8c3 commit f978ef6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
3 changes: 0 additions & 3 deletions src/correction/falconConsensus.H
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,10 @@ public:
class falconConsensus {
public:
falconConsensus(uint32 minOutputCoverage_,
uint32 minOutputLength_,
double minOlapIdentity_,
uint32 minOlapLength_,
bool restrictToOverlap_ = true) {
minOutputCoverage = minOutputCoverage_;
minOutputLength = minOutputLength_;
minOlapIdentity = minOlapIdentity_;
minOlapLength = minOlapLength_;
restrictToOverlap = restrictToOverlap_;
Expand Down Expand Up @@ -229,7 +227,6 @@ public:

private:
uint32 minOutputCoverage;
uint32 minOutputLength;

double minOlapIdentity;
uint32 minOlapLength;
Expand Down
20 changes: 9 additions & 11 deletions src/correction/falconsense.C
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ main(int argc, char **argv) {
// partitioning, but that would be wrong, because partitioning uses these objects to determine
// the base amount of memory needed.

falconConsensus *fc = new falconConsensus(minOutputCoverage, minOutputLength, minOlapIdentity, minOlapLength, restrictToOverlap);
falconConsensus *fc = new falconConsensus(minOutputCoverage, minOlapIdentity, minOlapLength, restrictToOverlap);
map<uint32, sqRead *> reads;

if (memoryLimit == 0) {
Expand All @@ -485,11 +485,10 @@ main(int argc, char **argv) {
trimToAlign,
minOlapLength);

if (cnsFile)
layout->saveToStream(cnsFile);

if (seqFile)
layout->dumpFASTQ(seqFile);
if (layout->length() >= minOutputLength) {
if (cnsFile) layout->saveToStream(cnsFile);
if (seqFile) layout->dumpFASTQ(seqFile);
}

delete layout;
layout = new tgTig(); // Next loop needs an existing empty layout.
Expand Down Expand Up @@ -701,11 +700,10 @@ main(int argc, char **argv) {
fc = NULL;
#endif

if (cnsFile)
layout->saveToStream(cnsFile);

if (seqFile)
layout->dumpFASTQ(seqFile);
if (layout->length() >= minOutputLength) {
if (cnsFile) layout->saveToStream(cnsFile);
if (seqFile) layout->dumpFASTQ(seqFile);
}

corStore->unloadTig(layout->tigID());
}
Expand Down

0 comments on commit f978ef6

Please sign in to comment.