# -------------------------------*- python -*----------------------------------
# ==  == ====== ====   ====    |
#                   \\     ||  | Multiphase Code Repository by HZDR
# ======   //   ||  || ===//   | Website: https://doi.org/10.14278/rodare.767
# ||  ||  //    ||  // || \\   | License: GPL-3.0-or-later
# ==  == ====== ====   ==  ==  |
# -----------------------------------------------------------------------------


rule bwa_map:
    input:
        "data/genome.fa",
        "data/samples/{sample}.fastq",
    output:
        "mapped_reads/{sample}.bam",
    log:
        "logs/{sample}.log",
    container:
        "docker://joseespinosa/docker-r-ggplot2"
    threads: 8
    shell:
        "bwa mem -t {threads} {input} | samtools view -Sb - > {output}"


# -----------------------------------------------------------------------------
