PROSOLO#
ProSolo calls variants or other events (like allele dropout) in a single cell sample against a bulk background sample. The single cell should stem from the same population of cells as the bulk background sample. The single cell sample should be amplified using multiple displacement amplification to match ProSolo’s statistical model.
Example#
This wrapper can be used in the following way:
rule prosolo_calling:
input:
single_cell = "data/mapped/{sc}.sorted.bam",
single_cell_index = "data/mapped/{sc}.sorted.bam.bai",
bulk = "data/mapped/{bulk}.sorted.bam",
bulk_index = "data/mapped/{bulk}.sorted.bam.bai",
ref = "data/genome.fa",
ref_idx = "data/genome.fa.fai",
candidates = "data/{sc}.{bulk}.prosolo_candidates.bcf",
output:
"variant_calling/{sc}.{bulk}.prosolo.bcf"
params:
extra = ""
threads:
1
log:
"logs/prosolo_{sc}_{bulk}.log"
wrapper:
"v3.0.2-2-g0dea6a1/bio/prosolo/single-cell-bulk"
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:
A position-sorted single cell bam file, with its index.
A position-sorted bulk bam file, with its index.
A reference genome sequence in fasta format, with its index.
A vcf or bcf file specifying candidate sites to perform calling on.
Output:
Variants called in bcf format, with fine-grained posterior probabilities for single cell events.
Code#
"""Snakemake wrapper for ProSolo single-cell-bulk calling"""
__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 single-cell-bulk "
"--omit-indels "
" {snakemake.params.extra} "
"--candidates {snakemake.input.candidates} "
"--output {snakemake.output} "
"{snakemake.input.single_cell} "
"{snakemake.input.bulk} "
"{snakemake.input.ref} ) "
"{log} "
)