基于conda环境使用mamba conda安装配置QIIME 2 2024

基于总出现频率过滤,去掉低丰度序列,或筛选一定丰度的序列,比如说将频率低于1500的序列去掉,包括两个参数,最高和最低频率

The --p-min-frequency and --p-max-frequency can be combined to filter based on lower and upper limits of total frequency

这里只给了一个最低频率的限制。

qiime feature-table filter-samples \
  --i-table table.qza \
  --p-min-frequency 1500 \
  --o-filtered-table sample-frequency-filtered-table.qza

基于出现的偶然性的过滤???Contingency-based filtering,也就是最少在多少个样品中都需要出现,通量有最高和最低频率设定: --p-min-features and --p-min-samples。

qiime feature-table filter-features \
  --i-table table.qza \
  --p-min-samples 2 \
  --o-filtered-table sample-contingency-filtered-table.qza

字段筛选Identifier-based filtering, 也就是保留哪些特征数据内容。

qiime feature-table filter-samples \
  --i-table table.qza \
  --m-metadata-file samples-to-keep.tsv \
  --o-filtered-table id-filtered-table.qza

同样还有很多其他的筛选方式:

Metadata-based filtering

Taxonomy-based filtering of tables and sequences

序列过滤Filtering sequences

比如说这里根据原序列文件和分类文件提取mitochondria,chloroplast这两个门水平的序列文件。

qiime taxa filter-seqs \
  --i-sequences sequences.qza \
  --i-taxonomy taxonomy.qza \
  --p-include p__ \
  --p-exclude mitochondria,chloroplast \
  --o-filtered-sequences sequences-with-phyla-no-mitochondria-no-chloroplast.qza
Filtering distance matrices
qiime diversity filter-distance-matrix \
  --i-distance-matrix distance-matrix.qza \
  --m-metadata-file samples-to-keep.tsv \
  --o-filtered-distance-matrix identifier-filtered-distance-matrix.qza


qiime diversity filter-distance-matrix \
  --i-distance-matrix distance-matrix.qza \
  --m-metadata-file sample-metadata.tsv \
  --p-where "[subject]='subject-2'" \
  --o-filtered-distance-matrix subject-2-filtered-distance-matrix.qza

5、重要参考数据库

这个不多说了吧,大家按使用需求来下载,后面逐步会用到:

Data resources — QIIME 2 2023.9.2 documentation

6、各个插件模块使用

不熟悉的先查看help信息和官网介绍:

  • q2-alignment

q2-alignment 是 QIIME 2 生态系统中的一个插件,用于对生物信息学序列数据进行比对和序列比较的工具。它可以用于将不同样本中的序列进行比对,分析它们之间的相似性和差异性。q2-alignment 提供了一些常用的比对算法和工具,使用户能够对序列进行比对、生成比对结果和后续的分析。

以下是 q2-alignment 插件的一些主要功能和使用方法:

功能和用途:
  1. 序列比对:对DNA、RNA或蛋白质序列进行比对。
  2. 多序列比对:能够处理多个序列文件,比对它们之间的相似性。
  3. 生成比对结果:产生比对结果,以便后续分析或可视化。
  4. 支持多种比对算法:包括常用的比对算法,如BLAST、MUSCLE、MAFFT 等。
