.. _`bio/samtools/fastq/interleaved`: SAMTOOLS FASTQ INTERLEAVED ========================== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/samtools/fastq/interleaved?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/samtools/fastq/interleaved Convert a bam file back to unaligned reads in a single fastq file with samtools. For paired end reads, this results in an unsorted interleaved file. Example ------- This wrapper can be used in the following way: .. code-block:: python rule samtools_fastq_interleaved: input: "mapped/{sample}.bam", output: "reads/{sample}.fq", log: "{sample}.interleaved.log", params: " ", threads: 3 wrapper: "v3.0.1/bio/samtools/fastq/interleaved" 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. Notes ----- * The `extra` param allows for additional program arguments (not `-@/--threads` or `-o`). * For more information see, http://www.htslib.org/doc/samtools-fasta.html Software dependencies --------------------- * ``samtools=1.14`` * ``snakemake-wrapper-utils=0.5.2`` Authors ------- * David Laehnemann * Victoria Sack * Filipe G. Vieira Code ---- .. code-block:: python __author__ = "David Laehnemann, Victoria Sack" __copyright__ = "Copyright 2018, David Laehnemann, Victoria Sack" __email__ = "david.laehnemann@hhu.de" __license__ = "MIT" import os from snakemake.shell import shell from snakemake_wrapper_utils.samtools import get_samtools_opts samtools_opts = get_samtools_opts( snakemake, parse_write_index=False, parse_output_format=False ) extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=False, stderr=True) shell("samtools fastq {samtools_opts} {extra} {snakemake.input[0]} {log}") .. |nl| raw:: html