Plexora

add_layers

Add one or more files to a sample that is already registered.

Generated from Plexora 0.0.55View source
from plexora import add_layers
add_layers(name, *paths, answers=None, wait=False) -> list

The same detection import_sample runs, grouped onto an existing project instead of a new one -- a mask added this way goes through attach_segmentation, a table through replace_project_data, exactly as adding one from the viewer's Layers panel does.

When to use

Use this once a sample already exists and there are more files for it -- a mask that was not ready at import time, a transcripts table, an extra channel image. Use import_sample for a sample that does not exist yet.

Parameters

namestrrequired

The project to add these files to.

*paths

One or more files to add.

answersdictkeyword-onlydefault None

{question_id: value} for anything detection could not work out -- see import_sample.

waitboolkeyword-onlydefault False

Block until everything just added (a mask's pyramid, a transcripts tile set) has finished building. Defaults to False.

Returns

list

[{"id": ..., "status": ...}, ...], one entry per added channel or transcripts layer. A mask or a cell table given here is attached directly rather than listed -- adding only a mask returns an empty list even though it lands.

Raises

Exception

If nothing at these paths is something Plexora can register.

Examples

import plexora

plexora.import_sample("slide.ome.tif", name="tonsil", wait=True)
plexora.add_layers("tonsil", "slide_mask.tif", wait=True)

Guides

On this page