layer_requirement
Build a requirement descriptor for a spatial layer.
Generated from Plexora 0.0.55View source
from plexora.api import layer_requirementAlso available as plexora.api.plugin.layer_requirement.
layer_requirement(wanted: str, layer=None) -> RequirementUsed for the entries in Requires.layers and Requires.optional_layers:
kind="layer" so the requirements modal renders an "Add layer..." row
rather than a file field, since a layer is not a path to type but a thing
to import.
Parameters
wantedstrrequiredA modality ("transcripts"), a kind ("kind:points"),
or several joined with | ("visium_spots|kind:points"), the
same vocabulary as Requires.layers.
layerdefault NoneThe project's matching layer, if it already has one. Used to say whether it failed to prepare or is still being prepared.
Returns
RequirementThe descriptor, labelled from wanted (and from
layer's state, when given).