-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathassignment5.sh
38 lines (24 loc) · 2.45 KB
/
assignment5.sh
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
#!/bin/bash
#Make sure you're in the folder with METADATA.txt and reads.qza!
qiime deblur denoise-16S --i-demultiplexed-seqs reads.qza --o-table unfiltered_table --o-representative-sequences representative_sequences --o-stats stats.qza --p-trim-length 225 --p-jobs-to-start 4 --p-indel-max 10 --p-sample-stats --verbose
wget https://data.qiime2.org/2019.1/common/gg-13-8-99-nb-classifier.qza
#If you have a large amount of RAM (32GB or greater), try the larger SILVA database:
#wget https://data.qiime2.org/2019.1/common/silva-132-99-nb-classifier.qza
qiime feature-classifier classify-sklearn --i-classifier gg-13-8-99-nb-classifier.qza --i-reads representative_sequences.qza --o-classification taxonomy
#This visualization shows us the sequences/sample spread
qiime feature-table summarize --i-table unfiltered_table.qza --o-visualization table_summary
qiime feature-table filter-samples --i-table unfiltered_table.qza --o-filtered-table table.qza --p-min-frequency 4000
#Taxa bar plots
qiime taxa barplot --i-table unfiltered_table.qza --i-taxonomy taxonomy.qza --m-metadata-file METADATA.txt --o-visualization taxa-bar-plots
#Steps for generating a phylogenetic tree
qiime alignment mafft --i-sequences representative_sequences.qza --o-alignment aligned_representative_sequences
qiime alignment mask --i-alignment aligned_representative_sequences.qza --o-masked-alignment masked_aligned_representative_sequences
qiime phylogeny fasttree --i-alignment masked_aligned_representative_sequences.qza --o-tree unrooted_tree
qiime phylogeny midpoint-root --i-tree unrooted_tree.qza --o-rooted-tree rooted_tree
#Also generates PCoA plots automatically
qiime diversity core-metrics-phylogenetic --i-phylogeny rooted_tree.qza --i-table table.qza --p-sampling-depth 4000 --output-dir diversity_4000 --m-metadata-file METADATA.txt
#Test for between-group differences
qiime diversity alpha-group-significance --i-alpha-diversity diversity_4000/faith_pd_vector.qza --m-metadata-file METADATA.txt --o-visualization diversity_4000/alpha_PD_significance
qiime diversity alpha-group-significance --i-alpha-diversity diversity_4000/shannon_vector.qza --m-metadata-file METADATA.txt --o-visualization diversity_4000/alpha_shannon_significance
#Alpha rarefaction curves show taxon accumulation as a function of sequence depth
qiime diversity alpha-rarefaction --i-table table.qza --p-max-depth 10000 --o-visualization diversity_4000/alpha_rarefaction.qzv --m-metadata-file METADATA.txt --i-phylogeny rooted_tree.qza