Plugin Development API#
This section details the public API for plugin development.
Broadly speaking, everything that is necessary to build a QIIME 2 plugin is
available in qiime2.plugin
or qiime2.metadata
.
Individual Topics#
Plugin API List#
Plugin Object
A QIIME 2 Plugin. |
Registration
Register a method to the associated plugin. |
|
Register a visualizer to the associated plugin. |
|
Register a pipeline to the associated plugin. |
|
Decorator which registers a validator |
|
Decorator which registers a transformer to convert data |
|
Register file formats to the plugin |
|
Register arbitrary views (Python classes or formats) to the plugin |
|
Register semantic type fragments to the plugin |
|
Connect a semantic type expression to a format. |
|
Register an artifact class which defines an Artifact |
Formats
Types
Create a new semantic type. |
|
A one or more semantic properties to add to an existing type. |
|
The type of a QIIME 2 Visualization. |
|
A boolean value ( |
|
A string of Unicode characters (i.e. text). |
|
An integer without any particular bounds. |
|
A 64 bit floating point number. |
|
The number of logical threads to use (OS threads/CPUs/Cores). |
|
The number of jobs to submit as an integer that is greater than zero (exclusive). |
|
A predicate which defines a set of allowable values. |
|
A predicate which defines a contiguous range of allowable values. |
|
Shorthand to generate a |
|
Shorthand to generate a |
|
Tabular metadata where unique identifiers can be associated with columns. |
|
A column of a |
|
The categorical variant for |
|
The Numeric variant for |
|
Deprecated - use List or Collection instead |
|
An alias for a |
|
An ordered set of key-value pairs. |
|
A table of input types which match to output types. |
|
A trivial |
Citations
A simple subclass of |
|
A |
Testing
Test harness for simplifying testing QIIME 2 plugins. |
|
Checks for NaNs present in any of the tables in the indicated file then resets to the head of the file. |
Utilities
Alternative to |
|
A context manager to redirect stdio to a new file (if provided). |
|
Finds the number of currently available (logical) cores. |
Additional Objects#
These objects are not part of the qiime2.plugin
module, but are commonly used
by plugins (and users).
Metadata
Store metadata associated with identifiers in a study. |
|
Abstract base class representing a single metadata column. |
|
A single metadata column containing numeric data. |
|
A single metadata column containing categorical data. |
Pipeline Context Object (ctx)
|
Return a function matching the callable API of an action. |
|
Return a new artifact from a given view. |
Usage Examples
Communicate that an artifact will be needed. |
|
Obtain an artifact from a url. |
|
Communicate that a result collection containing artifacts will be needed. |
|
Communicate that metadata will be needed. |
|
Obtain metadata from a url. |
|
Communicate that a file/directory format will be needed. |
|
Communicate that an import should be done. |
|
Return a UsageVariable of type artifact_collection given a list or dict of its members. |
|
Accesses and returns a member of a ResultCollection as a UsageVariable. |
|
Communicate that a column should be retrieved. |
|
Communicate that an artifact should be views as metadata. |
|
Communicate that these metadata should be merged. |
|
Communicate that a comment should be made. |
|
Communicate that help text should be displayed. |
|
Communicate that an artifact should be peeked at. |
|
Communicate that some action should be performed. |
|
An object which represents a deferred lookup for a QIIME 2 action. |
|
A dict-like mapping of parameters to arguments for invoking an action. |
|
A dict-like mapping of action outputs to desired names. |
|
A vanity class over |
|
A variable which represents some QIIME 2 generate-able value. |
|
Communicate that the result of this variable should match a regex. |
|
Communicate that this variable should have a given semantic type. |