From 191fc2cede0fb3ec5cb8b7e626affce1f5029d9a Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Fri, 27 Feb 2026 14:05:10 -0800 Subject: [PATCH 1/2] src/FalcoConfig.hcpp and src/falco.cpp: require a flag to report progress bar while running; this is to prevent CR chars unless the user wants it --- src/FalcoConfig.cpp | 1 + src/FalcoConfig.hpp | 7 +++++-- src/falco.cpp | 12 ++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/FalcoConfig.cpp b/src/FalcoConfig.cpp index fed31e9..8f3164f 100644 --- a/src/FalcoConfig.cpp +++ b/src/FalcoConfig.cpp @@ -329,6 +329,7 @@ FalcoConfig::FalcoConfig(const int argc, char *argv[]) { quiet = false; + progress = false; tmpdir = "."; is_sam = false; diff --git a/src/FalcoConfig.hpp b/src/FalcoConfig.hpp index 4ec3a24..092b48d 100644 --- a/src/FalcoConfig.hpp +++ b/src/FalcoConfig.hpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2019-2022 Guilherme De Sena Brandine and +/* Copyright (C) 2019-2026 Guilherme De Sena Brandine and * Andrew D. Smith * Authors: Guilherme De Sena Brandine, Andrew Smith * @@ -42,7 +42,7 @@ struct FalcoConfig { bool extract; // if set the zipped file will be uncompressed bool nogroup; // disable grouping of bases for reads >50bp bool compressed; // whether or not to inflate file - bool quiet; + bool quiet; // suppress all progress output to terminal size_t read_step; // only process reads that are multiple of read_step size_t threads; // number of threads to read multiple files in parallel std::string call; // the function call @@ -53,6 +53,9 @@ struct FalcoConfig { static const std::string html_template; // the html for the template std::string tmpdir; // dir for temp files when generating report images + // Falco only + bool progress; // report the progress bar + // config on how to handle reads bool do_duplication, do_kmer, diff --git a/src/falco.cpp b/src/falco.cpp index 0fd5955..53e789c 100644 --- a/src/falco.cpp +++ b/src/falco.cpp @@ -64,12 +64,12 @@ read_stream_into_stats(T &in, FastqStats &stats, FalcoConfig &falco_config) { size_t tot_bytes_read = 0; // Read record by record - const bool quiet = falco_config.quiet; + const bool report_progress = falco_config.progress; ProgressBar progress(file_size, "running falco"); - if (!quiet) + if (report_progress) progress.report(std::cerr, 0); while (in.read_entry(stats, tot_bytes_read)) { - if (!quiet && progress.time_to_report(tot_bytes_read)) + if (report_progress && progress.time_to_report(tot_bytes_read)) progress.report(std::cerr, tot_bytes_read); } @@ -78,7 +78,7 @@ read_stream_into_stats(T &in, FastqStats &stats, FalcoConfig &falco_config) { if (in.tile_ignore) falco_config.do_tile = false; - if (!quiet && tot_bytes_read < file_size) + if (report_progress && tot_bytes_read < file_size) progress.report(std::cerr, file_size); } @@ -538,6 +538,10 @@ main(int argc, char *argv[]) { "other parts of a workflow.", false, allow_empty_input); + opt_parse.add_opt("progress", '\0', + "[Falco only] Report a progress bar while running.", + false, falco_config.progress); + std::vector leftover_args; opt_parse.parse(argc, argv, leftover_args); if (argc == 1 || opt_parse.help_requested()) { From 147d4ab5468020059bb9b04e74879be2d07c5a73 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Fri, 27 Feb 2026 14:20:05 -0800 Subject: [PATCH 2/2] documentation/docs/index.md: updating description of cli args --- documentation/docs/index.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/documentation/docs/index.md b/documentation/docs/index.md index 900ef1e..572da17 100644 --- a/documentation/docs/index.md +++ b/documentation/docs/index.md @@ -283,6 +283,12 @@ Options: (this may break the parse of fastqc_data.txt in programs that are very strict about the FastQC output format). + -allow-empty-input [Falco only] allow empty input files and + generate empty output files without en error + state. WARNING: using this option can mask + problems in other parts of a workflow. + -progress [Falco only] Report a progress bar while + running. Help options: -?, -help print this help message @@ -306,7 +312,7 @@ quality control of sequencing data. F1000Research 2021, 8:1874 Copyright and License Information ================================= -Copyright (C) 2019-2024 Guilherme de Sena Brandine and +Copyright (C) 2019-2026 Guilherme de Sena Brandine and Andrew D. Smith Authors: Guilherme de Sena Brandine and Andrew D. Smith