Skip to content

snakemake

Susana Posada-Cespedes edited this page Jun 28, 2017 · 3 revisions

Snakemake

V-Pipe uses Snakemake (see documentation), a robust workflow management system written in Python. Since Snakemake is inspired by the GNU make utility, the Vpipe workflow consists of so-called rules. Rules define how to obtain output files from input files. Rules can depend on other rules, which enables dependencies to be managed transparently by Snakemake.

Users can easily adjust the parameters used by the different rules through the configuration file vpipe.config. For more experienced users, V-pipe serves as a modular and extensible backbone, meaning that users can easily customized the workflow by adding or excluding rules according to their specific requirements.

As an example, we create a rule for reconstruction of viral haplotypes using QuasiRecomb (Töpfer et al, 2013). A rule is defined by a name (here, haplotype) and a number or directives (here, input, output, shell, and params).

rule haplotype:
     input:
         "/path/to/aligned_reads.bam"
     output:
         "/path/to/output/quasispecies.fasta"
     params:
         OUTDIR = "path/to/output"
     shell:
         "QuasiRecomb -i {input} -o {params.OUTDIR}"

Rules can be generalized using wildcards.

Clone this wiki locally