woodcorpse的个人博客分享 http://blog.sciencenet.cn/u/woodcorpse

博文

QIIME 2教程. 22命令行界面q2cli(2020.11)

已有 527 次阅读 2021-2-3 22:23 |个人分类:QIIME2|系统分类:科研笔记

命令行界面q2cli

QIIME 2 command-line interface (q2cli)

https://docs.qiime2.org/2020.11/interfaces/q2cli/

注:最好按本教程顺序学习,想直接学习本章,至少完成本系列《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://qiime2.org.

  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 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.6.12
QIIME 2 release: 2020.11
QIIME 2 version: 2020.11.1
q2cli version: 2020.11.1

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

Application config directory
/mnt/bai/yongxin/miniconda2/envs/qiime2-2020.11/var/q2cli

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

向任何命令提供--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.qiime2.org

Options:
  --version    Show the version 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

译者简介

刘永鑫,博士,中科院青促会会员,QIIME 2项目参与人。2008年毕业于东北农业大学微生物学专业,2014年于中国科学院大学获生物信息学博士,2016年遗传学博士后出站留所工作,任工程师。目前主要研究方向为宏基因组数据分析。目前在Science、Nature Biotechnology、Protein & Cell、Current Opinion in Microbiology等杂志发表论文30余篇,被引2千余次。2017年7月创办“宏基因组”公众号,目前分享宏基因组、扩增子原创文章2400余篇,代表作有《扩增子图表解读、分析流程和统计绘图三部曲(21篇)》《微生物组实验手册》《微生物组数据分析》等,关注人数11万+,累计阅读2100万+。

Reference

https://docs.qiime2.org/2020.11

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. doi:10.1038/s41587-019-0209-9



https://wap.sciencenet.cn/blog-3334560-1270471.html

上一篇:QIIME 2教程. 21进化树推断q2-phylogeny(2020.11)
下一篇:QIIME 2教程. 23图形界面q2studio(2020.11)

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2021-12-4 01:01

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部