snp-mutator snp-mutator __main__

snp-mutator __main__

Version:
1.2.0
Identifier: TL_f2f0ae_54.62
Tool
1"""Snakemake wrapper for SNP Mutator."""
2# Snakemake wrappers are provided by Truwl to teach the internal mechanics of Snakemake recipes. View https://github.com/snakemake/snakemake-wrappers to learn how to use wrappers.
3
4__author__ = "Michael Hall"
5__copyright__ = "Copyright 2019, Michael Hall"
6__email__ = "mbhall88@gmail.com"
7__license__ = "MIT"
8
9
10from snakemake.shell import shell
11from pathlib import Path
12
13# Placeholder for optional parameters
14extra = snakemake.params.get("extra", "")
15num_simulations = snakemake.params.get("num_simulations", 100)
16fasta_outdir = Path(snakemake.output.sequences[0]).absolute().parent
17# Formats the log redrection string
18log = snakemake.log_fmt_shell(stdout=True, stderr=True)
19
20# Executed shell command
21shell(
22    "snpmutator {extra} "
23    "--num-simulations {num_simulations} "
24    "--vcf {snakemake.output.vcf} "
25    "-F {fasta_outdir} "
26    "{snakemake.input} {log} "
27)
28