基于conda环境使用mamba/conda安装配置QIIME 2 2023.9 Amplicon扩增子分析环境,q2cli主要功能模块介绍及使用

QIIME 2 2023.9 Amplicon Distribution介绍:

概述

qiime团队专门针对高通量扩增子序列分析退出的conda集成环境,包括了主要和常见的扩增子分析模块,用户可以单独使用各个模块,也可以使用各模块组成不同的分析流程。从2023.09版本开始特意将扩增子和宏基因组shotgun分成了两个环境,可能一个环境集成太大了。这样安装应该更轻盈。

QIIME 2 2023.9 Amplicon Distribution

看看文章吧,超强的团队:Reproducible, interactive, scalable and extensible microbiome data science using QIIME 2 | Nature Biotechnology

2023.9Amplicon分发版qiime2主要功能模块介绍: 

The 2023.9 release of the QIIME 2 Amplicon Distribution includes the QIIME 2 framework, q2cli (a QIIME 2 command-line interface) and the following plugins:

  • q2-alignment

  • q2-composition

  • q2-cutadapt

  • q2-dada2

  • q2-deblur

  • q2-demux

  • q2-diversity

  • q2-diversity-lib

  • q2-emperor

  • q2-feature-classifier

  • q2-feature-table

  • q2-fragment-insertion

  • q2-longitudinal

  • q2-metadata

  • q2-phylogeny

  • q2-quality-control

  • q2-quality-filter

  • q2-sample-classifier

  • q2-taxa

  • q2-types

  • q2-vsearch

还有更多的模块,都可以单独安装,一般建议成套安装就行:

QIIME 2 Library

 

QIIME2的安装:

还是继续用conda吧,这个用起来也挺方便,docker稍微增加了点门槛,看个人喜好

 官方安装介绍链接:

先看介绍选择分发板,根据自己喜好安装:Installing QIIME 2 — QIIME 2 2023.9.2 documentation

这里选择amplicon扩增子分析的环境:

查看安装指引:

Natively installing QIIME 2 — QIIME 2 2023.9.2 documentation

 选择amplicon分发版的linux环境配置指导:

下载环境依赖文件并安装: 

# 下载环境依赖配置文件
wget https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2023.9-py38-linux-conda.yml# 使用mamba或conda 安装 ,-n后的名字自己定义就行
mamba env create -n qiime2-amplicon-2023.9 --file qiime2-amplicon-2023.9-py38-linux-conda.yml

要升级qiime2?,建议按日期名称命名各个版本重新安装,不需要的就直接删除旧的环境,因为有些旧的环境下的模块大家可能还需要用到,而在新的环境下可能已经废弃或更新了,所以建议重新配置安装新的conda环境就行。

开始使用qiime2 amplicon分发版 

要看怎么使用,或纠错,这里应该是最全的了,User Support - QIIME 2 Forum

这里来自刘永鑫团队的扩增子分析流程大家可以参考,把其中对应的步骤改为使用qiime模块分析即可:

使用vsearch进行16s扩增子高通量序列分析步骤-CSDN博客

EasyAmplicon (易扩增子)-扩增子高通量序列分析软件流程及脚本-详细使用方法——来自刘永鑫团队的秘籍-CSDN博客

当然qiime2 不仅仅提供分析模块,还开发了很多workflow,一个命令就可以按照workflow来得到结果了;可视化也有流程,后面大家看着参考:

 Overview of QIIME 2 Plugin Workflows — QIIME 2 2023.9.2 documentation

 

 

先激活环境并查看环境信息

# 激活环境,conda或mamba
mamba activate qiime2-amplicon-2023.9# 查看帮助信息
qiime --help

开始qiime2分析

分析前建议大家先建立独立的工作目录,并进入工作目录再开始操作:

1、导入数据:

查看帮助:

qiime tools import --helpUsage: qiime tools import [OPTIONS]Import data to create a new QIIME 2 Artifact. See https://docs.qiime2.org/for usage examples and details on the file types and associated semantictypes that can be imported.Options:--type TEXT             The semantic type of the artifact that will becreated upon importing. Use --show-importable-typesto see what importable semantic types are availablein the current deployment.                [required]--input-path PATH       Path to file or directory that should be imported.[required]--output-path ARTIFACT  Path where output artifact should be written.[required]--input-format TEXT     The format of the data to be imported. If notprovided, data must be in the format expected by thesemantic type provided via --type.--show-importable-types Show the semantic types that can be supplied to--type to import data into an artifact.--show-importable-formatsShow formats that can be supplied to --input-formatto import data into an artifact.--help                  Show this message and exit.

 大家可以先使用样例文件做为参考,然后按样例文件整理自己的数据

单端序列导入(序列文件与barcode文件各自独立)

复制官方代码时注意删除上面的引号,这个复制过来容易变成中文的双引号,另外还需要注意存储路径的设置 :

获取样例文件 

# 进入工作目录
cd emp-single-end-sequences/# barcode文件
wget \-O barcodes.fastq.gz \https://data.qiime2.org/2023.9/tutorials/moving-pictures/emp-single-end-sequences/barcodes.fastq.gz# 序列文件,这里是单端序列
wget \-O sequences.fastq.gz \https://data.qiime2.org/2023.9/tutorials/moving-pictures/emp-single-end-sequences/sequences.fastq.gz

