The plot command generates plots and summary tables from analyse output and/or model outputs. Each run produces one or more independent sections (depending on provided results), each writing SVG plots and .xlsx summary statistics under evaluator/plot/<section>.
plot requires R to be installed, and either available on PATH or passed using the --rscript option.
For a given run, the pipeline:
- Resolves
--analyse/--modelinto one or more runs (each option accepts either a direct result file or a sample sheet). - Determines which sections are runnable for the given inputs and which were requested on command line.
- Dispatches each section to its own R script via
Rscript, writing outputs toevaluator/plot/<section>/. A section directory that already exists is skipped unless--overwriteis given. A section that fails (non-zeroRscriptexit) is logged as a warning, but should not stop the remaining sections from running. - Writes
evaluator/plot/index.md, linking every section that completed successfully andevaluator/plot/params.toml, the resolved[plot]parameters used for the run.
Usage: evaluator plot [OPTIONS]
Options:
--analyse PATH Path to an analyse results CSV, or a sample sheet referencing multiple.
--model PATH Path to a model results file (JSON or CSV), or a sample sheet referencing multiple.
-o, --out-dir PATH Path to output directory, outputs written under '.../evaluator/plot/'. [default: .]
--section TEXT Section(s) to run: distributions, qc, scatter, concordance, compare (repeatable).
--all Run every applicable section.
--overwrite Overwrite existing section outputs instead of skipping them.
--rscript PATH Path to the Rscript binary (default: resolved from PATH).
-h, --help Show this message and exit.
At least one of --analyse/--model must be provided. Global verbosity options (-v / -vv) are set on the evaluator command itself, and should be included before the plot subcommand:
evaluator -v plot --analyse evaluator/results/analyse/evaluator-analyse_results.csv --all
evaluator -vv plot --analyse evaluator/results/analyse/evaluator-analyse_results.csv --allBy default (no --section, no --all), the sections listed under [plot].default_sections in the resolved configuration file are run. --section may be repeated to run a specific subset, or --all can be used to run every runnable section.
| Section | Requires | Outputs |
|---|---|---|
distributions |
--analyse |
A density + rug plot per morphology feature (<feature>_density.svg), and summary_stats.xlsx (n, mean, median, sd, p5, p95 per feature) |
qc |
--analyse |
count_per_tomogram.svg (EV count per tomogram), closure_pass_rate.svg (fraction is_enclosed per tomogram), closure_fill_ratio_distribution.svg (with the configured flag threshold marked), and qc_summary.xlsx (per-tomogram EV count, pass rate, median fill ratio, count flagged below threshold) |
scatter |
--analyse |
A scatter plot with fitted trend line per feature pair (equiv_diameter_nm vs lumen_volume, surface_area vs lumen_volume, aspect_ratio vs equiv_diameter_nm), and scatter_stats.xlsx (Pearson/Spearman correlation, slope, slope SE per pair) |
concordance |
--analyse and --model |
See Concordance below. |
compare |
Sample sheet with more than one distinct group (multi-sample mode) |
Per-feature violin+box plots by group (violin_<feature>.svg), a PCA plot across standardised features (pca.svg, only if ≥3 complete-case rows and ≥2 features are available), and group_summary.xlsx (per-group n, mean, median per feature) |
concordance provides a comparison of model's least-squares-fitted geometry and the raw voxel measurements that analyse produces.
Rows are joined on analyse's (tomogram, label) against model's (source_file, label_id), matching source_file's basename against tomogram, therefore both must have been run against the same labelled MRC(s) for rows to match. Only matched rows are plotted; concordance_stats.xlsx reports n_matched, n_analyse_only, and n_model_only so unmatched counts are visible.
Produces, per matching vesicle set:
model_vs_equiv_diameter_nm.svgandmodel_vs_major_axis_diameter.svg—model's fitted diameter (2 × radius) plotted against each ofanalyse's two independent diameter estimates, with ay = xreference line.reliability_vs_closure.svg— whethermodel'sreliability.is_reliablegate tracksanalyse's independently-measuredclosure_fill_ratio.fit_rmse_vs_enclosed.svg— whethermodel's fit RMSE tracksanalyse'sis_enclosed.concordance_stats.xlsx— match counts (above) plus Pearson correlation betweenmodel's fitted diameter and each ofanalyse's two diameter estimates, and the reliable-fit pass rate among matched rows.
--analyse and/or --model may point to a sample sheet instead of a single result file, which is a .tsv or .txt file with a header row containing sample_id.
| Column | Required | Description |
|---|---|---|
sample_id |
Yes | Unique identifier for the sample/run; joins rows across the --analyse and --model sheets when both are sheets |
path |
No | Path to that sample's result file. If omitted and the other option's value is a single file (not a sheet), that single file is treated as applying to every sample on this side |
group |
No | Group label, used by the compare section. compare only becomes runnable when more than one distinct group value is present across the sheet. |
replicate |
No | Optional integer replicate number; parsed but not currently used by any section |
If both --analyse and --model are sheets, rows are matched by sample_id; a sample_id present in only one sheet gets None for the missing side. If only one side is a sheet, every sample on that side is paired with the other side's single (non-sheet) file, if one was given.
plot requires Rscript to render plots and write spreadsheets, as well as requires the following R packages to be installed: tidyverse, jsonlite, openxlsx,
viridisLite.
By default, plot resolves Rscript from PATH. If R isn't on PATH (e.g. an renv/conda R install), pass its location explicitly with --rscript:
evaluator plot --analyse evaluator/results/analyse/evaluator-analyse_results.csv --all --rscript /path/to/RscriptResults are written under the output directory (default: current working directory) to
evaluator/plot/:
<section>/: one directory per completed section, containing that section's SVG plots and.xlsxsummary table(s)index.md: links to every section that completed successfully in this runparams.toml: the resolved[plot]parameters used for this run
plot reads the following default values from the configuration file's [plot] section:
default_sections(default["distributions", "qc", "scatter"]): sections run when neither--sectionnor--allis given.fill_ratio_flag_threshold(default0.05):closure_fill_ratiovalues below this are marked in theqcsection's fill-ratio histogram and counted inqc_summary.xlsx.