MICROPHASER FILTER¶
Translate and filter neopeptides from microphaser output
Example¶
This wrapper can be used in the following way:
rule microphaser_filter:
input:
# the info file of the tumor sample to filter
tsv="somatic/info.tsv",
# All normal peptides to filter against
ref_peptides="germline/peptides.bin",
output:
# the filtered neopeptides
tumor="out/peptides.mt.fasta",
# the normal peptides matching the filtered neopeptides
normal="out/peptides.wt.fasta",
# the info data of the filtered neopeptides
tsv="out/peptides.info.tsv",
# the info data of the removed neopeptides
removed_tsv="out/peptides.removed.tsv",
# the removed neopeptides
removed_fasta="out/peptides.removed.fasta",
log:
"logs/microphaser/filter.log",
params:
extra="--peptide-length 9", # optional, desired peptide length in amino acids.
wrapper:
"v1.12.2/bio/microphaser/filter"
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.4
Input/Output¶
Input:
- neopeptides fasta (nucleotide sequences from microphaser somatic)
- information tsv (from microphaser somatic)
- sample-specific normal/wildtype pepetides (binary created using microphaser build)
Output:
- filtered neopeptides (removed self-identical peptides) in amino acid FASTA format
- corresponding normal peptides in amino acid FASTA format
- filtered information tsv
- self-identical peptides removed from the neopeptide set (tsv)
Authors¶
- Jan Forster
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 filter "
"{extra} "
"--tsv {snakemake.input.tsv} "
"--reference {snakemake.input.ref_peptides} "
"--normal-output {snakemake.output.normal} "
"--tsv-output {snakemake.output.tsv} "
"--similar-removed {snakemake.output.removed_tsv} "
"--removed-peptides {snakemake.output.removed_fasta} "
" > {snakemake.output.tumor} "
"{log}"
)