16S Snakemake workflow

public public 1yr ago 0 bookmarks

This is my Snakemake workflow for 16S amplicon sequencing runs. Using a Snakemake workflow helps increase reproducibility and access across different computers. These commands can also be broken out into separate bash scripts, but using a Snakemake work

Code Snippets

13
14
15
16
17
18
19
20
21
22
23
24
25
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime dada2 denoise-paired --verbose \
    --i-demultiplexed-seqs {input} \
    --p-trunc-len-f 240 --p-trunc-len-r 240 \
    --o-representative-sequences {output.seqs} \
    --o-table {output.table} \
    --o-denoising-stats {output.stats}

    """
 6
 7
 8
 9
10
11
12
13
14
15
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime tools import --input-path {input} \
    --input-format PairedEndFastqManifestPhred33 \
    --output-path {output} \
    --type SampleData[PairedEndSequencesWithQuality]
    """
22
23
24
25
26
27
28
29
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime demux summarize --i-data {input}  \
    --o-visualization {output}
    """
 9
10
11
12
13
14
15
16
17
18
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime feature-table merge \
    --i-tables {input.round1} {input.round2} {input.round3} \
    --o-merged-table {output}

    """
28
29
30
31
32
33
34
35
36
37
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime feature-table merge-seqs \
    --i-data {input.round1} {input.round2} {input.round3} \
    --o-merged-data {output}

    """
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime metadata tabulate \
    --m-input-file {input.round1} \
    --o-visualization {output.round1}

    qiime metadata tabulate \
    --m-input-file {input.round2} \
    --o-visualization {output.round2}

    qiime metadata tabulate \
    --m-input-file {input.round3} \
    --o-visualization {output.round3}


    """
11
12
13
14
15
16
17
18
19
20
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime feature-classifier classify-sklearn \
    --i-classifier {params.classifier_path} \
    --i-reads {input} \
    --o-classification {output}
    """
12
13
14
15
16
17
18
19
20
21
22
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime phylogeny align-to-tree-mafft-fasttree \
    --i-sequences {input} \
    --o-alignment {output.alignment} \
    --o-masked-alignment {output.masked_alignment} \
    --o-tree {output.tree} --o-rooted-tree {output.rooted_tree}
    """
 6
 7
 8
 9
10
11
12
13
14
15
16
17
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime cutadapt trim-paired --i-demultiplexed-sequences {input}  \
    --p-front-f GTGYCAGCMGCCGCGGTAA \
    --p-front-r CCGYCAATTYMTTTRAGTTT \
    --p-error-rate 0.1 \
    --p-overlap 3 \
    --o-trimmed-sequences {output}
    """
25
26
27
28
29
30
31
32
shell:
    """
    module purge all
    module load qiime2/2021.11

    qiime demux summarize --i-data {input}  \
    --o-visualization {output}
    """
ShowHide 8 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/mckfarm/snakemake_16S
Name: snakemake_16s
Version: 1
Badge:
workflow icon

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

Downloaded: 0
Copyright: Public Domain
License: None
  • 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 ...