Skip to content

Commit

Permalink
VcfAdd: fixed bug in statistics output
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-sturm committed Jan 17, 2025
1 parent 785b1d4 commit d99229c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/VcfAdd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,19 @@ class ConcreteTool
out_p->close();
delete[] buffer;

//Statistics output
QTextStream stream(stdout);
stream << "Variants written: " << c_written << endl;
if (skip_duplicates)
//statistics output (only if VCF output does not go to stdout)
if (out!="")
{
stream << "Duplicate variants skipped: " << c_dup << endl;
}
if (filter_used)
{
stream << "Filter entries added to variants: " << c_filter << endl;
QTextStream stream(stdout);
stream << "Variants written: " << c_written << endl;
if (skip_duplicates)
{
stream << "Duplicate variants skipped: " << c_dup << endl;
}
if (filter_used)
{
stream << "Filter entries added to variants: " << c_filter << endl;
}
}
}
};
Expand Down

0 comments on commit d99229c

Please sign in to comment.