-
Notifications
You must be signed in to change notification settings - Fork 0
/
q2b_dada2.batch
executable file
·93 lines (76 loc) · 2.62 KB
/
q2b_dada2.batch
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
#!/bin/bash
set -euxo pipefail
cd $(dirname `readlink -f $0`)
prefix=`cat configuration.txt | grep "^prefix" | cut -d "=" -f 2`
CPU=`cat configuration.txt | grep "^CPU" | cut -d "=" -f 2`
dada2_max_ee=`cat configuration.txt | grep "^dada2_max_ee" | cut -d "=" -f 2`
dada2_pooling_method=`cat configuration.txt | grep "^dada2_pooling_method" | cut -d "=" -f 2`
dada2_chimera_method=`cat configuration.txt | grep "^dada2_chimera_method" | cut -d "=" -f 2`
dada2_min_fold_parent_over_abundance=`cat configuration.txt | grep "^dada2_min_fold_parent_over_abundance" | cut -d "=" -f 2`
manifest="${prefix}_manifest"
prefix_dada2="${prefix}_da2"
echo "#============ This script is going to output these files ..."
echo
echo ${prefix_dada2}_init.qza
echo ${prefix_dada2}_sum.qzv
echo
echo ${prefix_dada2}_tab.qza
echo ${prefix_dada2}_tab.qzv
echo
echo ${prefix_dada2}_rep.qza
echo ${prefix_dada2}_rep.qzv
echo
echo ${prefix_dada2}_stat.qza
echo ${prefix_dada2}_stat.qzv
echo
echo "#============ running batch ..."
qiime tools import \
--type 'SampleData[SequencesWithQuality]' \
--input-format SingleEndFastqManifestPhred33V2 \
--input-path ${manifest}.tsv \
--output-path ${prefix_dada2}_init.qza
qiime demux summarize \
--i-data ${prefix_dada2}_init.qza \
--o-visualization ${prefix_dada2}_sum.qzv
echo
echo ${prefix_dada2}_init.qza
echo ${prefix_dada2}_sum.qzv
echo "#============ finished qiime tools import ..."
echo
######## dada2
qiime dada2 denoise-single \
--p-n-threads ${CPU} \
--p-trunc-len 0 \
--p-max-ee ${dada2_max_ee} \
--p-pooling-method ${dada2_pooling_method} \
--p-chimera-method ${dada2_chimera_method} \
--p-min-fold-parent-over-abundance ${dada2_min_fold_parent_over_abundance} \
--i-demultiplexed-seqs ${prefix_dada2}_init.qza \
--o-table ${prefix_dada2}_tab.qza \
--o-representative-sequences ${prefix_dada2}_rep.qza \
--o-denoising-stats ${prefix_dada2}_stat.qza
echo
echo ${prefix_dada2}_tab.qza
echo ${prefix_dada2}_rep.qza
echo ${prefix_dada2}_stat.qza
echo "#============ finished dada2 denoise-single ..."
echo
######## feature table
########
qiime feature-table summarize \
--m-sample-metadata-file ${manifest}.tsv \
--i-table ${prefix_dada2}_tab.qza \
--o-visualization ${prefix_dada2}_tab.qzv
qiime feature-table tabulate-seqs \
--i-data ${prefix_dada2}_rep.qza \
--o-visualization ${prefix_dada2}_rep.qzv
qiime metadata tabulate \
--m-input-file ${prefix_dada2}_stat.qza \
--o-visualization ${prefix_dada2}_stat.qzv
echo
echo ${prefix_dada2}_tab.qzv
echo ${prefix_dada2}_rep.qzv
echo ${prefix_dada2}_stat.qzv
echo "#============ finished feature-table summarize/tabulate-seqs/tabulate ..."
echo
exit 0