FASTQC

https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/fastqc?label=version%20update%20pull%20requests

run fastqc on fastq, bam or sam file.

URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/

Example

This wrapper can be used in the following way:


test/Snakefile not found.

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.

Params

  • outdir: outputdir (optional)

  • extras: extra arguments to fastqc. (optional)

Authors

  • yangqun

Code

# fastqc wrapper
__author__ = "yangqun"

import sys
import os
from snakemake.shell import shell


# arguments
assert "data" in snakemake.input.keys()
input_data = snakemake.input['data']
fastqc = snakemake.input.get('fastqc', 'fastqc')
java = snakemake.input.get('java', '')
outdir = snakemake.params.get('outdir', '')
extras = snakemake.params.get('extras', '')

# program
java_path = f"-j {java}" if java else ""
out_cmd = f"-o {outdir}" if outdir else ""

shell(
    "{fastqc} {java_path} {out_cmd} {extras} {input_data}"
)