MICROPHASER NORMAL
Predict sample-specific normal peptides with integrated germline variants from NGS (whole exome/genome) data
Example
This wrapper can be used in the following way:
rule microphaser_normal:
input:
bam="mapped/{sample}.sorted.bam",
index="mapped/{sample}.sorted.bam.bai",
ref="genome.fasta",
annotation="genome.gtf",
variants="calls/{sample}.bcf",
output:
# all peptides from the healthy proteome
peptides="out/{sample}.fasta",
tsv="out/{sample}.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:
"v5.0.1/bio/microphaser/normal"
Note that input, output and log file paths can be chosen freely.
When running with
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:
sample-specific peptide fasta (nucleotide sequences)
Code
__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 normal {snakemake.input.bam} "
"{extra} "
"--ref {snakemake.input.ref} "
"--variants {snakemake.input.variants} "
"--tsv {snakemake.output.tsv} "
"> {snakemake.output.peptides} "
"< {snakemake.input.annotation} "
"{log}"
)