-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQIIME2_All_16S.sh
85 lines (57 loc) · 4.43 KB
/
QIIME2_All_16S.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
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
#!/bin/bash
# Job name:
#SBATCH --job-name=qiime2
#
# Account:
#SBATCH --account=fc_traxspec
#
# Partition:
#SBATCH --partition=savio2
#
# Request one node:
#SBATCH --nodes=1
#
# Specify one task:
#SBATCH --ntasks-per-node=1
#
# Number of processors for single task needed for use case (example):
#SBATCH --cpus-per-task=8
#
# Wall clock limit:
#SBATCH --time=72:00:00
#
#SBATCH --output=qiime2_All_16S_%j.out
#SBATCH --error=qiime2_All_16S_%j.err
#SBATCH --mail-type=END,FAIL
#SBATCH [email protected]
#
## Command(s) to run:
mkdir /global/scratch/users/neempatel/tmp
export TMPDIR=/global/scratch/users/neempatel/tmp
export MKL_NUM_THREADS=$SLURM_CPUS_PER_TASK
##Start QIIME2 environment:
module load qiime2/2020.11
##CasavaOneEightSingleLanePerSampleDirFmt - the format of data that comes off the illumina platform.
qiime tools import --type 'SampleData[PairedEndSequencesWithQuality]' --input-format CasavaOneEightSingleLanePerSampleDirFmt --input-path /global/scratch/users/neempatel/BS_16S_Raw/All_16S/Data/ --output-path /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.qza
##qiime demux summarize --help
##to visualize the data
qiime demux summarize --i-data /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.qza --p-n 10000 --o-visualization BS_16S_Raw/All_16S/QIIMEobjects/demux.qzv
##dada2 integrates quality scores into its algorithm.
qiime cutadapt trim-paired --i-demultiplexed-sequences /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.qza --p-cores 8 --p-front-f 'CCTACGGGNBGCASCAG' --p-front-r 'GACTACNVGGGTATCTAATCC' --p-match-adapter-wildcards --p-minimum-length 250 --p-discard-untrimmed --o-trimmed-sequences /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.trimmed.qza --verbose
##visualize trimmed data
qiime demux summarize --i-data /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.trimmed.qza --p-n 10000 --o-visualization /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.trimmed.qzv
##Make an OTU table
##To denoise and generate the OTU table:
qiime dada2 denoise-paired --i-demultiplexed-seqs /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.trimmed.qza --p-trunc-len-f 270 --p-trunc-len-r 200 --p-trim-left-f 0 --p-trim-left-r 0 --p-chimera-method consensus --p-pooling-method independent --p-n-reads-learn 1000000 --o-table /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.table.qza --o-representative-sequences /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.rep-seqs.qza --o-denoising-stats /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.stats.qza --verbose
##Turning the stats into qzv objects for visualization:
qiime feature-table summarize --i-table /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.table.qza --o-visualization /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.table.qzv
qiime feature-table tabulate-seqs --i-data /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.rep-seqs.qza --o-visualization /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.rep-seqs.qzv
qiime metadata tabulate --m-input-file /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.stats.qza --o-visualization /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.stats.qzv
##Taxonomy classification/assignment:
##qiime feature-classifier —-help
##classify-sklearn
qiime feature-classifier classify-sklearn --i-classifier /global/scratch/users/neempatel/Databases/silva-138-99-nb-classifier.qza --i-reads /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.rep-seqs.qza --o-classification /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.taxonomy.qza
##To visualize:
qiime metadata tabulate --m-input-file /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.taxonomy.qza --o-visualization /global/scratch/users/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.taxonomy.qzv
##To make a taxa barplot:
##qiime taxa barplot --i-table /global/scratch/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.table.qza --i-taxonomy /global/scratch/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/demux.taxonomy.qza --m-metadata-file /global/scratch/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/stats-metadata.tsv --o-visualization /global/scratch/neempatel/BS_16S_Raw/All_16S/QIIMEobjects/taxa-p-bar-plots.qzv