TOULLIGQC

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

A post sequencing QC tool for Oxford Nanopore sequencers.

URL: https://github.com/GenomiqueENS/toulligQC

Example

This wrapper can be used in the following way:

rule toulligqc_sequencing_summary:
    input:
        "demodata/sequencing_summary.txt",
    output:
        "out_summary/report.html",
    log:
        "logs/toulligqc_sequencing_summary.log",
    params:
        extra="",  # optional additional parameters as string
    wrapper:
        "v9.4.2/bio/toulligqc"


rule toulligqc_bam:
    input:
        "demodata/test.sorted.bam",
    output:
        "out_bam/report.html",
    log:
        "logs/toulligqc_bam.log",
    params:
        extra="",  # optional additional parameters as string
    wrapper:
        "v9.4.2/bio/toulligqc"


rule toulligqc_fastq:
    input:
        "demodata/test.fastq.gz",
    output:
        "out_fastq/report.html",
    log:
        "logs/toulligqc_fastq.log",
    params:
        extra="",  # optional additional parameters as string
    wrapper:
        "v9.4.2/bio/toulligqc"

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

  • toulligqc=2.8.4

  • snakemake-wrapper-utils=0.8.0

Input/Output

Input:

  • path to input data. Can be either a sequencing summary file, fastq file (uncompressed/ compressed) or bam file.

Output:

  • report and plots of QC results

Params

  • extra: Optional parameters for toulligqc

Authors

  • Ali Hamraoui

  • Salomé Brunon

Code

__author__ = "Salomé Brunon"
__copyright__ = "Copyright 2024, Salomé Brunon"
__email__ = "salome.brunon@gmail.com"
__license__ = "CECILL-2.1"

from snakemake.shell import shell
from pathlib import Path
from snakemake_wrapper_utils.snakemake import get_format

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

in_format = get_format(snakemake.input[0])
if in_format in ["fastq", "bam"]:
    input_flag = f"--{in_format}"
else:
    input_flag = "--sequencing-summary-source "

outdir = Path(snakemake.output[0]).parent

shell("toulligqc {input_flag} {snakemake.input[0]} {extra} --force -n {outdir} {log}")