Demo Snakemake workflow - small and runs quickly for testing purposes.

public public 1yr ago 0 bookmarks

Small demo workflow following best practice template for Snakemake workflows . Just includes bowtie2, fastqc and trim_galore steps, and default config uses E. coli genome ( NC_012967.1 ) and a sub-sample of the first 10,000 read pairs of SRR030257 . This can be changed to whatever input files you require but makes a fast test case.

Has the following structure:

 ├── README.md ├── LICENSE.md ├── .gitignore ├── config │ └── config.yaml └── workflow ├── envs │ └── bowtie2.yaml │ └── fastqc.yaml │ └── trim_galore.yaml ├── rules │ └── bowtie2.smk │ └── fastqc.smk │ └── trim_galore.smk └── Snakefile

The workflow folder follows the Snakemake best practices .

Here, you should edit the config/config.yaml.tmpl to contain the config settings you would like to initialize in the deployment of the user.

Code Snippets

24
25
26
27
28
29
30
31
shell:
    "cp {input[2]} . && "
    "cp {input[3]} . && "
    "cp {input[4]} . && "
    "cp {input[5]} . && "
    "cp {input[6]} . && "
    "cp {input[7]} . && "
    "bowtie2 -p {threads} -t -x {params.ref} -1 {input[0]} -2 {input[1]} | samtools view -b -o {output[0]} -"
49
50
51
52
53
54
55
56
shell:
    "bowtie2-build -f {input} {params.label} && "
    "mv {params.label}.1.bt2 {output[0]} && "
    "mv {params.label}.2.bt2 {output[1]} && "
    "mv {params.label}.3.bt2 {output[2]} && "
    "mv {params.label}.4.bt2 {output[3]} && "
    "mv {params.label}.rev.1.bt2 {output[4]} && "
    "mv {params.label}.rev.2.bt2 {output[5]}"
13
14
shell:
   "fastqc -t {threads} --extract {input}"
17
18
19
20
shell:
    "trim_galore {params.opts} --paired {input[0]} {input[1]} && "
    "mv {params.file1} {output[0]} && "
    "mv {params.file2} {output[1]}"
22
23
shell:
    "echo Done > {output[0]}"
ShowHide 2 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

Free

Created: 1yr ago
Updated: 1yr ago
Maitainers: public
URL: https://github.com/dickensn/simple-snakemake-secondary-workflow
Name: simple-snakemake-secondary-workflow
Version: 1
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Downloaded: 0
Copyright: Public Domain
License: MIT License
  • Future updates

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...