diff --git a/artic/vcfCheck.cpp b/artic/vcfCheck.cpp index a25d5f4..4f3f3f3 100644 --- a/artic/vcfCheck.cpp +++ b/artic/vcfCheck.cpp @@ -229,8 +229,10 @@ void artic::VcfChecker::Run() _getRecordStats(); } - // get stats from final record - _getRecordStats(); + // get stats from final record, if there was one + if(_numValid > 0) { + _getRecordStats(); + } // write the stats to the report file std::ofstream outputReport; @@ -255,4 +257,4 @@ unsigned int artic::VcfChecker::GetNumInPrimerSite(void) const { return _numPrim unsigned int artic::VcfChecker::GetNumInOverlap(void) const { return _numAmpOverlap; } // GetNumLowQual returns the number of records with low quality. -unsigned int artic::VcfChecker::GetNumLowQual(void) const { return _numLowQual; } \ No newline at end of file +unsigned int artic::VcfChecker::GetNumLowQual(void) const { return _numLowQual; }