查看要导入的文件格式:

# 
zcat barcodes.fastq.gz | head -n 10
# barcode文件内容,
@HWI-EAS440_0386:1:23:17547:1423#0/1
ATGCAGCTCAGT
+
IIIIIIIIIIIH
@HWI-EAS440_0386:1:23:14818:1533#0/1
CCCCTCAGCGGC
+
DDD@D?@B<<+/
@HWI-EAS440_0386:1:23:14401:1629#0/1
GACGAGTCAGTC#
zcat sequences.fastq.gz | head -n 10# sequences文件内容
@HWI-EAS440_0386:1:23:17547:1423#0/1
TACGNAGGATCCGAGCGTTATCCGGATTTATTGGGTTTAAAGGGAGCGTAGATGGATGTTTAAGTCAGTTGTGAAAGTTTGCGGCTCAACCGTAAAATTGCAGTTGATACTGGATATCTTGAGTGCAGTTGAGGCAGGGGGGGATTGGTGTG
+
IIIE)EEEEEEEEGFIIGIIIHIHHGIIIGIIHHHGIIHGHEGDGIFIGEHGIHHGHHGHHGGHEEGHEGGEHEBBHBBEEDCEDDD>B?BE@@B>@@@@@CB@ABA@@?@@=>?08;3=;==8:5;@6?######################
@HWI-EAS440_0386:1:23:14818:1533#0/1
CCCCNCAGCGGCAAAAATTAAAATTTTTACCGCTTCGGCGTTATAGCCTCACACTCAATCTTTTATCACGAAGTCATGATTGAATCGCGAGTGGTCGGCAGATTGCGATAAACGGGCACATTAAATTTAAACTGATGATTCCACTGCAACAA
+
64<2$24;1)/:*B<?BBDDBBD<>BDD############################################################################################################################
@HWI-EAS440_0386:1:23:14401:1629#0/1
TACGNAGGATCCGAGCGTTATCCGGATTTATTGGGTTTAAAGGGAGCGTAGGCGGACGCTTAAGTCAGTTGTGAAAGTTTGCGGCTCAACCGTAAAATTGCAGTTGATACTGGGTGTCTTGAGTACAGTAGAGGCAGGGGGGGGGTTGGGGG
## 激活 qiime2环境:## 导入数据
qiime tools import \--type EMPSingleEndSequences \--input-path ./ \--output-path emp-single-end-sequences.qza#### qiime tools import --show-importable-types  这个命令已经废弃了,大家注意在新版里没法用qiime tools list-types
Usage: qiime tools list-types [OPTIONS] [QUERIES]...List the available semantic types.Options:--strict    Show only exact matches for the type argument(s).--tsv       Print as machine readable tab-separated values.--help      Show this message and exit.

双端序列导入(序列文件与barcode文件各自独立)

获取样例文件  

cd emp-paired-end-sequences
# 下载正向序列
wget \-O forward.fastq.gz \https://data.qiime2.org/2023.9/tutorials/atacama-soils/1p/forward.fastq.gz#下载反向序列
wget \-O reverse.fastq.gz \https://data.qiime2.org/2023.9/tutorials/atacama-soils/1p/reverse.fastq.gz# 下载barcodes文件
wget \-O barcodes.fastq.gz \https://data.qiime2.org/2023.9/tutorials/atacama-soils/1p/barcodes.fastq.gz
# 查看输入文件格式
# 正向序列文件内容
zcat forward.fastq.gz | head -n 10
@M00176:65:000000000-A41FR:1:1101:14282:1412 1:N:0:0
NACGTAGGGTGCAAGCGTTAATCGGAATTACNGGNNNTAAAGCGTGCNNAGGCNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
#>>>AAF@ACAA4BGCEEECGGHGGEFCFBG#BA###BABAEFGEEE##BBAA###########B######################################################################################
@M00176:65:000000000-A41FR:1:1101:16939:1420 1:N:0:0
NACGTAGGGGGCAAGCGTTGTCCGGAATCATTGGNNGTAAAGAGCGTGNAGGCNNNNNGNNANNTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
#>>ABAF@ABBBGGGGEEFGGGHGGFFGFHHHHH##BBEFDHHCGGFG#ABFF#####B##B##B######################################################################################
@M00176:65:000000000-A41FR:1:1101:14746:1560 1:N:0:0
TACGTAGGGAGCTAGCGTTGTCCGGAATCATTGGGCGTAAAGCGCGCGTAGGCGGCCAGATAAGTCCGGTGTAAAAGCCACAGGCTNNNNNNNNNNNNNNNNCNGGANNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNANNNNNGGN# 反向序列文件内容
zcat reverse.fastq.gz | head -n 10
@M00176:65:000000000-A41FR:1:1101:14282:1412 2:N:0:0
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCGGAATNCCATNCCNCTCTGCNNNNNNNNNNNNNNNNNNNNNNNNN
+
#########################################################################################################<</?F/#/</?#?<#<???/<#########################
@M00176:65:000000000-A41FR:1:1101:16939:1420 2:N:0:0
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNCNNTNCNNNNNNNNNNNGGGAATTCCACNCGCCTCTTCNNNNNNNNNNNNNNNNNNNNNNNNN
+
######################################################################################?#?##?#?###########<??/?FC>FBF#</??FAGHG#########################
@M00176:65:000000000-A41FR:1:1101:14746:1560 2:N:0:0
NNNNTTTCGTNGATNNNNNNNCNGNNNNNNNNNNNNNNNNNNNTNNNNNNNTACCNNNNNNNNTGGGCCTCTGTGCGCATACCGTTCGAGAGCGCCGGCCACGGCATTCGTGTTGCTCCTCTAAGCTGTGCGTGTTCACTGTACAACCNNN# barcode文件内容
zcat barcodes.fastq.gz | head -n 10
@M00176:65:000000000-A41FR:1:1101:14282:1412 1:N:0:0
NNNNNNNNNNNN
+
############
@M00176:65:000000000-A41FR:1:1101:16939:1420 1:N:0:0
NNNNNNNNNNNN
+
############
@M00176:65:000000000-A41FR:1:1101:14746:1560 1:N:0:0
NNNNNNNNNNNN

