分享

QIIME 2教程. 21命令行界面q2cli(2024.2)

 宏基因组 2024-04-27 发布于北京

命令行界面q2cli

QIIME 2 command-line interface (q2cli)

https://docs./2024.2/interfaces/q2cli/

https://www.bilibili.com/video/BV1CE421L7XF/

注:最好按本教程顺序学习,想直接学习本章,至少完成本系列《1简介和安装》

本指南介绍了q2cli,它是QIIME 2 Core发行版中包含的QIIME 2命令行界面。教程广泛使用q2cli,因此建议在开始教程之前先阅读本文档。本文档尚在开发中,将来会扩展。

基本用法 Basic usage

q2cli包含一个qiime命令,该命令用于从命令行执行QIIME分析。运行qiime查看可用子命令的列表:

qiime

显示如下内容:

Usage: qiime [OPTIONS] COMMAND [ARGS]...

QIIME 2 command-line interface (q2cli)
--------------------------------------

To get help with QIIME 2, visit https://.

To enable tab completion in Bash, run the following command or add it to
your .bashrc/.bash_profile:

source tab-qiime

To enable tab completion in ZSH, run the following commands or add them to
your .zshrc:

autoload -Uz compinit && compinit
autoload bashcompinit && bashcompinit
source tab-qiime

Options:
--version Show the version and exit.
--help Show this message and exit.

Commands:
info Display information about current deployment.
tools Tools for working with QIIME 2 files.
dev Utilities for developers and advanced users.
alignment Plugin for generating and manipulating alignments.
composition Plugin for compositional data analysis.
cutadapt Plugin for removing adapter sequences, primers, and
other unwanted sequence from sequence data.

dada2 Plugin for sequence quality control with DADA2.
deblur Plugin for sequence quality control with Deblur.
demux Plugin for demultiplexing & viewing sequence quality.
diversity Plugin for exploring community diversity.
diversity-lib Plugin for computing community diversity.
emperor Plugin for ordination plotting with Emperor.
feature-classifier Plugin for taxonomic classification.
feature-table Plugin for working with sample by feature tables.
fragment-insertion Plugin for extending phylogenies.
gneiss Plugin for building compositional models.
longitudinal Plugin for paired sample and time series analyses.
metadata Plugin for working with Metadata.
phylogeny Plugin for generating and manipulating phylogenies.
quality-control Plugin for quality control of feature and sequence data.
quality-filter Plugin for PHRED-based filtering and trimming.
sample-classifier Plugin for machine learning prediction of sample
metadata.

taxa Plugin for working with feature taxonomy annotations.
vsearch Plugin for clustering and dereplicating with vsearch.

将列出几个子命令,包括插件命令(例如feature-table, diversity)和内置命令(例如info, tools)。

您可以通过运行qiime info来发现当前安装了哪些插件以及有关QIIME部署的其他信息:

qiime info

显示如下内容:

System versions
Python version: 3.8.16
QIIME 2 release: 2024.2
QIIME 2 version: 2024.2.1
q2cli version: 2024.2.1

Installed plugins
alignment: 2024.2.0
composition: 2024.2.0
cutadapt: 2024.2.1
dada2: 2024.2.0
deblur: 2024.2.0
demux: 2024.2.0
iversity: 2024.2.1
diversity-lib: 2024.2.0
emperor: 2024.2.0
feature-classifier: 2024.2.0
feature-table: 2024.2.0
fragment-insertion: 2024.2.0
gneiss: 2024.2.0
longitudinal: 2024.2.0
metadata: 2024.2.0
phylogeny: 2024.2.0
quality-control: 2024.2.0
quality-filter: 2024.2.0
sample-classifier: 2024.2.0
taxa: 2024.2.0
types: 2024.2.0
vsearch: 2024.2.0

Application config directory
/mnt/bai/yongxin/miniconda3/envs/qiime2-2024.2/var/q2cli

Getting help
To get help with QIIME 2, visit https://

向任何命令提供--help以显示有关该命令的信息,包括该命令定义的所有子命令,选项和参数。例如,要了解有关feature-table 插件命令的更多信息,请运行:

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.

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
subsample Subsample table
summarize Summarize table
tabulate-seqs View sequence associated with each feature
transpose Transpose a feature table.

这将列出feature-table插件提供的操作(子命令),以及有关插件本身的信息(例如引文,网站,用户支持)。

尝试使用--help了解其他命令。例如,内置工具命令中有哪些可用操作?

开启命令行补全Enable command-line tab completion

如果将Bash或Zsh用作Shell,则可以启用制表符补全功能,这将大大提高QIIME 2命令行界面(command-line interface,CLI)的可用性。启用制表符补全功能后,按Tab键将尝试完成您键入的命令或选项,或者根据到目前为止键入的内容为您提供可用命令或选项的列表。这减少了您必须执行的键入操作的数量,并使命令和选项更易于发现,而无需将—help传递给要运行的每个命令。

提示:当前仅在Bash和Zsh Shell中支持QIIME 2 CLI选项补全。要检查您拥有什么Shell,请运行echo $0。您应该在输出中看到-bash-zsh(例如我看到的是/bin/bash)。

请选择适合对说明对应的Shell,方可启用制表符补全。

Bash

运行以下命令以启用制表符完成:

source tab-qiime

每次打开新终端并激活QIIME 2 conda环境时,除非将其添加到您的.bashrc / .bash_profile中,否则都将需要运行此命令。

Zsh