qiime alignment --help
Usage: qiime alignment [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin provides support for generating and
  manipulating sequence alignments.

  Plugin website: https://github.com/qiime2/q2-alignment

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  mafft      De novo multiple sequence alignment with MAFFT
  mafft-add  Add sequences to multiple sequence alignment with MAFFT.
  mask       Positional conservation and gap filtering.

# 运行比对(示例使用 MAFFT)
qiime alignment mafft \
  --i-sequences sequences.qza \
  --o-alignment aligned_sequences.qza
  • q2-composition

用于进行组成分析,尤其是在处理微生物组数据中的相对丰度数据时非常有用。该插件可以帮助用户探索和比较微生物组中微生物群落的组成。

qiime composition --help
Usage: qiime composition [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin supports methods for compositional data
  analysis.

  Plugin website: https://github.com/qiime2/q2-composition

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  add-pseudocount  Add pseudocount to table.
  ancom            Apply ANCOM to identify features that differ in abundance.
  ancombc          Analysis of Composition of Microbiomes with Bias Correction
  da-barplot       Differential abundance bar plots
  tabulate         View tabular output from ANCOM-BC.

# 导入数据
qiime composition add-pseudocount \
  --i-table table.qza \
  --o-composition-table composition.qza

#数据转换
qiime composition ilr-transform \
  --i-table composition.qza \
  --o-transformed-table ilr_composition.qza

#可视化分析结果
qiime composition pcoa \
  --i-table ilr_composition.qza \
  --o-pcoa ilr_composition_pcoa.qza

qiime emperor plot \
  --i-pcoa ilr_composition_pcoa.qza \
  --m-metadata-file metadata.txt \
  --o-visualization ilr_composition_emperor.qzv

q2-cutadapt

q2-cutadapt插件是用于对DNA序列数据进行预处理和过滤的工具。它基于Cutadapt软件,允许用户对Illumina测序数据进行裁剪(trimming)、过滤(filtering)和修剪(adapter removal)等操作,以消除低质量序列、去除适配器、修剪序列末端等。这有助于提高序列数据的质量,为后续的分析准备干净、高质量的数据。

#
qiime cutadapt --help
Usage: qiime cutadapt [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin uses cutadapt to work with adapters (e.g.
  barcodes, primers) in sequence data.

  Plugin website: https://github.com/qiime2/q2-cutadapt

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  demux-paired  Demultiplex paired-end sequence data with barcodes in-
                sequence.
  demux-single  Demultiplex single-end sequence data with barcodes in-
                sequence.
  trim-paired   Find and remove adapters in demultiplexed paired-end
                sequences.
  trim-single   Find and remove adapters in demultiplexed single-end
                sequences.
qiime cutadapt trim-paired \
  --i-demultiplexed-sequences demux.qza \
  --p-cores 8 \
  --p-front-f CCTACGGGNGGCWGCAG \
  --p-front-r GACTACHVGGGTATCTAATCC \
  --p-discard-untrimmed \
  --o-trimmed-sequences demux_trimmed.qza

参数解释:
–i-demultiplexed-sequences: 输入的序列文件(需提前导入到QIIME 2)。
–p-cores: 并行处理的CPU核心数量。
–p-front-f 和 --p-front-r: 正向和反向引物序列。
–p-discard-untrimmed: 丢弃未被修剪的序列。
–o-trimmed-sequences: 输出修剪后的序列文件。

  • q2-dada2

q2-dada2是QIIME 2的插件之一,基于DADA2算法,用于去噪和分析Illumina测序生成的16S rRNA数据。

qiime dada2 --help
Usage: qiime dada2 [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin wraps DADA2 and supports sequence quality
  control for single-end and paired-end reads using the DADA2 R library.

  Plugin website: http://benjjneb.github.io/dada2/

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  denoise-ccs     Denoise and dereplicate single-end Pacbio CCS
  denoise-paired  Denoise and dereplicate paired-end sequences
  denoise-pyro    Denoise and dereplicate single-end pyrosequences
  denoise-single  Denoise and dereplicate single-end sequences

qiime dada2 denoise-single \
  --i-demultiplexed-seqs input-demux.qza \
  --p-trim-left 0 \
  --p-trunc-len 120 \
  --o-representative-sequences rep-seqs-dada2.qza \
  --o-table table-dada2.qza \
  --o-denoising-stats stats-dada2.qza


参数说明:

  • --i-demultiplexed-seqs:输入的demultiplexed序列文件。

  • --p-trim-left:要去除的序列的前部分碱基数量。

  • --p-trunc-len:截断序列的长度。

  • --o-representative-sequences:输出的代表序列文件。

  • --o-table:生成的特征表文件。

  • --o-denoising-stats:生成的去噪统计文件。

  • q2-deblur

q2-deblur插件通过识别和去除16S rRNA基因测序数据中的测序错误和噪声,以生成高质量的序列数据。其主要步骤包括:

  1. 生成特征表(Feature table): 从原始的FASTQ格式文件中导入数据,创建特征表。
  2. 质量过滤: 过滤低质量序列,去除低质量序列读数。
  3. 去噪处理: 使用Deblur算法去除测序错误和噪声,生成高质量的特征序列。
  4. 生成结果: 输出一个经过去噪处理和质量过滤的特征表和序列文件。
qiime deblur --help
Usage: qiime deblur [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin wraps the Deblur software for performing
  sequence quality control.

  Plugin website: https://github.com/biocore/deblur

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  denoise-16S      Deblur sequences using a 16S positive filter.
  denoise-other    Deblur sequences using a user-specified positive filter.
  visualize-stats  Visualize Deblur stats per sample.

qiime deblur denoise-16S \
  --i-demultiplexed-seqs your_qza_file.qza \
  --p-trim-length 250 \  # 设置序列截断长度
  --o-representative-sequences rep_seqs.qza \
  --o-table table.qza \
  --p-sample-stats \     # 如果需要生成样本统计信息
  --o-stats deblur_stats.qza

结果数据导出

# 结果数据导出
qiime tools export --input-path rep_seqs.qza --output-path exported_rep_seqs
qiime tools export --input-path table.qza --output-path exported_table
qiime tools export --input-path deblur_stats.qza --output-path exported_stats

  • q2-demux

q2-demux 插件用于处理 DNA 或 RNA 测序数据的样本数据解复用(demultiplexing)和质量控制。这个插件允许用户根据样本的不同 DNA 或 RNA 序列标签(barcode 或者 Illumina 测序的 index)将混合测序数据集拆分成单独的样本。下面是 q2-demux 插件的基本介绍和使用步骤:

q2-demux 插件功能:
  1. 数据解复用(Demultiplexing)

    • 将混合测序数据根据每个样本的唯一标识(barcode 或 index)分割成单独的样本序列文件。
  2. 质量控制

    • 提供了检查序列数据质量的功能,允许用户查看样本数据的质量分数并进行必要的处理,比如修剪或过滤低质量序列。
qiime demux --help
Usage: qiime demux [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin supports demultiplexing of single-end and
  paired-end sequence reads and visualization of sequence quality information.

  Plugin website: https://github.com/qiime2/q2-demux

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  emp-paired                Demultiplex paired-end sequence data generated
                            with the EMP protocol.
  emp-single                Demultiplex sequence data generated with the EMP
                            protocol.
  filter-samples            Filter samples out of demultiplexed data.
  partition-samples-paired  Split demultiplexed sequence data into partitions.
  partition-samples-single  Split demultiplexed sequence data into partitions.
  subsample-paired          Subsample paired-end sequences without
                            replacement.
  subsample-single          Subsample single-end sequences without
                            replacement.
  summarize                 Summarize counts per sample.
  tabulate-read-counts      Tabulate counts per sample

# 执行去重复
qiime demux emp-paired \
  --i-seqs demux.qza \
  --m-barcodes-file sample-metadata.tsv \
  --m-barcodes-column BarcodeSequence \
  --o-per-sample-sequences demux-paired-end.qza \
  --o-error-correction-details demux-details.qza

## 查看结果
qiime demux summarize \
  --i-data demux-paired-end.qza \
  --o-visualization demux-summary.qzv

  • q2-diversity

q2-diversity是其中一个用于计算和分析生物多样性的插件。它可以帮助你评估样本群落的多样性和差异性。

qiime diversity --help
Usage: qiime diversity [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin supports metrics for calculating and
  exploring community alpha and beta diversity through statistics and
  visualizations in the context of sample metadata.

  Plugin website: https://github.com/qiime2/q2-diversity

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  adonis                     adonis PERMANOVA test for beta group significance
  alpha                      Alpha diversity
  alpha-correlation          Alpha diversity correlation
  alpha-group-significance   Alpha diversity comparisons
  alpha-phylogenetic         Alpha diversity (phylogenetic)
  alpha-rarefaction          Alpha rarefaction curves
  beta                       Beta diversity
  beta-correlation           Beta diversity correlation
  beta-group-significance    Beta diversity group significance
  beta-phylogenetic          Beta diversity (phylogenetic)
  beta-rarefaction           Beta diversity rarefaction
  bioenv                     bioenv
  core-metrics               Core diversity metrics (non-phylogenetic)
  core-metrics-phylogenetic  Core diversity metrics (phylogenetic and non-
                             phylogenetic)
  filter-distance-matrix     Filter samples from a distance matrix.
  mantel                     Apply the Mantel test to two distance matrices
  partial-procrustes         Partial Procrustes
  pcoa                       Principal Coordinate Analysis
  pcoa-biplot                Principal Coordinate Analysis Biplot
  procrustes-analysis        Procrustes Analysis
  tsne                       t-distributed stochastic neighbor embedding
  umap                       Uniform Manifold Approximation and Projection

# Alpha多样性(样本内部多样性)
# 计算Shannon指数:
qiime diversity alpha \
  --i-table your_feature_table.qza \
  --p-metric shannon \
  --o-alpha-diversity shannon_vector.qza

#Beta多样性(样本间多样性)
# 计算Bray-Curtis距离:

qiime diversity beta \
  --i-table your_feature_table.qza \
  --p-metric braycurtis \
  --o-distance-matrix braycurtis_distance_matrix.qza

# 可视化和统计分析
qiime diversity alpha-group-significance \
  --i-alpha-diversity shannon_vector.qza \
  --m-metadata-file your_sample_metadata.txt \
  --o-visualization shannon_group_significance.qzv
qiime diversity beta-group-significance \
  --i-distance-matrix braycurtis_distance_matrix.qza \
  --m-metadata-file your_sample_metadata.txt \
  --o-visualization braycurtis_group_significance.qzv


  • q2-diversity-lib
q2-diversity-lib 简介

q2-diversity-lib是QIIME 2的一个插件,用于计算多样性指数和样本间的差异。它基于多种生物多样性指标来评估微生物群落的多样性,并允许用户进行统计比较和可视化。

功能特性
  1. 计算多样性指数:支持计算多种多样性指数,如Shannon、Simpson、Chao1等,可以帮助衡量群落内物种的多样性和丰富度。
  2. Beta多样性计算:计算不同样本之间的差异和相似性,例如Bray-Curtis、Jaccard、Unweighted UniFrac、Weighted UniFrac等距离指标。
  3. Beta多样性可视化:生成多样性分析的可视化图表,如PCoA(Principal Coordinates Analysis)图表,展示样本之间的差异。
  4. 组间比较:支持组间多样性比较,通过PERMANOVA(Permutational Multivariate Analysis of Variance)等方法进行样本群落的差异性分析。
qiime diversity-lib --help
Usage: qiime diversity-lib [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin computes individual metrics for  community
  alpha and beta diversity.

  Plugin website: https://github.com/qiime2/q2-diversity-lib

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  alpha-passthrough               Alpha Passthrough (non-phylogenetic)
  beta-passthrough                Beta Passthrough (non-phylogenetic)
  beta-phylogenetic-meta-passthrough
                                  Beta Phylogenetic Meta Passthrough
  beta-phylogenetic-passthrough   Beta Phylogenetic Passthrough
  bray-curtis                     Bray-Curtis Dissimilarity
  faith-pd                        Faith's Phylogenetic Diversity
  jaccard                         Jaccard Distance
  observed-features               Observed Features
  pielou-evenness                 Pielou's Evenness
  shannon-entropy                 Shannon's Entropy
  unweighted-unifrac              Unweighted Unifrac
  weighted-unifrac                Weighted Unifrac

计算使用

#计算Alpha多样性(多样性指数)
qiime diversity alpha \
  --i-table table.qza \
  --p-metric shannon \
  --o-alpha-diversity shannon_alpha.qza

#计算Beta多样性距离
qiime diversity beta \
  --i-table table.qza \
  --p-metric braycurtis \
  --o-distance-matrix braycurtis_distance.qza

#可视化Beta多样性分析结果(例如PCoA)
qiime diversity pcoa \
  --i-distance-matrix braycurtis_distance.qza \
  --o-pcoa braycurtis_pcoa.qza
qiime emperor plot \
  --i-pcoa braycurtis_pcoa.qza \
  --m-metadata-file sample-metadata.tsv \
  --o-visualization braycurtis_emperor.qzv

#进行组间多样性比较(以PERMANOVA为例)
qiime diversity beta-group-significance \
  --i-distance-matrix braycurtis_distance.qza \
  --m-metadata-file sample-metadata.tsv \
  --o-visualization braycurtis_permanova.qzv \
  --p-method permanova

  • q2-emperor
qiime emperor --help
Usage: qiime emperor [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin wraps Emperor and supports interactive
  visualization of ordination plots.

  Plugin website: http://emperor.microbio.me

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  biplot           Visualize and Interact with Principal Coordinates Analysis
                   Biplot
  plot             Visualize and Interact with Principal Coordinates Analysis
                   Plots
  procrustes-plot  Visualize and Interact with a procrustes plot

  • q2-feature-classifier

q2-feature-classifier 是 QIIME 2 中的一个插件,用于对16S rRNA或ITS等序列数据进行分类和注释。它主要用于将序列分类为特定的分类单元,比如对OTUs(操作分类单元)或者物种进行分类。

qiime feature-classifier --help
Usage: qiime feature-classifier [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin supports taxonomic classification of
  features using a variety of methods, including Naive Bayes, vsearch, and
  BLAST+.

  Plugin website: https://github.com/qiime2/q2-feature-classifier

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  blast                           BLAST+ local alignment search.
  classify-consensus-blast        BLAST+ consensus taxonomy classifier
  classify-consensus-vsearch      VSEARCH-based consensus taxonomy classifier
  classify-hybrid-vsearch-sklearn
                                  ALPHA Hybrid classifier: VSEARCH exact match
                                  + sklearn classifier
  classify-sklearn                Pre-fitted sklearn-based taxonomy classifier
  extract-reads                   Extract reads from reference sequences.
  find-consensus-annotation       Find consensus among multiple annotations.
  fit-classifier-naive-bayes      Train the naive_bayes classifier
  fit-classifier-sklearn          Train an almost arbitrary scikit-learn
                                  classifier
  makeblastdb                     Make BLAST database.
  vsearch-global                  VSEARCH global alignment search

#训练一个 SILVA 数据库上的分类器可以使用如下命令
qiime feature-classifier fit-classifier-naive-bayes \
  --i-reference-reads silva-132-99-515-806-nb-classifier.qza \
  --i-reference-taxonomy silva-132-99-515-806-nb-classifier.qza \
  --o-classifier classifier.qza

#  使用训练好的分类器对样本数据进行分类
qiime feature-classifier classify-sklearn \
  --i-classifier classifier.qza \
  --i-reads paired-end-demux.qza \
  --o-classification taxonomy.qza

  • q2-feature-table

q2-feature-table 插件是 QIIME 2 中的一个重要插件,用于处理和操作特征表(feature table)数据,它包括了许多功能,用于对微生物组数据进行分析和可视化。

以下是 q2-feature-table 插件的一些主要功能和使用方法:

  1. 导入特征表数据: 可以使用该插件将不同格式的特征表数据导入到 QIIME 2 中,如BIOM格式、文本格式、或其他常见格式的特征表。
  2. 特征表汇总和统计: 可以对特征表进行汇总和统计描述,比如计算每个样本中的特征数量、每个特征在样本中的出现频率等。
  3. 特征表的过滤和修剪: 提供了多种方法对特征表进行过滤和修剪,如去除低频特征、去除低丰度特征、保留指定样本数或特征数等。
  4. 特征表的转换和变换: 可以对特征表进行转换,如转置、归一化、对数转换等,以适应不同类型的分析需求。
  5. 特征表的合并和拆分: 可以将多个特征表合并为一个,也可以根据样本元数据信息将特征表拆分为多个子集。
  6. 特征表的可视化: 支持对特征表进行可视化展示,比如生成特征数量分布图、绘制热图展示特征在样本中的丰度等。
qiime feature-table --help
Usage: qiime feature-table [OPTIONS] COMMAND [ARGS]...

  Description: This is a QIIME 2 plugin supporting operations on sample by
  feature tables, such as filtering, merging, and transforming tables.

  Plugin website: https://github.com/qiime2/q2-feature-table

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  core-features                  Identify core features in table
  filter-features                Filter features from table
  filter-features-conditionally  Filter features from a table based on
                                 abundance and prevalence
  filter-samples                 Filter samples from table
  filter-seqs                    Filter features from sequences
  group                          Group samples or features by a metadata
                                 column
  heatmap                        Generate a heatmap representation of a
                                 feature table
  merge                          Combine multiple tables
  merge-seqs                     Combine collections of feature sequences
  merge-taxa                     Combine collections of feature taxonomies
  presence-absence               Convert to presence/absence
  rarefy                         Rarefy table
  relative-frequency             Convert to relative frequencies
  rename-ids                     Renames sample or feature ids in a table
  split                          Split one feature table into many
  subsample                      Subsample table
  summarize                      Summarize table
  tabulate-seqs                  View sequence associated with each feature
  transpose                      Transpose a feature table.

#特征表的摘要和统计信息
qiime feature-table summarize \
  --i-table feature-table.qza \
  --o-visualization feature-table-summary.qzv

#特征表的过滤和修剪
qiime feature-table filter-features \
  --i-table feature-table.qza \
  --p-min-frequency 10 \
  --o-filtered-table filtered-feature-table.qza

qiime feature-table filter-samples \
  --i-table feature-table.qza \
  --p-min-frequency 500 \
  --o-filtered-table filtered-sample-table.qza

# 特征表的合并和操作
qiime feature-table merge \
  --i-tables table1.qza \
  --i-tables table2.qza \
  --o-merged-table merged-table.qza

#计算特征表的β-diversity:
qiime diversity beta \
  --i-table feature-table.qza \
  --o-distance-matrix beta-diversity.qza \
  --p-metric braycurtis

#可视化特征表
qiime feature-table summarize \
  --i-table feature-table.qza \
  --o-visualization feature-table-summary.qzv

#可视化β-diversity距离矩阵
qiime diversity beta-phylogenetic \
  --i-table feature-table.qza \
  --i-phylogeny rooted-tree.qza \
  --o-distance-matrix beta-diversity.qza \
  --p-metric unweighted_unifrac

qiime diversity pcoa \
  --i-distance-matrix beta-diversity.qza \
  --o-pcoa pcoa-results.qza

qiime emperor plot \
  --i-pcoa pcoa-results.qza \
  --m-metadata-file sample-metadata.tsv \
  --o-visualization emperor.qzv

  • q2-fragment-insertion

q2-fragment-insertion插件是用于将未分配的DNA序列(通常是16S rRNA或18S rRNA序列)嵌入(插入)到预先构建的参考进化树中的工具。这个插件可以帮助解决一些问题,比如通过将未知序列嵌入到进化树中,来推断未知序列的系统发育位置。

qiime fragment-insertion --help
Usage: qiime fragment-insertion [OPTIONS] COMMAND [ARGS]...

  Description: No description available. See plugin website:
  https://github.com/qiime2/q2-fragment-insertion

  Plugin website: https://github.com/qiime2/q2-fragment-insertion

  Getting user support: https://github.com/qiime2/q2-fragment-insertion/issues

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  classify-otus-experimental  Experimental: Obtain taxonomic lineages, by
                              finding closest OTU in reference phylogeny.
  filter-features             Filter fragments in tree from table.
  sepp                        Insert fragment sequences using SEPP into
                              reference phylogenies.

qiime fragment-insertion sepp \
  --i-representative-sequences <代表序列文件.qza> \
  --i-reference-database <参考数据库.qza> \
  --o-tree <输出进化树.qza> \
  --o-placements <输出插入位置文件.qza>

  • --i-representative-sequences 是代表性序列文件的位置。

  • --i-reference-database 是参考数据库文件的位置。

  • --o-tree 指定输出的进化树文件。

  • --o-placements 指定输出的插入位置文件。

  • q2-longitudinal

q2-longitudinal 插件是 QIIME 2 中的一个插件,专门用于处理微生物组长期研究的数据。该插件允许用户对时间序列实验数据进行分析,以便检测微生物组随时间变化的情况,比较不同条件下的变化,以及对这些变化的统计显著性进行评估。

以下是 q2-longitudinal 插件的一些主要功能和使用命令:

主要功能:
  1. 时间序列数据可视化:生成时间序列样本数据的可视化图表,比如长期研究的变化趋势、样本之间的差异等。
  2. 差异分析:比较不同时间点或不同处理组之间的微生物组成差异。
  3. Alpha 和 Beta 多样性分析:评估微生物群落在时间序列中的多样性和相似性变化。
  4. 线性混合效应模型:对微生物组数据进行线性模型分析,以研究时间、处理效应和其交互作用对微生物组成的影响。
qiime longitudinal --help
Usage: qiime longitudinal [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin supports methods for analysis of time
  series data, involving either paired sample comparisons or longitudinal
  study designs.

  Plugin website: https://github.com/qiime2/q2-longitudinal

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  anova                    ANOVA test
  feature-volatility       Feature volatility analysis
  first-differences        Compute first differences or difference from
                           baseline between sequential states
  first-distances          Compute first distances or distance from baseline
                           between sequential states
  linear-mixed-effects     Linear mixed effects modeling
  maturity-index           Microbial maturity index prediction.
  nmit                     Nonparametric microbial interdependence test
  pairwise-differences     Paired difference testing and boxplots
  pairwise-distances       Paired pairwise distance testing and boxplots
  plot-feature-volatility  Plot longitudinal feature volatility and
                           importances
  volatility               Generate interactive volatility plot

#导入数据
qiime longitudinal feature-table-merge \
  --i-longitudinal-feature-tables feature-table.qza \
  --o-merged-table merged-table.qza

#线性混合效应模型
qiime longitudinal linear-mixed-effects \
  --m-metadata-file sample-metadata.tsv \
  --m-metadata-file timepoints.tsv \
  --p-metric Shannon_index \
  --p-group-columns treatment \
  --p-state-column time \
  --p-individual-id-column subject \
  --o-visualization lme-results.qzv

#可视化
qiime longitudinal volatility \
  --i-table merged-table.qza \
  --m-metadata-file sample-metadata.tsv \
  --p-state-column time \
  --p-individual-id-column subject \
  --o-visualization volatility.qzv

#组间差异
qiime longitudinal pairwise-differences \
  --m-metadata-file sample-metadata.tsv \
  --m-metadata-file timepoints.tsv \
  --p-metric Shannon_index \
  --p-group-column treatment \
  --p-state-column time \
  --p-individual-id-column subject \
  --o-visualization pairwise-differences.qzv

#α多样性图表
qiime longitudinal maturity-index \
  --i-alpha-diversity alpha-diversity.qza \
  --m-metadata-file sample-metadata.tsv \
  --p-state-column time \
  --p-individual-id-column subject \
  --o-visualization maturity-index.qzv

  • q2-metadata

q2-metadata 插件用于处理和操作元数据,元数据是描述样本信息的数据,比如样本来源、处理方法、实验条件等。以下是 q2-metadata 插件的简要介绍和一些常见的使用命令:

q2-metadata 插件的功能:
  1. 元数据导入: 将元数据文件导入到 QIIME 2 格式中。
  2. 元数据可视化: 可视化元数据内容以便更好地理解样本信息。
  3. 元数据的处理和编辑: 对元数据进行筛选、编辑和转换。
  4. 元数据统计和摘要: 统计和生成关于元数据的摘要信息。
qiime metadata --help
Usage: qiime metadata [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin provides functionality for working with and
  visualizing Metadata.

  Plugin website: https://github.com/qiime2/q2-metadata

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  distance-matrix  Create a distance matrix from a numeric Metadata column
  merge            Merge metadata
  shuffle-groups   Shuffle values in a categorical sample metadata column.
  tabulate         Interactively explore Metadata in an HTML table

# 1. 元数据导入:
qiime metadata tabulate --m-input-file sample-metadata.tsv --o-visualization sample-metadata.qzv
# 2. 元数据可视化:
qiime metadata tabulate --m-input-file sample-metadata.qza --o-visualization sample-metadata.qzv
# 3. 元数据编辑与处理:
#  删除列:
qiime metadata tabulate --m-input-file sample-metadata.qza --o-visualization sample-metadata.qzv
#  筛选行(过滤):
qiime metadata tabulate --m-input-file sample-metadata.qza --o-visualization sample-metadata.qzv
# 4. 元数据统计和摘要:
qiime metadata tabulate --m-input-file sample-metadata.qza --o-visualization sample-me
  • q2-phylogeny

q2-phylogeny插件则提供了处理生物多样性分析中的系统发育信息的功能。该插件主要用于构建系统发育树和处理系统发育树相关的操作,例如序列的进化树推断、进化树的根节点分配等。

qiime phylogeny --help
Usage: qiime phylogeny [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin supports generating and manipulating
  phylogenetic trees.

  Plugin website: https://github.com/qiime2/q2-phylogeny

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  align-to-tree-mafft-fasttree  Build a phylogenetic tree using fasttree and
                                mafft alignment
  align-to-tree-mafft-iqtree    Build a phylogenetic tree using iqtree and
                                mafft alignment.
  align-to-tree-mafft-raxml     Build a phylogenetic tree using raxml and
                                mafft alignment.
  fasttree                      Construct a phylogenetic tree with FastTree.
  filter-table                  Remove features from table if they're not
                                present in tree.
  filter-tree                   Remove features from tree based on metadata
  iqtree                        Construct a phylogenetic tree with IQ-TREE.
  iqtree-ultrafast-bootstrap    Construct a phylogenetic tree with IQ-TREE
                                with bootstrap supports.
  midpoint-root                 Midpoint root an unrooted phylogenetic tree.
  raxml                         Construct a phylogenetic tree with RAxML.
  raxml-rapid-bootstrap         Construct a phylogenetic tree with bootstrap
                                supports using RAxML.
  robinson-foulds               Calculate Robinson-Foulds distance between
                                phylogenetic trees.

## 构建系统发育树:
#使用多序列比对后的结果构建系统发育树。可以使用q2-phylogeny中的FastTree或RAxML进行树的构建。以下是使用FastTree的示例命令:
qiime phylogeny fasttree \
  --i-alignment aligned-sequences.qza \
  --o-tree tree.qza

# 或者使用RAxML进行系统发育树的构建:
qiime phylogeny raxml \
  --i-alignment aligned-sequences.qza \
  --p-substitution-model GTRGAMMA \
  --o-tree tree.qza \
  --verbose

## 可选操作 - 根节点分配:
# 有时,你可能需要为系统发育树分配根节点。可以使用q2-phylogeny中的根节点分配插件进行此操作。以下是一个示例命令:
qiime phylogeny midpoint-root \
  --i-tree tree.qza \
  --o-rooted-tree rooted-tree.qza
  • q2-quality-control

q2-quality-control 插件旨在进行序列数据的质量控制和过滤,它可以执行以下任务:

  • 对序列数据进行质量评估
  • 去除低质量序列
  • 截取或修剪序列的部分
  • 去除嵌合序列(chimeras)
  • 过滤低频序列
  • q2-quality-filter

q2-quality-filter插件用于对DNA测序数据进行质量控制和过滤,以去除低质量的序列。这有助于提高后续分析的准确性和可靠性。

qiime quality-control --help
Usage: qiime quality-control [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin supports methods for assessing and
  controlling the quality of feature and sequence data.

  Plugin website: https://github.com/qiime2/q2-quality-control

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Commands:
  bowtie2-build              Build bowtie2 index from reference sequences.
  decontam-identify          Identify contaminants
  decontam-identify-batches  Identify contaminants in Batch Mode
  decontam-remove            Removes contaminant
  decontam-score-viz         Generate a histogram representation of the scores
  evaluate-composition       Evaluate expected vs. observed taxonomic
                             composition of samples
  evaluate-seqs              Compare query (observed) vs. reference (expected)
                             sequences.
  evaluate-taxonomy          Evaluate expected vs. observed taxonomic
                             assignments
  exclude-seqs               Exclude sequences by alignment
  filter-reads               Filter demultiplexed sequences by alignment to
                             reference database.

qiime quality-filter q-score \
  --i-demux paired-end-demux.qza \
  --p-min-quality 20 \
  --o-filtered-sequences demux-filtered.qza \
  --o-filter-stats demux-filter-stats.qza

  • q2-sample-classifier

而q2-sample-classifier是Qiime 2中的一个插件,用于样本分类和预测。它可以帮助用户利用机器学习算法对样本进行分类,比较不同条件下的微生物组成差异,例如,预测分类数据(如临床数据)和微生物组成之间的关系。

qiime sample-classifier --help
Usage: qiime sample-classifier [OPTIONS] COMMAND [ARGS]...

  Description: This QIIME 2 plugin supports methods for supervised
  classification and regression of sample metadata, and other supervised
  machine learning methods.

  Plugin website: https://github.com/qiime2/q2-sample-classifier

  Getting user support: Please post to the QIIME 2 forum for help with this
  plugin: https://forum.qiime2.org

Options:
  --version            Show the version and exit.
  --example-data PATH  Write example data and exit.


为了做好运维面试路上的助攻手,特整理了上百道 **【运维技术栈面试题集锦】** ,让你面试不慌心不跳,高薪offer怀里抱!

这次整理的面试题,**小到shell、MySQL,大到K8s等云原生技术栈,不仅适合运维新人入行面试需要,还适用于想提升进阶跳槽加薪的运维朋友。**

![](https://img-blog.csdnimg.cn/img_convert/d4b77cdda3135d71aba40e1b7838f188.png)

本份面试集锦涵盖了

*   **174 道运维工程师面试题**
*   **128道k8s面试题**
*   **108道shell脚本面试题**
*   **200道Linux面试题**
*   **51道docker面试题**
*   **35道Jenkis面试题**
*   **78道MongoDB面试题**
*   **17道ansible面试题**
*   **60道dubbo面试题**
*   **53道kafka面试**
*   **18道mysql面试题**
*   **40道nginx面试题**
*   **77道redis面试题**
*   **28道zookeeper**

**总计 1000+ 道面试题, 内容 又全含金量又高**

*   **174道运维工程师面试题**

> 1、什么是运维?

> 2、在工作中,运维人员经常需要跟运营人员打交道,请问运营人员是做什么工作的?

> 3、现在给你三百台服务器,你怎么对他们进行管理?

> 4、简述raid0 raid1raid5二种工作模式的工作原理及特点

> 5、LVS、Nginx、HAproxy有什么区别?工作中你怎么选择?

> 6、Squid、Varinsh和Nginx有什么区别,工作中你怎么选择?

> 7、Tomcat和Resin有什么区别,工作中你怎么选择?

> 8、什么是中间件?什么是jdk?

> 9、讲述一下Tomcat8005、8009、8080三个端口的含义?

> 10、什么叫CDN?

> 11、什么叫网站灰度发布?

> 12、简述DNS进行域名解析的过程?

> 13、RabbitMQ是什么东西?

> 14、讲一下Keepalived的工作原理?

> 15、讲述一下LVS三种模式的工作过程?

> 16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?

> 17、如何重置mysql root密码?

**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**

**[需要这份系统化的资料的朋友,可以点击这里获取!](https://bbs.csdn.net/topics/618542503)**

**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**
不慌心不跳,高薪offer怀里抱!

这次整理的面试题,**小到shell、MySQL,大到K8s等云原生技术栈,不仅适合运维新人入行面试需要,还适用于想提升进阶跳槽加薪的运维朋友。**

[外链图片转存中...(img-vEaBGJ99-1714367457740)]

本份面试集锦涵盖了

*   **174 道运维工程师面试题**
*   **128道k8s面试题**
*   **108道shell脚本面试题**
*   **200道Linux面试题**
*   **51道docker面试题**
*   **35道Jenkis面试题**
*   **78道MongoDB面试题**
*   **17道ansible面试题**
*   **60道dubbo面试题**
*   **53道kafka面试**
*   **18道mysql面试题**
*   **40道nginx面试题**
*   **77道redis面试题**
*   **28道zookeeper**

**总计 1000+ 道面试题, 内容 又全含金量又高**

*   **174道运维工程师面试题**

> 1、什么是运维?

> 2、在工作中,运维人员经常需要跟运营人员打交道,请问运营人员是做什么工作的?

> 3、现在给你三百台服务器,你怎么对他们进行管理?

> 4、简述raid0 raid1raid5二种工作模式的工作原理及特点

> 5、LVS、Nginx、HAproxy有什么区别?工作中你怎么选择?

> 6、Squid、Varinsh和Nginx有什么区别,工作中你怎么选择?

> 7、Tomcat和Resin有什么区别,工作中你怎么选择?

> 8、什么是中间件?什么是jdk?

> 9、讲述一下Tomcat8005、8009、8080三个端口的含义?

> 10、什么叫CDN?

> 11、什么叫网站灰度发布?

> 12、简述DNS进行域名解析的过程?

> 13、RabbitMQ是什么东西?

> 14、讲一下Keepalived的工作原理?

> 15、讲述一下LVS三种模式的工作过程?

> 16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?

> 17、如何重置mysql root密码?

**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**

**[需要这份系统化的资料的朋友,可以点击这里获取!](https://bbs.csdn.net/topics/618542503)**

**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**
  • 9
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值