.. _`bio/microphaser/somatic`: MICROPHASER SOMATIC =================== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/microphaser/somatic?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/microphaser/somatic Predict mutated neopeptides and their wildtype counterparts from NGS (whole exome/genome) data Example ------- This wrapper can be used in the following way: .. code-block:: python rule microphaser_somatic: input: bam="mapped/{sample}.sorted.bam", index="mapped/{sample}.sorted.bam.bai", ref="genome.fasta", annotation="genome.gtf", variants="calls/{sample}.bcf", output: # sequences neopeptides arisen from somatic variants tumor="out/{sample}.mt.fasta", # sequences of the normal, unmutated counterpart to every neopeptide normal="out/{sample}.wt.fasta", # info data of the somatic neopeptides tsv="out/{sample}.info.tsv", log: "logs/microphaser/somatic/{sample}.log", params: extra="--window-len 9", # optional, desired peptide length in nucleotide bases, e.g. 27 (9 AA) for MHC-I ligands. wrapper: "v3.0.1/bio/microphaser/somatic" 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 ----- * For more information see, https://github.com/koesterlab/microphaser. Software dependencies --------------------- * ``microphaser=0.8.0`` Input/Output ------------ **Input:** * bam file * bcf file * fasta reference * gtf annotation file **Output:** * mutated peptide fasta (nucleotide sequences) * wildtype peptide fasta (nucleotide sequences) * information tsv Authors ------- * Jan Forster Code ---- .. code-block:: python __author__ = "Jan Forster" __copyright__ = "Copyright 2021, Jan Forster" __license__ = "MIT" from snakemake.shell import shell extra = snakemake.params.get("extra", "") log = snakemake.log_fmt_shell(stdout=False, stderr=True) shell( "microphaser somatic {snakemake.input.bam} " "{extra} " "--ref {snakemake.input.ref} " "--variants {snakemake.input.variants} " "--normal-output {snakemake.output.normal} " "--tsv {snakemake.output.tsv} " "> {snakemake.output.tumor} " "< {snakemake.input.annotation} " "{log}" ) .. |nl| raw:: html