{% extends layout|default('base.html', true) %} {% block style %} {% endblock %} {% block content %} Plexora - New Project {# One form, three inputs. The format of the data file is detected server-side (/inspect_data), so there is no tab strip and no per-format duplicate of the name/image/mask fields. The two extra controls below are hidden until the file itself makes them necessary: a .zarr store with several tables, and a table spanning several images, cannot be read at all until the user picks one. Everything else the old import wizard asked for is either worked out from the file or asked for later, by whichever feature actually needs it. #}
New Project

Import Data

An image is all that is required. Add a segmentation mask and single-cell data now, or later from the project's Edit page.

{% if data.error %} {% endif %}
Please name the project.
Please provide a valid path to the image file.
{# Images a registered data node is serving. Shown only when there are some, so an ordinary install never sees a control for a thing it does not use. Clicking one fills the field with `node:///`, which the field accepts as readily as a path. #} {% set node_images = (node_resources or [])|selectattr("kind", "equalto", "image")|list %} {% if node_images %}
or an image on a data node: {% for choice in node_images %} {% endfor %}
{% endif %}
{% set node_masks = (node_resources or [])|selectattr("kind", "equalto", "segmentation")|list %} {% if node_masks %}
or a mask on a data node: {% for choice in node_masks %} {% endfor %}
{% endif %}
{# A .zarr store is a directory and a .csv/.h5ad is a file, and one input takes both -- so the picker offers each in turn. #}
CSV, AnnData (.h5ad) or SpatialData (.zarr).
{# The laptop-share layout: the viewer runs beside the images and the cell table never left the user's own machine, served by a data node over the same connection. Without this block that table is invisible here, and the form quietly demands a file this machine does not have. #} {% set node_tables = (node_resources or [])|selectattr("kind", "equalto", "table")|list %} {% if node_tables %}
or a table on a data node: {% for choice in node_tables %} {% endfor %}
{% endif %}
{# Shown only when the store holds more than one table. #} {# Which expression matrix to read is deliberately NOT asked here. It matters only to a plugin that reads marker intensities, so it is that plugin's requirement (Requires(features=True)) and the modal asks it -- along with whether to log-transform -- the first time such a tool opens. Importing an image is not the moment to answer a question about thresholding, and this form only asks what registering the project cannot proceed without. The layer names are still recorded from the inspection above, which is what lets the modal offer them without reopening the file. #} {# Shown only when the table spans several images. Loading them all would silently mix cells from different slides onto one image. #}
{% endblock %}