RAZERS3
Mapping (short) reads against a reference sequence. Can have multiple output formats, please see https://github.com/seqan/seqan/tree/master/apps/razers3
Example
This wrapper can be used in the following way:
rule razers3:
input:
# list of input reads
reads=["reads/{sample}.1.fastq", "reads/{sample}.2.fastq"]
output:
# output format is automatically inferred from file extension. Can be bam/sam or other formats.
"mapped/{sample}.bam"
log:
"logs/razers3/{sample}.log"
params:
# the reference genome
genome="genome.fasta",
# additional parameters
extra=""
threads: 8
wrapper:
"v5.3.0-16-g710597c/bio/razers3"
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
razers3=3.5.8
Code
__author__ = "Jan Forster"
__copyright__ = "Copyright 2020, Jan Forster"
__email__ = "j.forster@dkfz.de"
__license__ = "MIT"
import os
from snakemake.shell import shell
extra = snakemake.params.get("extra", "")
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
shell(
"(razers3"
" -tc {snakemake.threads}"
" {extra}"
" -o {snakemake.output[0]}"
" {snakemake.params.genome}"
" {snakemake.input.reads})"
" {log}"
)