Skip to content

Commit

Permalink
Merge pull request #67 from smithlabcode/remove-bam-progress-bar
Browse files Browse the repository at this point in the history
Removing progress bar for BAM processing
  • Loading branch information
andrewdavidsmith authored Aug 10, 2024
2 parents 84c3baa + 6821528 commit f484f89
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/falco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include <fstream>
#include <chrono>
#include <type_traits>

#include "smithlab_utils.hpp"
#include "OptionParser.hpp"
Expand Down Expand Up @@ -77,18 +76,11 @@ read_stream_into_stats(T &in, FastqStats &stats, FalcoConfig &falco_config) {
size_t file_size = in.load();
size_t tot_bytes_read = 0;

// decide whether to report progress
const bool quiet = falco_config.quiet
#ifdef USE_HTS
|| std::is_same<T, BamReader>::value // can't do progress for bam
#endif
;

// Read record by record
const bool quiet = falco_config.quiet;
ProgressBar progress(file_size, "running falco");
if (!quiet)
progress.report(cerr, 0);

// Read record by record
while (in.read_entry(stats, tot_bytes_read)) {
if (!quiet && progress.time_to_report(tot_bytes_read))
progress.report(cerr, tot_bytes_read);
Expand Down Expand Up @@ -706,7 +698,7 @@ int main(int argc, const char **argv) {
if (!falco_config.quiet)
log_process("reading file as gzipped FASTQ format");
GzFastqReader in(falco_config, stats.SHORT_READ_THRESHOLD);
read_stream_into_stats(in, stats, falco_config);
read_stream_into_stats(in,stats,falco_config);
}
else if (falco_config.is_fastq) {
if (!falco_config.quiet)
Expand Down

0 comments on commit f484f89

Please sign in to comment.