Skip to content

Commit

Permalink
fix @bokic regression. Percent should be computed from rawFile (compr…
Browse files Browse the repository at this point in the history
…essed) not by file(uncompress)
  • Loading branch information
dridk committed Apr 6, 2017
1 parent fecacea commit e90c1a7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions analysis/analysisrunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ void AnalysisRunner::run()
}
else if (is_fastq(&rawFile))
{
rawFile.close();
file = new QFile(mFilename);
file = &rawFile;
}

if (file == nullptr)
Expand Down Expand Up @@ -145,7 +144,7 @@ void AnalysisRunner::run()
// this is critcal and can decrease the speed. Send message only 1 sequence / 1000
if (mSequenceCount % 1000 == 0)
{
int percentNow = qRound(static_cast<qreal>(file->pos()) / fileInfo.size() * 100);
int percentNow = qRound(static_cast<qreal>(rawFile.pos()) / fileInfo.size() * 100);
// if percentNow is still null, return empty percent ...
if ( (percentNow >= mProgression + 5) || (percentNow == 0))
{
Expand Down Expand Up @@ -179,7 +178,7 @@ void AnalysisRunner::run()
}

file->close();
delete file;
file->deleteLater();


}
Expand Down

0 comments on commit e90c1a7

Please sign in to comment.