Home

Awesome

zsh-qiime2

Hi there, QIIME 2 users and developers! This is a small oh-my-zsh plugin providing a couple of (hopefully) useful functions and aliases that could make your work with QIIME2 slightly easier. These include functions for automatic building of conda environments based on the latest QIIME2 release, functions for testing conda builds (I'm looking at you, future plugin developers), a couple of aliases to simplify some verbose commands and a bonus command prompt modifier - see below for details.

Installation

git clone https://github.com/misialq/zsh-qiime2.git $ZSH_CUSTOM/plugins/zsh-qiime2
plugins=(... zsh-qiime2)

Functionality

Command prompt

This plugin lets you add a small modification to your command prompt that will display the QIIME 2 version installed in the currently activated conda environment. For now, it only supports the Powerlevel10k theme.

To install the prompt, you need to add qiime2 to the list of prompt segments in your theme configuration file (~/.p10k.zsh). It should look something like this (when added to the right prompt):

# The list of segments shown on the right. Fill it with less important segments.
# Right prompt on the last prompt line (where you are typing your commands) gets
# automatically hidden when the input line reaches it. Right prompt above the
# last prompt line gets hidden if it would overlap with left prompt.
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
# =========================[ Line #1 ]=========================
qiime2
status                  # exit code of the last command
...

After sourcing the configuration file (or restarting your terminal), you should be able to see the current QIIME 2 version:

Functions

Aliases

AliasCommand
q2qiime
q2citqiime tools citations
q2xtqiime tools extract
q2xpqiime tools export
q2iqiime tools import
q2itqiime tools import --show-importable-types
q2ifqiime tools import --show-importable-formats
q2rcqiime dev refresh-cache
q2pqiime tools peek
q2vqiime tools view
q2valqiime tools validate
q2insqiime tools inspect-metadata
piqrpip install . && qiime dev refresh-cache

Issues?

Should you encounter any issues whatsoever, feel free to reach out - this is still a very early version of the plugin so there maybe a need of polishing this or that.

Happy QIIME'ing!

Buy me a coffee