PROSOLO FDR CONTROL#
ProSolo can control the false discovery rate of any combination of its defined single cell events (like the presence of an alternative allele or the dropout of an allele).
Example#
This wrapper can be used in the following way:
rule prosolo_fdr_control:
input:
"variant_calling/{sc}.{bulk}.prosolo.bcf"
output:
"fdr_control/{sc}.{bulk}.prosolo.fdr.bcf"
threads:
1
params:
# comma-separated set of events for whose (joint)
# false discovery rate you want to control
events = "ADO_TO_REF,HET",
# false discovery rate to control for
fdr = 0.05
log:
"logs/prosolo_{sc}_{bulk}.fdr.log"
wrapper:
"v3.0.4/bio/prosolo/control-fdr"
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.
Software dependencies#
prosolo=0.6.1
Input/Output#
Input:
Variants called with prosolo in vcf or bcf format, including the fine-grained posterior probabilities for single cell events.
Output:
bcf file with all variants that satisfy the chosen false discovery rate threshold with regard to the specified events.
Code#
"""Snakemake wrapper for ProSolo FDR control"""
__author__ = "David Lähnemann"
__copyright__ = "Copyright 2020, David Lähnemann"
__email__ = "david.laehnemann@uni-due.de"
__license__ = "MIT"
from snakemake.shell import shell
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
shell(
"( prosolo control-fdr"
" {snakemake.input}"
" --events {snakemake.params.events}"
" --var SNV"
" --fdr {snakemake.params.fdr}"
" --output {snakemake.output} )"
"{log} "
)