数据导入:

cd emp-paired-end-sequencesqiime tools import \--type EMPPairedEndSequences \--input-path ./ \--output-path emp-paired-end-sequences.qza

带barcodes的单端序列文件导入

获取样例文件 

#
cd muxed-se-barcode-in-seq/
wget \-O sequences.fastq.gz \https://data.qiime2.org/2023.9/tutorials/importing/muxed-se-barcode-in-seq.fastq.gz
# 查看输入文件格式:
zcat sequences.fastq.gz | head -n 20
@M00899:113:000000000-A5K20:1:1101:18850:2539 1:N:0:2
GCTACGGGGGGCAGCAGTGGGGAATATTGCACAATGGGCGAAAGCCTGATGCAGCAACGCCGCGTGAACGATGAAGGTCTTCGGATCGTAAAGTTCTGTTGCAGGGGAAGATAATGACGGTACCCTGTGAGGAAGCCCCGGCTAACTACGTGCCAGCAGCCGCGGTAATACGTAGGGGGCTAGCGTTATCCGGATTTACTGGGCGTAAAGGGTGCGTAGGTGGTCCTTCAAGTCGGTGGTTAAAGGCTAAGGCTCAACCGTAGTAAGCCGCCGAAACTGGAGGACTTGAGTGAAGGAGAGG
+
-8ABCC>=>5811884:<:99=?@EECFFGDFADECFFFEEDDEFEDEDFFFEEFCCBCF>CCB3CFF:BBFFFCCD,8@9C@C:+5@@:A@C<FDCFBEG>FFFDGCCEC?FGGGGGGGGGCFGGFCFGGGGGGGGGGEG7CFFGFFFGGGFG?FACE;:8CCCCEEF9<F@FFEGGC**/:3:2CC@:C;C81;C9<?>FF8C758CGGG2:7DC>EECEFE9+27CF492/8B7>D)7@F=FFCFF*9F52<2,289<0:44AB<49(3<>F51).69D?D34*44:4<5<B?::086
@M00899:113:000000000-A5K20:1:1101:25454:3578 1:N:0:2
CCTACGGGAGGCAGCAGTGAGGAATATTGGTCAATGGGCGAGAGCCTGAACCAGCCAAGTAGCGTGCAGGATGACGGCCCTATGGGTTGTAAACTGCTTTTGTATGGGGATAAAGTCAGTCACGTGTGATTGTTTGCAGGTACCATACGAATAAGGACCGGCTAATTCCGTGCCAGCAGCCGCGGTAATACGGAAGGTCCGGGCGTTATCCGGATTTATTGGGTTTAAAGGGAGCGTAGGCTGGAGATTAAGTGTGTTGTGAAATGTAGACGCTCAACGTCTGACTTGCAGCGCATACTGG
+
8ACCCGD@AA=18=======;CEFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGEGGGGGGFFF?FGGGGGGGGEGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGCGFGGGFFFGGGGGGEFGGGGGGGGGGGGCGEGGDGGGGGGGGGG=CGGCECDGGFGGGGGGGGFGGGF>C>BFFEGFFFFF:FGGF=6=6:AFBGFFFFFFA9A<AFB?@0)>C:0<CF?C46FAD<??90;::?DA>
@M00899:113:000000000-A5K20:1:1101:25177:3605 1:N:0:2
CCTACGGGAGGCAGCAGTGAGGAATATTGGTCAATGGACGGAAGTCTGAACCAGCCAAGTAGCGTGCAGGATGACGGCCCTATGGGTTGTAAACTGCTTTTGTATGGGGATAAAGTTAGGGACGTGTCCCTATTTGCAGGTACCATACGAATAAGGACCGGCTAATTCCGTGCCAGCAGCCGCGGTAATACGGAAGGTCCAGGCGTTATCCGGATTTATTGGGTTTAAAGGGAGCGTAGGCTGGAGATTAAGTGTGTTGTGAAATGTAGACGCTCAACGTCTGAATTGCAGCGCATACTGG
+
88BCCEDAD9018======;;CCFGGGGFGGGFGGGGGGGGGGGGGGGGGGGGGGGFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGFGGGGGGGGGGGGGFGGGGGGGGGGGGGGGGEGDGGGGGGGGGFFGGGGGGGGGFGGGFGGGFGGGFFGCGGGGGGFGGFDGGGGGGGGGGGGG5CBFGCGGGGC?FGGGGGGGGGGGDEGDDDGFGGGGGEGGGGGGA39>BFFDDEF4:D5@CE?CFFF>>ABGFFF9<A246<<<<B::DE=<?FGGFG4>F?DF?02211:DAF7### barcode已经在序列中

