Plugin Definition and Registration

class qiime2.plugin.Choices(*args, _pickle=False, **kwargs)
collapse_intersection(other)
get_kind()
get_kind_expr(self_expr)
get_name()
get_name_expr(self_expr)
get_union_membership_expr(self_expr)
is_element(value)
is_element_expr(self_expr, value)
is_symbol_subtype(other)
is_symbol_subtype_expr(self_expr, other_expr)
is_symbol_supertype(other)
is_symbol_supertype_expr(self_expr, other_expr)
is_template = True
iter_boundaries()
public_proxy = ()
unpack_union()
update_ast(ast)
update_ast_expr(self_expr, ast)
class qiime2.plugin.CitationRecord(type, fields)
count(value, /)

Return number of occurrences of value.

fields

Alias for field number 1

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

type

Alias for field number 0

class qiime2.plugin.Citations
clear()None.  Remove all items from od.
copy()a shallow copy of od
fromkeys(value=None)

Create a new ordered dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()a set-like object providing a view on D’s items
keys()a set-like object providing a view on D’s keys
classmethod load(path, package=None)
move_to_end(key, last=True)

Move an existing element to the end (or beginning if last is false).

Raise KeyError if the element does not exist.

pop(k[, d])v, remove specified key and return the corresponding

value. If key is not found, d is returned if given, otherwise KeyError is raised.

popitem(last=True)

Remove and return a (key, value) pair from the dictionary.

Pairs are returned in LIFO order if last is true or FIFO order if false.

save(f)
setdefault(key, default=None)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F)None.  Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()an object providing a view on D’s values
qiime2.plugin.End(end, inclusive=False)
class qiime2.plugin.Plugin(name, version, website, package=None, project_name=None, citation_text=None, user_support_text=None, short_description=None, description=None, citations=None)
property actions
freeze()
register_formats(*formats, citations=None)
register_semantic_type_to_format(semantic_type, artifact_format)
register_semantic_types(*type_fragments)
register_transformer(_fn=None, *, citations=None)

A transformer has the type Callable[[type], type]

register_views(*views, citations=None)
property types
class qiime2.plugin.Properties(*args, _pickle=False, **kwargs)
collapse_intersection(other)
get_kind()
get_kind_expr(self_expr)
get_name()
get_name_expr(self_expr)
get_union_membership_expr(self_expr)
is_element(expr)
is_element_expr(self_expr, value)
is_symbol_subtype(other)
is_symbol_subtype_expr(self_expr, other_expr)
is_symbol_supertype(other)
is_symbol_supertype_expr(self_expr, other_expr)
is_template = True
public_proxy = ()
update_ast(ast)
update_ast_expr(self_expr, ast)
class qiime2.plugin.Range(*args, _pickle=False, **kwargs)
collapse_intersection(other)
get_kind()
get_kind_expr(self_expr)
get_name()
get_name_expr(self_expr)
get_union_membership_expr(self_expr)
is_element(value)
is_element_expr(self_expr, value)
is_symbol_subtype(other)
is_symbol_subtype_expr(self_expr, other_expr)
is_symbol_supertype(other)
is_symbol_supertype_expr(self_expr, other_expr)
is_template = True
iter_boundaries()
public_proxy = ()
update_ast(ast)
update_ast_expr(self_expr, ast)
qiime2.plugin.SemanticType(name, field_names=None, field_members=None, variant_of=None)

Create a new semantic type.

Parameters
  • name (str) – The name of the semantic type: this should match the variable to which the semantic type is assigned.

  • field_names (str, iterable of str, optional) – Name(s) of the fields where member types can be placed. This makes the type a composite type, meaning that fields must be provided to produce realized semantic types. These names will define ad-hoc variant types accessible as name.field[field_names member].

  • field_members (mapping, optional) – A mapping of strings in field_names to one or more semantic types which are known to be members of the field (the variant type).

  • variant_of (VariantField, iterable of VariantField, optional) – Define the semantic type to be a member of one or more variant types allowing it to be placed in the respective fields defined by those variant types.

Returns

There are several (private) types which may be returned, but anything returned by this factory will cause is_semantic_type to return True.

Return type

A Semantic Type

qiime2.plugin.Start(start, inclusive=True)
class qiime2.plugin.TypeMap(mapping)
input_width()
iter_outputs(*, _double_as_input=False)
property lifted
solve(*inputs)
qiime2.plugin.TypeMatch(listing)
exception qiime2.plugin.ValidationError
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

Record Containers

qiime2.plugin.plugin.TransformerRecord = <class 'qiime2.plugin.plugin.TransformerRecord'>

TransformerRecord(transformer, plugin, citations)

qiime2.plugin.plugin.SemanticTypeRecord = <class 'qiime2.plugin.plugin.SemanticTypeRecord'>

SemanticTypeRecord(semantic_type, plugin)

qiime2.plugin.plugin.FormatRecord = <class 'qiime2.plugin.plugin.FormatRecord'>

FormatRecord(format, plugin)

qiime2.plugin.plugin.ViewRecord = <class 'qiime2.plugin.plugin.ViewRecord'>

ViewRecord(name, view, plugin, citations)

qiime2.plugin.plugin.TypeFormatRecord = <class 'qiime2.plugin.plugin.TypeFormatRecord'>

TypeFormatRecord(type_expression, format, plugin)

Formats

class qiime2.plugin.model.BinaryFileFormat(path=None, mode='w')
open()
validate(level='max')
view(view_type)
class qiime2.plugin.model.DirectoryFormat(path=None, mode='w')
validate(level='max')
class qiime2.plugin.model.File(pathspec, *, format=None)
class qiime2.plugin.model.FileCollection(pathspec, *, format=None)
set_path_maker(function)
qiime2.plugin.model.SingleFileDirectoryFormat(name, pathspec, format)
class qiime2.plugin.model.SingleFileDirectoryFormatBase(path=None, mode='w')
validate(level='max')
class qiime2.plugin.model.TextFileFormat(path=None, mode='w')
open()
validate(level='max')
view(view_type)
exception qiime2.plugin.model.ValidationError
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.