.. _`bio/lofreq/call`: LOFREQ CALL =========== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/lofreq/call?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/lofreq/call simply call variants Example ------- This wrapper can be used in the following way: .. code-block:: python rule lofreq: input: bam="data/{sample}.bam", bai="data/{sample}.bai" output: "calls/{sample}.vcf" log: "logs/lofreq_call/{sample}.log" params: ref="data/genome.fasta", extra="" threads: 8 wrapper: "v3.0.4/bio/lofreq/call" Note that input, output and log file paths can be chosen freely. When running with .. code-block:: bash snakemake --use-conda the software dependencies will be automatically deployed into an isolated environment before execution. Software dependencies --------------------- * ``samtools=1.18`` * ``lofreq=2.1.5`` Authors ------- * Patrik Smeds Code ---- .. code-block:: python __author__ = "Patrik Smeds" __copyright__ = "Copyright 2018, Patrik Smeds" __email__ = "patrik.smeds@gmail.com" __license__ = "MIT" import os from snakemake.shell import shell log = snakemake.log_fmt_shell(stdout=False, stderr=True) extra = snakemake.params.get("extra", "") ref = snakemake.params.get("ref", None) if ref is None: raise ValueError("A reference must be provided") bam_input = snakemake.input.bam bai_input = snakemake.input.bai if bam_input is None: raise ValueError("Missing bam input file!") if bai_input is None: raise ValueError("Missing bai input file!") output_file = snakemake.output[0] if output_file is None: raise ValueError("Missing output file") elif not len(snakemake.output) == 1: raise ValueError("Only expecting one output file: " + str(output_file) + "!") shell( "lofreq call-parallel " " --pp-threads {snakemake.threads}" " -f {ref}" " {bam_input}" " -o {output_file}" " {extra}" " {log}" ) .. |nl| raw:: html