-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.1_qiime2_dada2_class_log.txt
208 lines (160 loc) · 8.2 KB
/
2.1_qiime2_dada2_class_log.txt
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
## Keep only sponges that are classified at class level and environmental samples ##
mkdir $PWD/DADA2/Class/
## Step 1 - Filter samples my Class and SampleType ##
# filter samples by metadata IDs - here I just want to keep the sponge, sediment, and seawater samples - I am not interested in the controls or mock or misc samples
qiime feature-table filter-samples \
--i-table $PWD/DADA2/table-SpSedSw.min5.1500.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--p-where "Class='Hexactinellida' OR Class='Demospongiae' OR SampleType='Sediment' OR SampleType='Seawater'" \
--o-filtered-table $PWD/DADA2/Class/table-SpSedSw.min5.1500.qza
# create a qiime view file
qiime feature-table summarize \
--i-table $PWD/DADA2/Class/table-SpSedSw.min5.1500.qza \
--o-visualization $PWD/DADA2/Class/table-SpSedSw.min5.1500.qzv \
--m-sample-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv
# view this file
qiime tools view $PWD/DADA2/Class/table-SpSedSw.min5.1500.qzv
# Number of samples 234
# Number of features 34,880
# Total frequency 2,959,525
# Frequency per sample
# Minimum frequency 2,696.0
# 1st quartile 7,595.25
# Median frequency 10,934.5
# 3rd quartile 15,554.0
# Maximum frequency 114,121.0
# Mean frequency 12,647.542735042734
# Frequency per feature
# Minimum frequency 2.0
# 1st quartile 9.0
# Median frequency 16.0
# 3rd quartile 34.0
# Maximum frequency 78,482.0
# Mean frequency 84.84876720183486
## Step 2 - Taxonomic plot ##
qiime taxa barplot \
--i-table $PWD/DADA2/Class/table-SpSedSw.min5.1500.qza \
--i-taxonomy $PWD/DADA2/Silva132V3V4-taxonomy.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--o-visualization $PWD/DADA2/Class/taxa-bar-plots.qzv
qiime tools view $PWD/DADA2/Class/taxa-bar-plots.qzv
## Step 3 - Alpha & beta ##
# https://docs.qiime2.org/2018.8/plugins/available/diversity/core-metrics-phylogenetic/
qiime diversity core-metrics-phylogenetic \
--p-n-jobs 8 \
--i-phylogeny $PWD/DADA2/rooted-tree.qza \
--i-table $PWD/DADA2/Class/table-SpSedSw.min5.1500.qza \
--p-sampling-depth 2696 \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--output-dir $PWD/DADA2/Class/core-metrics-results
# the famous 3D plots
qiime tools view $PWD/DADA2/Class/core-metrics-results/bray_curtis_emperor.qzv
qiime tools view $PWD/DADA2/Class/core-metrics-results/unweighted_unifrac_emperor.qzv
qiime tools view $PWD/DADA2/Class/core-metrics-results/weighted_unifrac_emperor.qzv
## alpha div metrics ##
# phylogenetic diversity
qiime diversity alpha-group-significance \
--i-alpha-diversity $PWD/DADA2/Class/core-metrics-results/faith_pd_vector.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--o-visualization $PWD/DADA2/Class/core-metrics-results/faith-pd-group-significance.qzv
qiime tools view $PWD/DADA2/Class/core-metrics-results/faith-pd-group-significance.qzv
# evenness
qiime diversity alpha-group-significance \
--i-alpha-diversity $PWD/DADA2/Class/core-metrics-results/evenness_vector.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--o-visualization $PWD/DADA2/Class/core-metrics-results/evenness-group-significance.qzv
qiime tools view $PWD/DADA2/Class/core-metrics-results/evenness-group-significance.qzv
# rarefaction plots
qiime diversity alpha-rarefaction \
--i-table $PWD/DADA2/Class/table-SpSedSw.min5.1500.qza \
--i-phylogeny $PWD/DADA2/rooted-tree.qza \
--p-max-depth 2696 \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--o-visualization $PWD/DADA2/Class/alpha-rarefaction.qzv
qiime tools view $PWD/DADA2/Class/alpha-rarefaction.qzv
## beta diversity ##
## unweighted ##
# permanova pooled
qiime diversity beta-group-significance \
--i-distance-matrix $PWD/DADA2/Class/core-metrics-results/unweighted_unifrac_distance_matrix.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--m-metadata-column Pooled \
--o-visualization $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-Pooled-significance-permanova.qzv \
--p-pairwise \
--p-method permanova
qiime tools view $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-Pooled-significance-permanova.qzv
# permdisp pooled
qiime diversity beta-group-significance \
--i-distance-matrix $PWD/DADA2/Class/core-metrics-results/unweighted_unifrac_distance_matrix.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--m-metadata-column Pooled \
--o-visualization $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-Pooled-significance-permdisp.qzv \
--p-pairwise \
--p-method permdisp
qiime tools view $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-Pooled-significance-permdisp.qzv
# permanova sampletype
qiime diversity beta-group-significance \
--i-distance-matrix $PWD/DADA2/Class/core-metrics-results/unweighted_unifrac_distance_matrix.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--m-metadata-column SampleType \
--o-visualization $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-SampleType-significance-permanova.qzv \
--p-pairwise \
--p-method permanova
qiime tools view $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-SampleType-significance-permanova.qzv
# permdisp sampletype
qiime diversity beta-group-significance \
--i-distance-matrix $PWD/DADA2/Class/core-metrics-results/unweighted_unifrac_distance_matrix.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--m-metadata-column SampleType \
--o-visualization $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-SampleType-significance-permdisp.qzv \
--p-pairwise \
--p-method permdisp
qiime tools view $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-SampleType-significance-permdisp.qzv
## beta diversity ##
## weighted ##
# permanova pooled
qiime diversity beta-group-significance \
--i-distance-matrix $PWD/DADA2/Class/core-metrics-results/weighted_unifrac_distance_matrix.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--m-metadata-column Pooled \
--o-visualization $PWD/DADA2/Class/core-metrics-results/weighted-unifrac-Pooled-significance-permanova.qzv \
--p-pairwise \
--p-method permanova
qiime tools view $PWD/DADA2/Class/core-metrics-results/weighted-unifrac-Pooled-significance-permanova.qzv
# permdisp pooled
qiime diversity beta-group-significance \
--i-distance-matrix $PWD/DADA2/Class/core-metrics-results/weighted_unifrac_distance_matrix.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--m-metadata-column Pooled \
--o-visualization $PWD/DADA2/Class/core-metrics-results/weighted-unifrac-Pooled-significance-permdisp.qzv \
--p-pairwise \
--p-method permdisp
qiime tools view $PWD/DADA2/Class/core-metrics-results/weighted-unifrac-Pooled-significance-permdisp.qzv
###########################################
# playing around with plots and custom axes
# Depth
qiime emperor plot \
--i-pcoa $PWD/DADA2/Class/core-metrics-results/unweighted_unifrac_pcoa_results.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--p-custom-axes Depth \
--o-visualization $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-emperor-Depth.qzv
qiime tools view $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-emperor-Depth.qzv
qiime emperor plot \
--i-pcoa $PWD/DADA2/Class/core-metrics-results/weighted_unifrac_pcoa_results.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--p-custom-axes Depth \
--o-visualization $PWD/DADA2/Class/core-metrics-results/weighted-unifrac-emperor-Depth.qzv
qiime tools view $PWD/DADA2/Class/core-metrics-results/weighted-unifrac-emperor-Depth.qzv
# Long Lat
qiime emperor plot \
--i-pcoa $PWD/DADA2/Class/core-metrics-results/unweighted_unifrac_pcoa_results.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--p-custom-axes Lat \
--o-visualization $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-emperor-Lat.qzv
qiime tools view $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-emperor-Lat.qzv
qiime emperor plot \
--i-pcoa $PWD/DADA2/Class/core-metrics-results/unweighted_unifrac_pcoa_results.qza \
--m-metadata-file $PWD/2_qiime2_files/metadata.v2.tsv \
--p-custom-axes Lon \
--o-visualization $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-emperor-Lon.qzv
qiime tools view $PWD/DADA2/Class/core-metrics-results/unweighted-unifrac-emperor-Lon.qzv