Interface developer API reference#

When developing a QIIME 2 interface, you will use APIs defined in the qiime2.sdk submodule.

Interface development API#

The PluginManager Object#

PluginManager(add_plugins=True)[source]#

Inputs and outputs#

Result()[source]#

Base class for QIIME 2 result classes (Artifact and Visualization).

This class is not intended to be instantiated. Instead, it acts as a public factory and namespace for interacting with Artifacts and Visualizations in a generic way. It also acts as a base class for code reuse and provides an API shared by Artifact and Visualization.

Results(fields, values)[source]#

Tuple class representing the named results of an Action.

Provides an interface similar to a namedtuple type (e.g. fields are accessible as attributes).

Users should not need to instantiate this class directly.

Artifact()[source]#

Base class for QIIME 2 result classes (Artifact and Visualization).

This class is not intended to be instantiated. Instead, it acts as a public factory and namespace for interacting with Artifacts and Visualizations in a generic way. It also acts as a base class for code reuse and provides an API shared by Artifact and Visualization.

Visualization()[source]#

Base class for QIIME 2 result classes (Artifact and Visualization).

This class is not intended to be instantiated. Instead, it acts as a public factory and namespace for interacting with Artifacts and Visualizations in a generic way. It also acts as a base class for code reuse and provides an API shared by Artifact and Visualization.

ResultCollection(collection=None)[source]#

Actions#

Action()[source]#

QIIME 2 Action

Method()[source]#

QIIME 2 Method

Visualizer()[source]#

QIIME 2 Visualizer

Pipeline()[source]#

QIIME 2 Pipeline

Context(parent=None, parallel=False)[source]#

Utility functions#

parse_type(string, expect=None)[source]#

Convert a string into a type expression

Parameters:
  • string (str) – The string type expression to convert into a TypeExpression

  • expect ({'semantic', 'primitive', 'visualization'}, optional) – Will raise a TypeError if the resulting TypeExpression is not a member of expect.

Return type:

type expression

parse_format(format_str)[source]#
type_from_ast(ast, scope=None)[source]#

Convert a type ast (from .to_ast()) to a type expression.

Parameters:
  • ast (json compatible object) – The abstract syntax tree produced by to_ast on a type.

  • scope (dict) – A dictionary to use between multiple calls to share scope between different types. This allows type variables from the same type map to be constructed from an equivalent type map. Scope should be shared within a given call signature, but not between call signatures.

Return type:

type expression

Citations#

Citations()[source]#

Dictionary that remembers insertion order

Exceptions#

ValidationError()[source]#

Common base class for all non-exit exceptions.

ImplementationError()[source]#

Common base class for all non-exit exceptions.

UninitializedPluginManagerError()[source]#

Common base class for all non-exit exceptions.