{% extends 'base.html' %} {% block style %} {% endblock %} {% block content %} Plexora - Edit {{ data.datasetName }} {# Generated from the project record: every section below is gated on `project.has`, so a project sees only the fields it actually has. The old edit page rendered the CSV column-matching screen for every project regardless of format, which is what made editing an AnnData project destroy it. #} {% set project = data.project %}
{# Single quotes, and they matter. `tojson` escapes < > & and ' but NOT the double quotes JSON is built out of, so in a double-quoted attribute the value ends at the record's first key and the rest spills into the tag as garbage attributes. `id` still parsed, so the page looked completely normal -- and projectEdit.js threw on JSON.parse("{"), which is where the Save button lost its listener. #}
Edit Project

{{ data.datasetName }}

{# Image: read-only. Everything the project derives is keyed to it. #}
Image

{{ project.image.src }}
{{ project.image.channelCount or 0 }} channel(s) {% if project.image.size[0] %} · {{ project.image.size[0] }} × {{ project.image.size[1] }} px {% endif %}

The image cannot be changed — import a new project to use a different one.
Segmentation Mask
{% if project.segmentation.pending %} Converting — the mask will be ready shortly. {% else %} Clear the box to remove the mask. {% endif %}
{# Mounted by projectEdit.js from the shared control (dataSourceField.js), not written out here: swapping in a .zarr store with several tables needs a table picker, and the two static Browse buttons this used to carry were never wired to anything -- only the upload page's script attaches [data-browse-target], and it does not load on this page. #}
Data
{# The path itself comes from the project record the page is already carrying; only the note needs saying here. #}
{# What the numbers in this project actually are. The select is shown only when the file carries more than one matrix -- raw counts and a log-transformed copy live side by side in one .h5ad, and which was read decides what every marker histogram is a histogram of. The log1p switch is offered either way: a file may carry raw counts and nothing else, and thresholds on those are unreadable untransformed. #} {% if project.has.features %}
Expression Values
{% if project.data.layers %}
Which matrix the marker intensities are read from. Thresholds set against one do not carry to another.
{% endif %}
{% endif %} {# The read spec is how the adapter gets from file to table. Shown so the user can see what was auto-detected; changing it means replacing the data file above, which re-detects it. #} {% if project.has.readSpec %}
How this file is read
{# Coordinates are no longer summarised here: they are a real control in the Columns section below, because which array holds a cell's position is a choice and not a detail. This line read "auto-detected" for a project whose source was picked by matching an obsm key against a hardcoded list of names -- accurate, and no help to anyone it was wrong for. #}

Features: {{ project.data.features.get('layer') or project.data.features.get('source') or 'X' }} {% if project.data.subset.get('column') %}
Image: {{ project.data.subset['column'] }} = {{ project.data.subset['value'] }} {% endif %}

{% endif %} {# CSV only: the marker/metadata split, which also owns the roles. #} {% if project.has.columns %}
Columns
{% endif %} {# Everything else with a table: only the roles backed by real columns (the adapter synthesizes the rest). #} {% if project.has.data and not project.has.columns %}
Columns
{% endif %} {# How tools draw per-cell results. Defaulted rather than asked -- the mask if there is one, centroids otherwise -- so this is an override. "Automatic" is a real option and the one an untouched project is on, because the alternative is that saving this page for any other reason records a choice nobody made. That mattered: a project whose mask was still converting could only offer centroids here, and the save froze centroids in place for good -- the mask landed minutes later and every tool went on drawing points. #} {% if project.has.cellLayer %}
Cell Layer
Used by tools that colour cells, such as Cell Explorer and Thresholding. Currently drawing: {% if project.cellLayer == 'segmentation' %}the segmentation mask{% else %}centroids{% endif %}.
{% endif %}
{% endblock %}