FALCO

https://img.shields.io/badge/wrapper_version-v9.9.0-10785b https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/falco?label=version%20update%20pull%20requests&color=1cb481

Generate fastq qc statistics using falco.

URL: https://github.com/smithlabcode/falco

Example

This wrapper can be used in the following way:

rule falco:
    input:
        "reads/{sample}.fastq",
    output:
        html="qc/falco/{sample}.html",
        data="qc/falco/{sample}_data.text",
        summ="qc/falco/{sample}_summary.text",
    params:
        extra="",
    log:
        "logs/falco/{sample}.log",
    threads: 1
    resources:
        mem_mb=1024,
    wrapper:
        "v9.9.0/bio/falco"

Note that input, output and log file paths can be chosen freely.

When running with

snakemake --use-conda

the software dependencies will be automatically deployed into an isolated environment before execution.

Software dependencies

  • falco=1.3.1

  • snakemake-wrapper-utils=0.8.0

Input/Output

Input:

  • fastq file

Output:

  • html: statistics file in HTML format

  • data: statistics file in TXT format

  • summ: summary file in TXT format

Params

  • extra: additional program arguments

Authors

  • Yoann Pradat

Code

"""Snakemake wrapper for falco."""

__author__ = "Yoann Pradat"
__copyright__ = "Copyright 2025, Yoann Pradat"
__email__ = "yoann.pradat@gustaveroussy.fr"
__license__ = "MIT"

from pathlib import Path
from tempfile import TemporaryDirectory
from snakemake.shell import shell
from snakemake_wrapper_utils.snakemake import move_files

extra = snakemake.params.get("extra", "")
log = snakemake.log_fmt_shell(stdout=True, stderr=True)

# We use a temp dir to clean up intermediate files.
with TemporaryDirectory() as tempdir:
    mapping = {
        "html": Path(tempdir) / "fastqc_report.html",
        "data": Path(tempdir) / "fastqc_data.txt",
        "summ": Path(tempdir) / "summary.txt",
    }

    shell(
        "falco"
        " --threads {snakemake.threads}"
        " {extra}"
        " --outdir {tempdir:q}"
        " {snakemake.input[0]:q}"
        " {log}"
    )

    log = snakemake.log_fmt_shell(stdout=True, stderr=True, append=True)
    for move_cmd in move_files(snakemake, mapping):
        shell("{move_cmd} {log}")