torchcell.paper
Code behind the manuscript’s generated artifacts. tables holds primitives that emit one table as both markdown and LaTeX; ontology_graph introspects the pydantic schema into a typed graph and ontology_svg lays it out as the zoomable SVG published at /ontology/; signal is a command-line tool that computes a built dataset’s gzip signal and its derived shape and graph role.
ontology_graph
Introspect the torchcell pydantic schema into a typed, renderable graph.
Classes
One pydantic field on a class, as it should appear in a diagram row. |
|
A pydantic model or enum in the schema, plus its place in the ontology. |
|
A |
|
The whole schema as classes plus inheritance and composition edges. |
Functions
Introspect the live schema modules into an |
ontology_svg
Lay out and render torchcell.paper.ontology_graph as a zoomable SVG map.
Classes
A placed class box. |
|
A titled domain block containing one or more laid-out trees. |
|
A fully placed diagram, ready to serialise. |
Functions
Place every class into its lane, then pack lanes into the grid. |
|
Render the legible, Nature-compliant structural panel. |
|
Serialise a placed layout to one self-contained SVG document. |
signal
CLI to compute a dataset’s gzip ‘signal’ + derived shape/graph-role from its built LMDB. Use as new datasets are added, without touching the paper table.
Functions
Resolve a CLI path to a |
tables
Reusable primitives for generating paper tables in BOTH markdown and LaTeX from a single in-code source of truth, plus data-derived columns such as a streaming-gzip “signal” (a Kolmogorov-complexity proxy) computed directly from a built LMDB.
Classes
A table cell that renders differently in markdown vs LaTeX. |
|
One dataset's computed row -- the raw-data artifact the DB report emits. |
|
JSON-backed memo of |
|
A table column. |
|
One table row. |
|
Columns + rows rendered identically to markdown and LaTeX. |
Functions
Format a byte count the way a paper table reads: 0.6 KB, 101 KB, 1.9 MB. |
|
Escape the LaTeX specials that show up in dataset table cells. |
|
Format a number in scientific notation (unit-free) for a table cell. |
|
Extract the serialized phenotype from a torchcell LMDB record. |
|
Serialize the full stored INSTANCE (perturbation + environment + phenotype). |
|
Return |
|
Return the first record of an LMDB (for schema-derived table columns). |
|
Derive |
|
Fingerprint an LMDB's |
|
Return the leading dendron |