Skip to content

The PhosKinTime app

The PhosKinTime app is a guided page in your browser for the network model, the second way to use PhosKinTime next to the command line and the library. It runs the same code on the same files.

pixi run app                                   # = pixi run phoskintime app; workspace: the current folder
pixi run phoskintime app --workspace ~/phoskintime-projects --port 8765 [--no-browser]
python -m phoskintime.networkmodel.app --workspace DIR     # the same, without the command line

It prints a link with a session token and opens it in your browser. It serves 127.0.0.1 only and reads and writes only inside the workspace. Closing it (Ctrl+C) stops a run it started.

Video tutorial

The three ways to use PhosKinTime on the synthetic example (phoskintime example), about 5 minutes, no sound (the captions are part of the recording; waits are cut):

  1. the app: project, settings, validation, run (the fit in sbmlsim), results, the Experiments card (kinase knockout and inhibition, dose response, gene knockdown, pulse, design D5; each in sbmlsim, with an experiment bundle to download), the profiles analysis (profile likelihoods) and the run bundle;
  2. a Python script with phoskintime.networkmodel.api and phoskintime.networkmodel.sim (example_library.py): fit, tables, a drug washed out, a removed edge, a dose response, and the figure it draws;
  3. the command line: phoskintime example, validate, run, bundle verify, simulate run / show, analyze summary and the identifiability counts of the app's profiles.

The example's values are invented curves, so neither the fit nor any prediction means anything. The script and command-line parts show the real output of the commands, drawn as a terminal page (paths shortened to ~, long log stretches left out). Recorded with tools/record_app_video.cjs and the tools/video_* helpers.

What it does

Set up and validate. A project is a folder <workspace>/<project>/ with config.toml, data/ and runs/. Create it from the synthetic example (invented curves, for trying things out) or from your own files: upload the kinase network, TF network, MS and RNA CSVs and the KinOpt and TFOpt workbooks into data/, or point at files inside the workspace. Edit the main settings (model family, fit engine, starts, cores, seed, profiles, the data driving TFs without sites, observation model) and the v0.7.0 options; the app checks that the config stays valid before it saves it. Validate runs phoskintime.networkmodel.api.validate_inputs: everything a run would read, checked without fitting.

Run and monitor. Run starts python -m phoskintime.networkmodel.runner for the project's config into runs/<name or run-YYYYmmdd-HHMMSS>/, shows its console log as it runs (app_console.log) and its state (running, finished, failed, stopped) with the exit code. Stop ends the run. One run at a time.

Results and bundle. For a finished run: the objective, the multistart record (starts, converged, accepted), the fitted parameters with their identifiability labels, and what the run does not have. Bundle writes and checks the run bundle <run>/<run name>.pkt.zip (every run writes it unless run with --no-bundle) and downloads it. Plots and interactive views are in PhosKinTime-Vis, which reads the bundle.

Analyses. The run-based analyses and exports of phoskintime analyze / export run in the background with their own log and a stop button: summary, profiles, design, insights, temporal, accumulators, sbml, petab. Their options are filled from the run; an analysis is offered only when the run has the files it needs. Outputs go to <run>/analysis/<name>/; a finished run is not changed. Analyses use the project's current config.toml: if you change settings after a run, run the analyses from the command line with the config.toml the run was started with instead. The workbook and network analyses (counts, similarity, kinopt-tables, kinopt-ensemble, subnetworks) are on the command line only.

Experiments. On a finished run: inhibit or knock out a kinase, knock down a gene, withdraw the stimulus, a dose-response or design D5, with bands over the posterior when the run has draws; each runs as phoskintime simulate run and its experiment bundle can be downloaded.

Security

A random token per session (in the link; every request needs it), loopback binding and a loopback-only Host header, names restricted to letters, digits, ., _ and -, every path resolved inside the workspace (no .., no absolute paths, no symlinks out), uploads limited to the known input roles and file types and to --max-upload-mb (200), commands only from fixed registries (the browser never sends a command line), and the response headers of KinOpt's and TFOpt's apps (strict Content-Security-Policy, no referrer, no framing, no caching). No request log is written, because the URLs carry the token.