标签:有用 读者 tsv 有根树 nat 推荐 tree metadata als
source activate qiime2-2017.6
source deactivate
mkdir -p qiime2-moving-pictures-tutorial
cd qiime2-moving-pictures-tutorial
wget -O "sample-metadata.tsv" "https://data.qiime2.org/2017.6/tutorials/moving-pictures/sample_metadata.tsv"
rm sample_metadata.tsv
wget http://bailab.genetics.ac.cn/markdown/sample-metadata.tsv
mkdir -p emp-single-end-sequences
wget -O "emp-single-end-sequences/barcodes.fastq.gz" "https://data.qiime2.org/2017.6/tutorials/moving-pictures/emp-single-end-sequences/barcodes.fastq.gz"
wget -O "emp-single-end-sequences/sequences.fastq.gz" "https://data.qiime2.org/2017.6/tutorials/moving-pictures/emp-single-end-sequences/sequences.fastq.gz"
qiime tools import \
--type EMPSingleEndSequences \
--input-path emp-single-end-sequences \
--output-path emp-single-end-sequences.qza
qiime demux emp-single \
--i-seqs emp-single-end-sequences.qza \
--m-barcodes-file sample-metadata.tsv \
--m-barcodes-category BarcodeSequence \
--o-per-sample-sequences demux.qza
qiime demux summarize \
--i-data demux.qza \
--o-visualization demux.qzv
qiime tools view demux.qzv
# 单端序列去噪, 去除左端0bp(--p-trim-left用于切除边缘低质量区),序列切成120bp长;生成代表序列和OTU表;并重命名用于下游分析
qiime dada2 denoise-single \
--i-demultiplexed-seqs demux.qza \
--p-trim-left 0 \
--p-trunc-len 120 \
--o-representative-sequences rep-seqs-dada2.qza \
--o-table table-dada2.qza
mv rep-seqs-dada2.qza rep-seqs.qza
mv table-dada2.qza table.qza
# 按测序质量过滤序列
qiime quality-filter q-score \
--i-demux demux.qza \
--o-filtered-sequences demux-filtered.qza \
--o-filter-stats demux-filter-stats.qza
# 去冗余生成OTU表和代表序列;结果文件名有deblur,没有用于下游分析,请读者想测试的自己尝试
qiime deblur denoise-16S \
--i-demultiplexed-seqs demux-filtered.qza \
--p-trim-length 120 \
--o-representative-sequences rep-seqs-deblur.qza \
--o-table table-deblur.qza \
--o-stats deblur-stats.qza
qiime feature-table summarize \
--i-table table.qza \
--o-visualization table.qzv \
--m-sample-metadata-file sample-metadata.tsv
qiime tools view table.qzv
qiime feature-table tabulate-seqs \
--i-data rep-seqs.qza \
--o-visualization rep-seqs.qzv
qiime tools view rep-seqs.qzv
# 多序列比对
qiime alignment mafft \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza
# 移除高变区
qiime alignment mask \
--i-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza
# 建树
qiime phylogeny fasttree \
--i-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza
# 无根树转换为有根树
qiime phylogeny midpoint-root \
--i-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza
qiime diversity core-metrics \
--i-phylogeny rooted-tree.qza \
--i-table table.qza \
--p-sampling-depth 1080 \
--output-dir core-metrics-results
qiime diversity alpha-group-significance \
--i-alpha-diversity core-metrics-results/faith_pd_vector.qza \
--m-metadata-file sample-metadata.tsv \
--o-visualization core-metrics-results/faith-pd-group-significance.qzv
qiime diversity alpha-group-significance \
--i-alpha-diversity core-metrics-results/evenness_vector.qza \
--m-metadata-file sample-metadata.tsv \
--o-visualization core-metrics-results/evenness-group-significance.qzv
qiime tools view core-metrics-results/evenness-group-significance.qzv
qiime diversity beta-group-significance \
--i-distance-matrix core-metrics-results/unweighted_unifrac_distance_matrix.qza \
--m-metadata-file sample-metadata.tsv \
--m-metadata-category BodySite \
--o-visualization core-metrics-results/unweighted-unifrac-body-site-significance.qzv \
--p-pairwise
qiime diversity beta-group-significance \
--i-distance-matrix core-metrics-results/unweighted_unifrac_distance_matrix.qza \
--m-metadata-file sample-metadata.tsv \
--m-metadata-category Subject \
--o-visualization core-metrics-results/unweighted-unifrac-subject-group-significance.qzv \
--p-pairwise
qiime emperor plot \
--i-pcoa core-metrics-results/unweighted_unifrac_pcoa_results.qza \
--m-metadata-file sample-metadata.tsv \
--p-custom-axis DaysSinceExperimentStart \
--o-visualization core-metrics-results/unweighted-unifrac-emperor.qzv
qiime emperor plot \
--i-pcoa core-metrics-results/bray_curtis_pcoa_results.qza \
--m-metadata-file sample-metadata.tsv \
--p-custom-axis DaysSinceExperimentStart \
--o-visualization core-metrics-results/bray-curtis-emperor.qzv
qiime tools view core-metrics-results/bray-curtis-emperor.qzv
wget -O "gg-13-8-99-515-806-nb-classifier.qza" "https://data.qiime2.org/2017.6/common/gg-13-8-99-515-806-nb-classifier.qza"
qiime feature-classifier classify-sklearn \
--i-classifier gg-13-8-99-515-806-nb-classifier.qza \
--i-reads rep-seqs.qza \
--o-classification taxonomy.qza
qiime taxa tabulate \
--i-data 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
qiime tools view taxa-bar-plots.qzv
qiime composition add-pseudocount \
--i-table table.qza \
--o-composition-table comp-table.qza
qiime composition ancom \
--i-table comp-table.qza \
--m-metadata-file sample-metadata.tsv \
--m-metadata-category BodySite \
--o-visualization ancom-BodySite.qzv
qiime tools view ancom-BodySite.qzv
qiime taxa collapse \
--i-table table.qza \
--i-taxonomy taxonomy.qza \
--p-level 2 \
--o-collapsed-table table-l2.qza
qiime composition add-pseudocount \
--i-table table-l2.qza \
--o-composition-table comp-table-l2.qza
qiime composition ancom \
--i-table comp-table-l2.qza \
--m-metadata-file sample-metadata.tsv \
--m-metadata-category BodySite \
--o-visualization l2-ancom-BodySite.qzv
扩增子分析QIIME2分析实战Moving Pictures
标签:有用 读者 tsv 有根树 nat 推荐 tree metadata als
原文地址:http://www.cnblogs.com/freescience/p/7270834.html