The repository host the snakemake file for 16S rRNA and shotgun sequencing data including QIIME2 and kraken2/bracken for 16S and metaphalan3 and kraken2/bracken for shotgun.

public public 1yr ago 0 bookmarks

QIIME2 with Snakemake

This is an ongoing project to generate a snakemake workflow to anlaysis 16S rRNA and shotgun seqeucnign microbial data using the following methods:

  • 16S rRNA amplicon sequencing:

    • QIIME2: de Novo and DADA2

    • kraken2/bracken

  • Shotgun sequencing:

    • kraken2/bracken

    • MetaPhlAn3

Demo Sample for the 16S rRNA:

The Single-End Example

ERR1293056 is from one of the sample from PRJEB12449 with the following name:

  • ERR1293056.fastq.gz: 63.565 KB

  • ERR1293057.fastq.gz: 58,538 KB

  • ERR1293058.fastq.gz: 58,308 KB

The Paired-End Example

ERR475467 is a sample from PRJEB6070 with the following File names ERR475467_1.fastq.gz: 10, 855 KB ERR475467_2.fastq.gz: 13, 902 KB

Code Snippets

44
45
46
47
48
49
50
51
shell:
    """
    qiime tools import \
    --type 'SampleData[SequencesWithQuality]' \
    --input-path {input} \
    --output-path {output} \
    --input-format SingleEndFastqManifestPhred33 
    """
60
61
62
63
64
65
66
67
68
69
70
    shell:
        """
		qiime deblur denoise-16S \
		  --i-demultiplexed-seqs {input} \
		  --p-trim-length -1 \
		  --p-sample-stats \
		  --o-representative-sequences {output.rep_seq} \
		  --o-table {output.table} \
		  --o-stats {output.stats} \
		  --verbose
        """ 
79
80
81
82
83
84
85
86
87
    shell:
        """
		qiime vsearch cluster-features-de-novo \
		  --i-table {input.rep_seq} \
		  --i-sequences {input.table} \
		  --p-perc-identity {PERCENT_IDENT} \
		  --o-clustered-table {output.deNovo_table} \
		  --o-clustered-sequences {output.deNovo_req_seqs}
        """ 
 95
 96
 97
 98
 99
100
101
    shell:
        """
		qiime feature-classifier classify-sklearn \
			--i-classifier {classifier} \
			--i-reads {reads} \
			--o-classification {classified_reads}
        """ 
108
109
110
111
112
113
    shell:
        """
		qiime tools export \
			--input-path {classified_reads} \
			--output-path {DENOVO_EXPORT_DIR}
        """ 
ShowHide 3 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/ksong4/snakemake_16SandShotgun
Name: snakemake_16sandshotgun
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 ...