Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion documentation/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/FalcoConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ FalcoConfig::FalcoConfig(const int argc, char *argv[]) {


quiet = false;
progress = false;
tmpdir = ".";

is_sam = false;
Expand Down
7 changes: 5 additions & 2 deletions src/FalcoConfig.hpp
Original file line number Diff line number Diff line change
@@ -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
*
Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down
12 changes: 8 additions & 4 deletions src/falco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -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<std::string> leftover_args;
opt_parse.parse(argc, argv, leftover_args);
if (argc == 1 || opt_parse.help_requested()) {
Expand Down