-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQIIME2
153 lines (119 loc) · 3.41 KB
/
QIIME2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Overview of QIIME 2 Plugin Workflows.
##Step 0. Import raw sequences.
It would be best to have the manifest file and the demultiplexed sequences in fastq format to import the data.
#Import data
```
qiime tools import \
--type 'SampleData[PairedEndSequencesWithQuality]' \
--input-path manifest.tsv \
--output-path paired-end-demux.qza \
--input-format PairedEndFastqManifestPhred33V2
```
##QA
#Examine data quality (in QIIME2)
```
qiime demux summarize \
--i-data paired-end-demux.qza \
--o-visualization paired-end-demux.qzv
```
#Examine data quality from fastqc.
```
fastqc ~/Documentos/tesis2/casava-18-paired-end-demultiplexed/SRR9019767_1.fastq
fastqc ~/Documentos/tesis2/casava-18-paired-end-demultiplexed/SRR9019770_1.fastq
fastqc ~/Documentos/tesis2/casava-18-paired-end-demultiplexed/SRR9019798_1.fastq
```
##Denoise paired (DADA2).
```
qiime dada2 denoise-paired \
--i-demultiplexed-seqs paired-end-demux.qza \
--p-trim-left-f 20 \
--p-trim-left-r 20 \
--p-trunc-len-f 240 \
--p-trunc-len-r 220 \
--o-table table.qza \
--o-representative-sequences paired-end-demux.qza \
--o-denoising-stats denoising-stats.qza
```
##Characteristics of the sequences.
```
qiime feature-table summarize \
--i-table table.qza \
--o-visualization table.qzv \
--m-sample-metadata-file sample-metadata.tsv
```
```
qiime feature-table tabulate-seqs \
--i-data paired-end-demux.qza \
--o-visualization paired-end-demux.qzv
```
##Denoising statistics.
```
qiime metadata tabulate \
--m-input-file denoising-stats.qza \
--o-visualization denoising-stats.qzv
```
##Taxonomic analysis.
#Preparing the files from raw data (Silva v132).
#Download and unzip the raw streams.
```
wget https://www.arb-silva.de/fileadmin/silva_databases/qiime/Silva_132_release.zip
unzip Silva_132_release.zip
```
#Convert lowercase to uppercase.
```
awk '/^>/ {print($0)}; /^[^>]/ {print(toupper($0))}' SILVA_132_QIIME_release/rep_set/rep_set_16S_only/99/silva_132_99_16S.fna > silva_132_99_16S-edited.fna
```
#Import the sequences to QIIME2.
```
qiime tools import
--type 'FeatureData[Sequence]'
--input-path silva_132_99_16S-edited.fna
--output-path silva_132_99_16S.qza
```
# Import the taxonomy to Qiime2.
```
qiime tools import --type 'FeatureData[Taxonomy]'
--input-format HeaderlessTSVTaxonomyFormat
--input-path SILVA_132_QIIME_release/taxonomy/16S_only/99/taxonomy_7_levels.txt
--output-path 16S99.taxonomy_7_levels.qza
```
#Alpha rarefaction.
```
qiime diversity alpha-rarefaction \
--i-table table.qza \
--i-phylogeny rooted-tree.qza \
--p-max-depth 5065 \
--m-metadata-file sample-metadata.tsv \
--o-visualization alpha-rarefaction.qzv
```
##Classify
#Classify-consensus-vsearch.
```
qiime feature-classifier classify-consensus-vsearch
--i-query dada2out/representative_sequences.qza
--i-reference-reads silva_132_99_16S.qza
--i-reference-taxonomy 16S99.taxonomy_7_levels.qza
--p-strand both
--p-threads 96
--p-perc-identity 0.97
--o-classification taxonomy.vsearch97.qza
--output-dir vsearch97
```
```
qiime feature-classifier classify-sklearn \
--i-classifier silva_132_release.zip \
--i-reads demux-paired-end.qza \
--o-classification taxonomy.qza
```
```
qiime metadata tabulate \
--m-input-file taxonomy.qza \
--o-visualization taxonomy.qzv
```
```
qiime taxa barplot \
--i-table table.qza \
--i-taxonomy taxonomy.qza \
--m-metadata-file sample-metadata.tsv \
--o-visualization taxa-bar-plots.qzv
```