运行以下命令以启用制表符完成:

autoload bashcompinit && bashcompinit && source tab-qiime

除非将其添加到.zshrc中,否则每次打开新终端并激活QIIME 2 conda环境时,都需要运行此命令。

验证标签页完成 Verify tab completion

要测试选项卡补全功能是否正常运行,请尝试键入以下部分命令,而无需实际运行该命令,请按Tab键(您可能需要按几次)。如果制表符补全有效,则命令应自动补齐qiime info

qiime i

译者简介

刘永鑫,研究员,博士生导师。2014年博士毕业于中国科学院大学生物信息学专业,之后在中国科学院遗传与发育生物学研究所工作历任博士后、工程师、高级工程师,2022年10月加入中国农业科学院深圳农业基因组研究所担任课题组长。研究方向为宏基因组方法开发、功能挖掘和科学传播。参与QIIME 2项目,主导开发了易扩增子(EasyAmplicon)、易宏基因组(EasyMetagenome)、培养组(Culturome)分析流程、数据分析网站(EVenn、ImageGP) 和R包(amplicon、ggClusterNet)等,目标是全面打造宏基因组领域方法学基础设施,推动微生物组学发展。以(共同)第一或通讯作者在Nature Biotechnology、Nature Microbiology、iMeta等期刊发表论文30余篇。合作在Science、Cell Host & Microbe、Microbiome等期刊发表论文20余篇,累计发表论文50余篇,被引用17000+次。主编《微生物组实验手册》专著,由300多位同行参与,共同打造本领域长期更新的中文百科全书。创办宏基因组公众号,16万+同行关注,分享原创文章3千余篇,累计阅读量超4千万,打造本领域最具影响力的科学传播平台。发起《iMeta》期刊,联合全球千位专家共同打造宏基因组学、微生物组和生物信息学顶刊,解决我国本领域期刊出版卡脖子问题。课题组长期招聘博士后、客座研究生,有兴趣可加微信yongxinliu详谈。

杨海飞,青岛农业大学,生物信息学硕士在读,基因组所刘永鑫组客座硕士。负责本次版本的更新和测试。

Reference

https://docs./2024.2

Evan Bolyen, Jai Ram Rideout, Matthew R. Dillon, Nicholas A. Bokulich, Christian C. Abnet, Gabriel A. Al-Ghalith, Harriet Alexander, Eric J. Alm, Manimozhiyan Arumugam, Francesco Asnicar, Yang Bai, Jordan E. Bisanz, Kyle Bittinger, Asker Brejnrod, Colin J. Brislawn, C. Titus Brown, Benjamin J. Callahan, Andrés Mauricio Caraballo-Rodríguez, John Chase, Emily K. Cope, Ricardo Da Silva, Christian Diener, Pieter C. Dorrestein, Gavin M. Douglas, Daniel M. Durall, Claire Duvallet, Christian F. Edwardson, Madeleine Ernst, Mehrbod Estaki, Jennifer Fouquier, Julia M. Gauglitz, Sean M. Gibbons, Deanna L. Gibson, Antonio Gonzalez, Kestrel Gorlick, Jiarong Guo, Benjamin Hillmann, Susan Holmes, Hannes Holste, Curtis Huttenhower, Gavin A. Huttley, Stefan Janssen, Alan K. Jarmusch, Lingjing Jiang, Benjamin D. Kaehler, Kyo Bin Kang, Christopher R. Keefe, Paul Keim, Scott T. Kelley, Dan Knights, Irina Koester, Tomasz Kosciolek, Jorden Kreps, Morgan G. I. Langille, Joslynn Lee, Ruth Ley, Yong-Xin Liu, Erikka Loftfield, Catherine Lozupone, Massoud Maher, Clarisse Marotz, Bryan D. Martin, Daniel McDonald, Lauren J. McIver, Alexey V. Melnik, Jessica L. Metcalf, Sydney C. Morgan, Jamie T. Morton, Ahmad Turan Naimey, Jose A. Navas-Molina, Louis Felix Nothias, Stephanie B. Orchanian, Talima Pearson, Samuel L. Peoples, Daniel Petras, Mary Lai Preuss, Elmar Pruesse, Lasse Buur Rasmussen, Adam Rivers, Michael S. Robeson, Patrick Rosenthal, Nicola Segata, Michael Shaffer, Arron Shiffer, Rashmi Sinha, Se Jin Song, John R. Spear, Austin D. Swafford, Luke R. Thompson, Pedro J. Torres, Pauline Trinh, Anupriya Tripathi, Peter J. Turnbaugh, Sabah Ul-Hasan, Justin J. J. van der Hooft, Fernando Vargas, Yoshiki Vázquez-Baeza, Emily Vogtmann, Max von Hippel, William Walters, Yunhu Wan, Mingxun Wang, Jonathan Warren, Kyle C. Weber, Charles H. D. Williamson, Amy D. Willis, Zhenjiang Zech Xu, Jesse R. Zaneveld, Yilong Zhang, Qiyun Zhu, Rob Knight & J. Gregory Caporaso#. Reproducible, interactive, scalable and extensible microbiome data science using QIIME 2. Nature Biotechnology. 2019, 37: 852-857. https:///10.1038/s41587-019-0209-9

宏基因组推荐
本公众号现全面开放投稿,希望文章作者讲出自己的科研故事,分享论文的精华与亮点。投稿请联系小编(微信号:yongxinliu 或 meta-genomics)

    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多