Crate fasten_progress

source ·
Expand description

Prints a progress meter for number of fastq entries to stderr.

Examples

fasten_metrics progress

While getting read metrics for a large fastq file, print the progress to make the wait a little easier

cat large.fastq | fasten_progress --print | fasten_metrics

fasten_shuffle progress

While shuffling a large fastq file, print the progress

cat large_1.fastq large_2.fastq | fasten_progress --print | fasten_shuffle > interleaved.fastq

Two progress bars

When there is a halting step in the process like fasten_sort, then it might make sense to have two progress bars. However, if there are no halting steps then the progress messages will collide.

cat large_1.fastq large_2.fastq | \
  fasten_progress --id first --print | \
  fasten_shuffle | \
  fasten_sort --paired-end | \
  fasten_progress --id second --print | \
  fasten_progress --id collision-with-second --print | \
  fasten_metrics | column -t

Usage

Usage: fasten_progress [-h] [-n INT] [-p] [-v] [--id STRING] [--update-every INT]
 
Options:
    -h, --help          Print this help menu.
    -n, --numcpus INT   Number of CPUs (default: 1)
    -p, --paired-end    The input reads are interleaved paired-end
    -v, --verbose       Print more status messages
        --id STRING     Progress identifier. Default: unnamed
        --update-every INT
                        Update progress every n reads.
    -p, --print         Print the reads back to stdout

Functions