TRIMMOMATIC SE

Trim single-end reads with trimmomatic.

Software dependencies

  • trimmomatic ==0.36

Example

This wrapper can be used in the following way:

rule trimmomatic_pe:
    input:
        "reads/{sample}.fastq"
    output:
        "trimmed/{sample}.fastq.gz"
    log:
        "logs/trimmomatic/{sample}.log"
    params:
        # list of trimmers (see manual)
        trimmer=["TRAILING:3"],
        # optional parameters
        extra=""
    wrapper:
        "0.19.1/bio/trimmomatic/se"

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.

Authors

  • Johannes Köster

Code

__author__ = "Johannes Köster"
__copyright__ = "Copyright 2016, Johannes Köster"
__email__ = "koester@jimmy.harvard.edu"
__license__ = "MIT"


from snakemake.shell import shell

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

shell("trimmomatic SE {snakemake.params.extra} "
      "{snakemake.input} {snakemake.output} "
      "{trimmer} "
      "{log}")