Plexora

plexora project create

Register a project from an image, files, or a run folder.

Generated from Plexora 0.0.55View source

Register a project without opening the viewer. Give one image and name the other files with options, or give several paths (or a run folder) and let Plexora work out what each one is. Anything you leave out can be added later with plexora project set, and Plexora asks for what a tool needs when it needs it.

Usage

plexora project create [-h] [--name NAME] [--segmentation SEGMENTATION] [--data DATA]
                              [--table TABLE] [--subset COLUMN=VALUE] [--cell-id CELL_ID] [--x X]
                              [--y Y] [--z Z] [--sample SAMPLE] [--celltype CELLTYPE]
                              [--markers COLUMN [COLUMN ...]] [--metadata COLUMN [COLUMN ...]]
                              [--layer LAYER] [--log1p] [--single-image] [--row-number-ids]
                              [--channel-names NAME [NAME ...]]
                              [--image-type {brightfield,fluorescence}] [--copy] [--node NAME]
                              [--dataset DATASET] [--from SPEC.json] [--exist-ok] [--json]
                              PATH [PATH ...]

Arguments

PATHrequiredrepeatable

Options

--name NAME

What to call the project. Defaults to the image's filename.

--segmentation SEGMENTATION

A segmentation mask to attach.

--data DATA

A feature table: CSV, Parquet, AnnData (.h5ad) or SpatialData (.zarr).

--table TABLE

Which table inside a .zarr store holds the cells. Optional -- Plexora asks when something needs it.

--subset COLUMN=VALUE

Which image, for a table that spans several.

--cell-id CELL_ID

The column holding the cell identifier.

--x X

The column holding the X coordinate.

--y Y

The column holding the Y coordinate.

--z Z

The column holding the Z coordinate (each cell's plane), for a table over a z-stack.

--sample SAMPLE

The column holding the image or sample id.

--celltype CELLTYPE

The column holding a phenotype or cell type.

--markers COLUMN [COLUMN ...]

Columns holding marker intensities. Naming one of the two lists is enough -- the columns left over become the other.

--metadata COLUMN [COLUMN ...]

Columns describing the cells rather than measuring them. Naming one of the two lists is enough -- the columns left over become the other.

--layer LAYER

Which matrix to read intensities from, for AnnData.

--log1p

Log-transform the intensities as they are read.

--single-image

This table covers exactly one image.

--row-number-ids

Number the rows instead of reading an id column.

--channel-names NAME [NAME ...]

One per image channel, in order.

--image-type {brightfield,fluorescence}one of: brightfield, fluorescence

Override how the image is read.

--copy

Copy the files into the project directory.

--node NAME

The data node the files are on, for any path that does not say for itself. In a spec file, {"path": ..., "node": null} keeps one file on this machine.

--dataset DATASET

A dataset to put it in, by name. Made if it does not exist.

--from SPEC.json

A JSON file of the same options. Command-line arguments win over what is in it.

--exist-ok

Reuse a project already registered for this image.

--json

Examples

An image is enough

plexora project create slide.ome.tif

Name every file

plexora project create slide.ome.tif --segmentation slide_mask.tif --data cells.csv --x X_centroid --y Y_centroid --cell-id CellID

Let Plexora work out what each file is

plexora project create slide.ome.tif slide_mask.tif cells.csv

Into a dataset

plexora project create slide.ome.tif --dataset "Pancreas"

A table covering several images

plexora project create slide1.ome.tif --data all_cells.csv --subset imageid=slide1

Python equivalent

plexora.create_project takes the same options by the same names (dashes become underscores). plexora.import_sample is the several-paths form.

import plexora

plexora.create_project(
    "slide.ome.tif",
    segmentation="slide_mask.tif",
    data="cells.csv",
    x="X_centroid",
    y="Y_centroid",
    cell_id="CellID",
)

On this page