导入文件:

qiime tools import \--type MultiplexedSingleEndBarcodeInSequence \--input-path sequences.fastq.gz \--output-path multiplexed-seqs.qza

当然还有其他可导入文件格式,慢慢看吧,个人觉得有需要的时候查一下就行,不用全部了解:

qiime tools list-formats --importable

2、导出数据

官方示例,大家可以下载下来测试一下就行了,不再细讲了。

 下载测试:

wget \-O "feature-table.qza" \"https://data.qiime2.org/2023.9/tutorials/exporting/feature-table.qza"wget \-O "unrooted-tree.qza" \"https://data.qiime2.org/2023.9/tutorials/exporting/unrooted-tree.qza"
qiime tools export \--input-path feature-table.qza \--output-path exported-feature-table## 导出为biom格式文件
## 参考:https://biom-format.org/documentation/format_versions/biom-2.1.htmlqiime tools export \--input-path unrooted-tree.qza \--output-path exported-tree## 导出为.nwk文件,可在各类软件再直接出发育树的图
head tree.nwk 
(((New.CleanUp.ReferenceOTU1480:0.11995,(New.CleanUp.ReferenceOTU202:0.04479,New.CleanUp.ReferenceOTU432:0.0049)0.769:0.04661)1:0.26705,((New.CleanUp.ReferenceOTU1150:0.00016,(New.CleanUp.ReferenceOTU782:0.04264,(New.CleanUp.ReferenceOTU643:0.10438,(((New.CleanUp.ReferenceOTU1014:0.01521,New.CleanUp.ReferenceOTU270:0.02738)0.879:0.02315,(((New.CleanUp.ReferenceOTU1008:0.0378,(New.CleanUp.ReferenceOTU1222:0.01621,(New.CleanUp.ReferenceOTU230:0.01829,(New.CleanUp.ReferenceOTU1047:0.0303,New.CleanUp.ReferenceOTU605:0.00015)0.88:0.01596)0.871:0.01515)0.714:0.01214)0.996:0.06757,(New.CleanUp.ReferenceOTU681:0.00441,(New.CleanUp.ReferenceOTU1485:0.01177,New.CleanUp.ReferenceOTU130:0.05699)0.923:0.02883)0.367:0.02397)0.17:0.00665,(New.CleanUp.ReferenceOTU1330:0.0258,(New.CleanUp.ReferenceOTU903:0.04234,(((New.CleanUp.ReferenceOTU1077:0.00014,(New.CleanUp.ReferenceOTU582:0.0171,New.CleanUp.ReferenceOTU987:0.0226)0.951:0.02372)0.892:0.02206,(New.CleanUp.ReferenceOTU891:0.01038,(((New.CleanUp.ReferenceOTU1066:0.01299,New.CleanUp.ReferenceOTU764:0.02254)0.851:0.01818,(New.CleanUp.ReferenceOTU180:0.02021,New.CleanUp.ReferenceOTU535:0.00014)0.795:0.01084)0.921:0.02441,(New.CleanUp.ReferenceOTU1212:0.00521mkdir extracted-feature-table
qiime tools extract \--input-path feature-table.qza \--output-path extracted-feature-table## 

3、样品元数据处理

这个可能得科学上网,给大家下载了,大家参考下载吧。

https://download.csdn.net/download/zrc_xiaoguo/88616825?spm=1001.2014.3001.5503

样例文件列表:

sample-metadata数据:

元数据表qiime2转换命令:

qiime metadata tabulate \--m-input-file sample-metadata.tsv \--o-visualization tabulated-sample-metadata.qzvqiime metadata tabulate \--m-input-file faith_pd_vector.qza \--o-visualization tabulated-faith-pd-metadata.qzvqiime metadata tabulate \--m-input-file sample-metadata.tsv \--m-input-file faith_pd_vector.qza \--o-visualization tabulated-combined-metadata.qzvqiime emperor plot \--i-pcoa unweighted_unifrac_pcoa_results.qza \--m-metadata-file sample-metadata.tsv \--m-metadata-file faith_pd_vector.qza \--o-visualization unweighted-unifrac-emperor-with-alpha.qzv

转换后数据qzv查看

4、数据过滤

Filtering data — QIIME 2 2023.9.2 documentation

特征表过滤Filtering feature tables

基于总出现频率过滤,去掉低丰度序列,或筛选一定丰度的序列,比如说将频率低于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.qzaqiime 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 andmanipulating sequence alignments.Plugin website: https://github.com/qiime2/q2-alignmentGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 MAFFTmafft-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 dataanalysis.Plugin website: https://github.com/qiime2/q2-compositionGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 Correctionda-barplot       Differential abundance bar plotstabulate         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.qzaqiime 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-cutadaptGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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-endsequences.trim-single   Find and remove adapters in demultiplexed single-endsequences.
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 qualitycontrol 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 thisplugin: https://forum.qiime2.orgOptions:--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 CCSdenoise-paired  Denoise and dereplicate paired-end sequencesdenoise-pyro    Denoise and dereplicate single-end pyrosequencesdenoise-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 performingsequence quality control.Plugin website: https://github.com/biocore/deblurGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 andpaired-end sequence reads and visualization of sequence quality information.Plugin website: https://github.com/qiime2/q2-demuxGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 generatedwith the EMP protocol.emp-single                Demultiplex sequence data generated with the EMPprotocol.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 withoutreplacement.subsample-single          Subsample single-end sequences withoutreplacement.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 andexploring community alpha and beta diversity through statistics andvisualizations in the context of sample metadata.Plugin website: https://github.com/qiime2/q2-diversityGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 significancealpha                      Alpha diversityalpha-correlation          Alpha diversity correlationalpha-group-significance   Alpha diversity comparisonsalpha-phylogenetic         Alpha diversity (phylogenetic)alpha-rarefaction          Alpha rarefaction curvesbeta                       Beta diversitybeta-correlation           Beta diversity correlationbeta-group-significance    Beta diversity group significancebeta-phylogenetic          Beta diversity (phylogenetic)beta-rarefaction           Beta diversity rarefactionbioenv                     bioenvcore-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 matricespartial-procrustes         Partial Procrustespcoa                       Principal Coordinate Analysispcoa-biplot                Principal Coordinate Analysis Biplotprocrustes-analysis        Procrustes Analysistsne                       t-distributed stochastic neighbor embeddingumap                       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  communityalpha and beta diversity.Plugin website: https://github.com/qiime2/q2-diversity-libGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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-passthroughBeta Phylogenetic Meta Passthroughbeta-phylogenetic-passthrough   Beta Phylogenetic Passthroughbray-curtis                     Bray-Curtis Dissimilarityfaith-pd                        Faith's Phylogenetic Diversityjaccard                         Jaccard Distanceobserved-features               Observed Featurespielou-evenness                 Pielou's Evennessshannon-entropy                 Shannon's Entropyunweighted-unifrac              Unweighted Unifracweighted-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 interactivevisualization of ordination plots.Plugin website: http://emperor.microbio.meGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 AnalysisBiplotplot             Visualize and Interact with Principal Coordinates AnalysisPlotsprocrustes-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 offeatures using a variety of methods, including Naive Bayes, vsearch, andBLAST+.Plugin website: https://github.com/qiime2/q2-feature-classifierGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 classifierclassify-consensus-vsearch      VSEARCH-based consensus taxonomy classifierclassify-hybrid-vsearch-sklearnALPHA Hybrid classifier: VSEARCH exact match+ sklearn classifierclassify-sklearn                Pre-fitted sklearn-based taxonomy classifierextract-reads                   Extract reads from reference sequences.find-consensus-annotation       Find consensus among multiple annotations.fit-classifier-naive-bayes      Train the naive_bayes classifierfit-classifier-sklearn          Train an almost arbitrary scikit-learnclassifiermakeblastdb                     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 byfeature tables, such as filtering, merging, and transforming tables.Plugin website: https://github.com/qiime2/q2-feature-tableGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 tablefilter-features                Filter features from tablefilter-features-conditionally  Filter features from a table based onabundance and prevalencefilter-samples                 Filter samples from tablefilter-seqs                    Filter features from sequencesgroup                          Group samples or features by a metadatacolumnheatmap                        Generate a heatmap representation of afeature tablemerge                          Combine multiple tablesmerge-seqs                     Combine collections of feature sequencesmerge-taxa                     Combine collections of feature taxonomiespresence-absence               Convert to presence/absencerarefy                         Rarefy tablerelative-frequency             Convert to relative frequenciesrename-ids                     Renames sample or feature ids in a tablesplit                          Split one feature table into manysubsample                      Subsample tablesummarize                      Summarize tabletabulate-seqs                  View sequence associated with each featuretranspose                      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.qzaqiime 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_unifracqiime diversity pcoa \--i-distance-matrix beta-diversity.qza \--o-pcoa pcoa-results.qzaqiime 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-insertionPlugin website: https://github.com/qiime2/q2-fragment-insertionGetting user support: https://github.com/qiime2/q2-fragment-insertion/issuesOptions:--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, byfinding closest OTU in reference phylogeny.filter-features             Filter fragments in tree from table.sepp                        Insert fragment sequences using SEPP intoreference 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 timeseries data, involving either paired sample comparisons or longitudinalstudy designs.Plugin website: https://github.com/qiime2/q2-longitudinalGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 testfeature-volatility       Feature volatility analysisfirst-differences        Compute first differences or difference frombaseline between sequential statesfirst-distances          Compute first distances or distance from baselinebetween sequential stateslinear-mixed-effects     Linear mixed effects modelingmaturity-index           Microbial maturity index prediction.nmit                     Nonparametric microbial interdependence testpairwise-differences     Paired difference testing and boxplotspairwise-distances       Paired pairwise distance testing and boxplotsplot-feature-volatility  Plot longitudinal feature volatility andimportancesvolatility               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 andvisualizing Metadata.Plugin website: https://github.com/qiime2/q2-metadataGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 columnmerge            Merge metadatashuffle-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 manipulatingphylogenetic trees.Plugin website: https://github.com/qiime2/q2-phylogenyGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 andmafft alignmentalign-to-tree-mafft-iqtree    Build a phylogenetic tree using iqtree andmafft alignment.align-to-tree-mafft-raxml     Build a phylogenetic tree using raxml andmafft alignment.fasttree                      Construct a phylogenetic tree with FastTree.filter-table                  Remove features from table if they're notpresent in tree.filter-tree                   Remove features from tree based on metadataiqtree                        Construct a phylogenetic tree with IQ-TREE.iqtree-ultrafast-bootstrap    Construct a phylogenetic tree with IQ-TREEwith 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 bootstrapsupports using RAxML.robinson-foulds               Calculate Robinson-Foulds distance betweenphylogenetic 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 andcontrolling the quality of feature and sequence data.Plugin website: https://github.com/qiime2/q2-quality-controlGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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 contaminantsdecontam-identify-batches  Identify contaminants in Batch Modedecontam-remove            Removes contaminantdecontam-score-viz         Generate a histogram representation of the scoresevaluate-composition       Evaluate expected vs. observed taxonomiccomposition of samplesevaluate-seqs              Compare query (observed) vs. reference (expected)sequences.evaluate-taxonomy          Evaluate expected vs. observed taxonomicassignmentsexclude-seqs               Exclude sequences by alignmentfilter-reads               Filter demultiplexed sequences by alignment toreference 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 supervisedclassification and regression of sample metadata, and other supervisedmachine learning methods.Plugin website: https://github.com/qiime2/q2-sample-classifierGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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-samples            Train and test a cross-validated supervisedlearning classifier.classify-samples-from-dist  Run k-nearest-neighbors on a labeled distancematrix.classify-samples-ncv        Nested cross-validated supervised learningclassifier.confusion-matrix            Make a confusion matrix from sample classifierpredictions.fit-classifier              Fit a supervised learning classifier.fit-regressor               Fit a supervised learning regressor.heatmap                     Generate heatmap of important features.metatable                   Convert (and merge) positive numeric metadata(in)to feature table.predict-classification      Use trained classifier to predict target valuesfor new samples.predict-regression          Use trained regressor to predict target valuesfor new samples.regress-samples             Train and test a cross-validated supervisedlearning regressor.regress-samples-ncv         Nested cross-validated supervised learningregressor.scatterplot                 Make 2D scatterplot and linear regression ofregressor predictions.split-table                 Split a feature table into training and testingsets.summarize                   Summarize parameter and feature extractioninformation for a trained estimator.
qiime sample-classifier classify-samples \--i-table feature-table.qza \--m-metadata-file sample-metadata.qza \--m-metadata-column TARGET_COLUMN \--p-test-size 0.2 \--p-random-state 42 \--p-n-estimators 100 \--p-n-jobs 1 \--o-visualization classification-results.qzv
  • --i-table 指定特征表格的位置
  • --m-metadata-file 指定样本元数据的位置
  • --m-metadata-column 指定用于分类的目标列
  • --p-test-size 设置测试集的比例
  • --p-random-state 设置随机种子以确保结果可重复
  • --p-n-estimators 设置分类器使用的估计器数量
  • --p-n-jobs 设置用于计算的作业数
  • --o-visualization 指定输出结果的位置
  • q2-taxa

q2-taxa 插件则用于分析和可视化分类学信息,特别是对于已经进行了序列分类(比如16S rRNA)的数据。q2-taxa 允许用户对物种注释信息进行处理、汇总和可视化。

qiime taxa --help
Usage: qiime taxa [OPTIONS] COMMAND [ARGS]...Description: This QIIME 2 plugin provides functionality for working with andvisualizing taxonomic annotations of features.Plugin website: https://github.com/qiime2/q2-taxaGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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:barplot       Visualize taxonomy with an interactive bar plotcollapse      Collapse features by their taxonomy at the specified levelfilter-seqs   Taxonomy-based feature sequence filter.filter-table  Taxonomy-based feature table filter.
# 1. 导入数据
# 使用命令 qiime taxa 可以导入并生成用于分类学分析的数据格式。例如:
qiime taxa import \--input-path taxonomy.tsv \--output-path taxonomy.qza \--type 'FeatureData[Taxonomy]'# 2. 查看物种丰度
# 命令 qiime taxa barplot 可以用于生成物种丰度的柱状图,用于可视化各个样本中不同分类水平的相对丰度。
qiime taxa barplot \--i-table table.qza \--i-taxonomy taxonomy.qza \--m-metadata-file sample-metadata.tsv \--o-visualization taxa-bar-plot.qzv# 3. 物种注释
# 可通过 qiime taxa classify-sklearn 命令使用机器学习分类器进行序列的物种注释。以下是一个例子:
qiime taxa classify-sklearn \--i-reads rep-seqs.qza \--i-classifier classifier.qza \--o-classification taxonomy.qza# 4. 特定分类水平的筛选和可视化
# 可以使用 qiime taxa filter-table 和 qiime taxa filter-seqs 命令在特定分类水平对数据进行过滤。然后,可以使用其他命令可视化已过滤的数据。# 5. 物种多样性分析
使用 qiime taxa collapse 和 qiime taxa rarefy 等命令可以对物种注释数据进行聚合和稀释,以进行多样性分析。
  • q2-types

q2-types插件旨在处理和管理不同类型的数据,包括:

  • DNA 序列
  • RNA 序列
  • 蛋白质序列
  • 样本和元数据信息
  • q2-vsearch

 q2-vsearch 插件则是 QIIME 2 中用于序列相似性搜索和聚类的插件之一。它基于 VSEARCH,提供了执行序列相似性搜索、聚类和序列分析的功能。这个基本上与直接使用vesearch直接使用差不多了,只不过这里集成后可以直接与qiime的其他模块相结合使用。

qiime vsearch --help
Usage: qiime vsearch [OPTIONS] COMMAND [ARGS]...Description: This plugin wraps the vsearch application, and provides methodsfor clustering and dereplicating features and sequences.Plugin website: https://github.com/qiime2/q2-vsearchGetting user support: Please post to the QIIME 2 forum for help with thisplugin: https://forum.qiime2.orgOptions:--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:cluster-features-closed-referenceClosed-reference clustering of features.cluster-features-de-novo        De novo clustering of features.cluster-features-open-referenceOpen-reference clustering of features.dereplicate-sequences           Dereplicate sequences.fastq-stats                     Fastq stats with vsearch.merge-pairs                     Merge paired-end reads.uchime-denovo                   De novo chimera filtering with vsearch.uchime-ref                      Reference-based chimera filtering with
# 序列相似性搜索
# 使用 q2-vsearch 插件进行序列相似性搜索的命令:
qiime vsearch search-sequences \--i-query query_sequences.qza \--i-reference reference_sequences.qza \--o-results search_results.qza \--o-perc-identity output_identity.qza \--o-failed-sequences failed_sequences.qza
# 此命令将执行一项序列搜索,将查询序列与参考序列集进行比较,并生成包含搜索结果的文件。# 序列聚类
# 利用 q2-vsearch 进行序列聚类的命令示例:
qiime vsearch cluster-features-de-novo \--i-sequences sequences.qza \--i-table table.qza \--p-perc-identity 0.97 \--o-clustered-table clustered_table.qza \--o-clustered-sequences clustered_sequences.qza \--o-new-reference-sequences new_reference_sequences.qza

当然还有分析结果的可视化

在线可视化,拖拽出图:QIIME 2 View

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/213753.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

外汇天眼:掌握这个技巧,你也能成为交易高手

在金融市场这个大潮中&#xff0c;外汇交易因其高杠杆、24小时交易等特点吸引着无数交易者。然而成功的交易并非易事&#xff0c;对于投资者来说&#xff0c;外汇交易市场是一个复杂且多变的市场&#xff0c;要在外汇市场中获得成功就需要扎实的外汇金融基础知识和独特的策略&a…

RocketMQ - Spring Cloud Alibaba RocketMQ

Spring Cloud Stream是Spring Cloud体系内的一个框架&#xff0c;用于构建与共享消息传递系统连接的高度可伸缩的事件驱动微服务&#xff0c;其目的是简化消息业务在Spring Cloud应用中的开发。 Spring Cloud Stream的架构图如下所示&#xff0c;应用程序通过Spring Cloud Str…

论文阅读《Domain Generalized Stereo Matching via Hierarchical Visual Transformation》

论文地址&#xff1a;https://openaccess.thecvf.com/content/CVPR2023/html/Chang_Domain_Generalized_Stereo_Matching_via_Hierarchical_Visual_Transformation_CVPR_2023_paper.html 概述 立体匹配模型是近年来的研究热点。但是&#xff0c;现有的方法过分依赖特定数据集上…

五年制专转本备考冲刺阶段,老师给你六点建议助你上岸

1、热衷的不是学习&#xff0c;而是思考 人与人之间最大的差别在于思维的差别&#xff0c;也可以说是思考的差别。专转本也是如此&#xff0c;有人思考得简单&#xff0c;有人思考得复杂&#xff1b;有人想得全面&#xff0c;有人想得肤浅。 只有善于思考&#xff0c;才会对问…

100:ReconFusion: 3D Reconstruction with Diffusion Priors

简介 官网 少样本重建必然导致nerf失败&#xff0c;论文提出使用diffusion模型来解决这一问题。从上图不难看出&#xff0c;论文一步步提升视角数量&#xff0c;逐步与Zip-NeRF对比。 实现流程 Diffusion Model for Novel View Synthesis 给定一组输入图像 x o b s { x i…

Jmeter beanshell编程实例

1、引言 BeanShell是一种小型的&#xff0c;免费的&#xff0c;可嵌入的符合Java语法规范的源代码解释器&#xff0c;具有对象脚本语言特性。 在Jmeter实践中&#xff0c;由于BeanShell组件较高的自由度&#xff0c;通常被用来处理较为复杂&#xff0c;其它组件难以处理的问题…

c语言:文件操作(1)

前言&#xff1a;为什么要使用文件 使用文件可以让程序在不同运行之间保存和读取数据。这样可以实现持久化存储&#xff0c;即使程序关闭后数据也不会丢失。文件也可以用于数据交换&#xff0c;允许不同程序之间共享信息。在 C 语言中&#xff0c;文件还可以用于读取配置信息&…

系统架构设计师教程(三)信息系统基础知识

信息系统基础知识 3.1 信息系统概述3.1.1 信息系统的定义3.1.2 信息系统的发展3.1.3 信息系统的分类3.1.4 信息系统的生命周期3.1.5 信息系统建设原则3.1.6 信息系统开发方法 3.2 业务处理系统 (TPS)3.2.1 业务处理系统的概念3.2.2 业务处理系统的功能3.2.3 业务处理系统的特点…

Python:核心知识点整理大全13-笔记

目录 6.4.3 在字典中存储字典 6.5 小结 第7章 用户输入和while循环 7.1 函数 input()的工作原理 7.1.1 编写清晰的程序 7.1.2 使用 int()来获取数值输入 7.1.3 求模运算符 7.1.4 在 Python 2.7 中获取输入 7.2 while 循环简介 7.2.1 使用 while 循环 往期快速传送门…

SPI 通信-stm32入门

本节我们将继续学习下一个通信协议 SPI&#xff0c;SPI 通信和我们刚学完的 I2C 通信差不多。两个协议的设计目的都一样&#xff0c;都是实现主控芯片和各种外挂芯片之间的数据交流&#xff0c;有了数据交流的能力&#xff0c;我们主控芯片就可以挂载并操纵各式各样的外部芯片&…

gpu版本的GNN的demo

1、当涉及到在GPU上运行图神经网络&#xff08;GNN&#xff09;时&#xff0c;通常使用深度学习框架&#xff0c;如PyTorch或TensorFlow。在这里&#xff0c;我将为您提供一个使用PyTorch Geometric库实现GNN的简单示例。 首先&#xff0c;确保您已经安装了PyTorch和PyTorch G…

第 375 场 LeetCode 周赛题解

A 统计已测试设备 模拟&#xff1a;记录当前已测试设备数量 class Solution { public:int countTestedDevices(vector<int> &batteryPercentages) {int res 0;int s 0;for (auto x: batteryPercentages) {if (x - s > 0) {res;s;}}return res;} };B 双模幂运算 …

【无线网络技术】——无线城域网(学习笔记)

&#x1f4d6; 前言&#xff1a;无线城域网&#xff08;WMAN&#xff09;是指在地域上覆盖城市及其郊区范围的分布节点之间传输信息的本地分配无线网络。能实现语音、数据、图像、多媒体、IP等多业务的接入服务。其覆盖范围的典型值为3~5km&#xff0c;点到点链路的覆盖可以高达…

少儿编程考级:激发孩子逻辑思维能力的关键

在当今信息化时代&#xff0c;少儿编程已经成为孩子们不可或缺的一项技能。而少儿编程考级&#xff0c;则是检验孩子们在这一技能上所取得的成就的重要途径。少儿编程考级不仅能够激发孩子们的逻辑思维能力&#xff0c;还能够提高他们的动手能力和创造力。6547网将详细介绍少儿…

电源模块测试系统测试LED电源项目的优势

LED电源测试是电源在设计、生产过程中的关键环节&#xff0c;也是确保LED照明产品可靠性和稳定性的重要步骤。LED电源测试一般包括电压、电流、效率、稳定性等。电源模块测试系统测试LED电源&#xff0c;实现自动化测试&#xff0c;保证测试结果的可靠性。 LED电源测试项目及方…

实现加盐加密方法以及MappedByteBuffer,RandomAccess

目录 自己实现 Spring Security MappedByteBuffer RandomAccess 加盐加密的实现 自己实现 传统MD5可通过彩虹表暴力破解&#xff0c; 加盐加密算法是一种常用的密码保护方法&#xff0c;它将一个随机字符串&#xff08;盐&#xff09;添加到原始密码中&#xff0c;然后再进…

力扣17. 电话号码的字母组合(java 回溯法)

Problem: 17. 电话号码的字母组合 文章目录 题目描述思路解题方法复杂度Code 题目描述 思路 题目给定一串数字&#xff0c;要求我们找出所有可能的字母组合&#xff0c;即我们可以穷举出所有可能的结果&#xff0c;而涉及到穷举我们自然可以想到利用回溯来解决问题&#xff0c…

无线且列窄图片如何转excel?

写此文原因&#xff1a;图片要转excel&#xff0c;这放以前&#xff0c;是不能实现的功能&#xff0c;但随着人工智能的蓬勃发展&#xff0c;人们已克服了这一难题&#xff0c;但是&#xff0c;我们知道&#xff0c;要将图片识别成excel&#xff0c;识别程序首先要先识别图片中…

如何在小米路由器4A千兆版刷入OpenWRT并通过内网穿透工具实现公网远程访问

文章目录 前言1. 安装Python和需要的库2. 使用 OpenWRTInvasion 破解路由器3. 备份当前分区并刷入新的Breed4. 安装cpolar内网穿透4.1 注册账号4.2 下载cpolar客户端4.3 登录cpolar web ui管理界面4.4 创建公网地址 5. 固定公网地址访问 前言 OpenWRT是一个高度模块化、高度自…

交易历史记录20231206 记录

昨日回顾&#xff1a; select top 10000 * from dbo.CODEINFO A left join dbo.全部&#xff21;股20231206010101 B ON A.CODE B.代码 left join dbo.全部&#xff21;股20231206CONF D on A.CODED.代码left join dbo.全部&#xff21;股20231206 G on A.CODEG.代码 left…