Virtitta is a compact internal web interface for reviewing virpipa results.
It imports per-sample QC summaries from completed virpipa runs into a local SQLite database and provides:
- a dense main table for all imported samples
- sorting, filtering, and configurable visible columns
- manual QC assignment (
pass,fail,unreviewed) - comments on individual samples
- bulk QC actions across selected samples
- IGV launch links for local desktop IGV, with optional webIGV fallback
- LIMS export based on the imported
2limsrsfiles plus Virtitta QC state
The interface is designed for efficient day-to-day review rather than presentation-heavy dashboards.
- Interface guide: table behavior, sample detail pages, exports, roles, and common workflows
- Admin guide: setup, CLI commands, authentication, maintenance, and deployment notes
- Plans and TODO: future work and deferred cleanup items
Virtitta does not scrape raw pipeline outputs directly. It imports the structured run summaries produced by virpipa:
results/<run_name>/<sample_id>/results/<sample_id>_qc_summary.json
Each per-sample JSON includes the QC values shown in the table plus relative paths to important result files.
Configuration lives in virtitta.toml. Start from virtitta.example.toml.
Important settings:
database.path- where the SQLite database is stored
exports.lims_root- optional server-side export root for LIMS files
cache.outputs_rootandcache.output_keys- local cache for small post-import artifacts such as clipboard FASTA files and the rug/KDE image
auth.enabled- optional local login system with role-based permissions; disabled by default
results_roots- one or more result roots that contain imported
virpiparuns
- one or more result roots that contain imported
igv.base_url- usually
http://localhost:60151/load
- usually
webigv.enabled- optional browser-based IGV fallback for users without local drive mappings
results_roots[].windows_path- Windows-visible root path used when constructing IGV URLs
ui.table_columns- complete main table data-column order, including columns hidden by default
ui.visible_columns- subset of
ui.table_columnsshown in the main table by default
- subset of
ui.column_max_widths- optional CSS width caps for specific columns, for example
run_name = "36ch"orcomment_count = "120px"; capped cells truncate visually and keep the full value on hover
- optional CSS width caps for specific columns, for example
ui.highlight_rules- numeric threshold coloring rules
Example:
[database]
path = "data/virtitta.sqlite3"
[exports]
lims_root = "data/lims_exports"
[auth]
enabled = false
provider = "local"
cookie_secure = false
[igv]
enabled = true
base_url = "http://localhost:60151/load"
[webigv]
enabled = false
igv_js_url = "/static/igv.min.js"
[[results_roots]]
name = "default"
linux_path = "/fs1/jonas/hcv/test_results"
windows_path = "Q:/jonas/hcv/test_results"Create or activate the environment first:
source ~/miniforge3/etc/profile.d/conda.sh
conda activate virtitta
cd ~/git/virtittaInitialize the SQLite database:
PYTHONPATH=$PWD python -m virtitta.cli init-db --config virtitta.tomlThis creates the database file configured under database.path.
Run the development server:
PYTHONPATH=$PWD python -m virtitta.cli serve --config virtitta.tomlThen open the shown URL in a browser, normally:
http://127.0.0.1:8000
You can override host and port if needed:
PYTHONPATH=$PWD python -m virtitta.cli serve --config virtitta.toml --host 0.0.0.0 --port 8001After a virpipa run finishes and contains per-sample *_qc_summary.json files under each sample results/ directory, import it into Virtitta:
PYTHONPATH=$PWD python -m virtitta.cli import-run \
--config virtitta.toml \
--run-dir /fs1/jonas/hcv/test_results/260317_A00681_1225_AHJMKLDRX7This imports or updates all samples from that run in the database.
Virtitta stores both the import date from the QC summary generation timestamp and a sequencing date derived from
the first six characters of the run name (YYMMDD). If the run name does not start with a valid date, the sequencing
date falls back to the import date.
If the run was restored or relocated and the QC summaries are missing sample metadata that originally came from
clarity_sample_info.json, you can pass that file explicitly:
PYTHONPATH=$PWD python -m virtitta.cli import-run \
--config virtitta.toml \
--run-dir /fs1/jonas/hcv/test_results/260317_A00681_1225_AHJMKLDRX7 \
--clarity-sample-info /path/to/clarity_sample_info.jsonWhen provided, Virtitta uses that file to fill missing CT, library concentration, and library fragment length
values for matching sample_id entries. Values already present in the per-sample QC summaries are kept.
If a sample failed before virpipa produced any per-sample QC summary, add a sparse failed-sample row manually:
PYTHONPATH=$PWD python -m virtitta.cli import-sample \
--config virtitta.toml \
--sample-id SAMPLE123 \
--lid LID123 \
--ct 31.2 \
--library-concentration 1.7Only --config, --sample-id, and --lid are required for import-sample. Use --ct and
--library-concentration when clarity_sample_info.json is unavailable. If that file is available instead, pass it:
PYTHONPATH=$PWD python -m virtitta.cli import-sample \
--config virtitta.toml \
--sample-id SAMPLE123 \
--lid LID123 \
--clarity-sample-info /path/to/clarity_sample_info.jsonThis creates sample_run_id = <sample_id>_<run_name>, stores the LID, Date, and any provided CT/library values,
and leaves analysis metrics and file links empty because no result files exist. The Date is the import date for
manual failed-sample records.
If --run-dir is omitted, Virtitta stores the row under the synthetic manual_failed_samples run. Pass
--run-dir /path/to/results/<run_name> when you want the failed sample grouped with a specific run.
Re-importing the same run is safe:
- sample QC metrics and file references are updated from the new
virpipaJSON - Virtitta-owned review state such as comments, QC decisions, and manual field overrides is preserved
If you want to import every run under the configured roots:
PYTHONPATH=$PWD python -m virtitta.cli import-root --config virtitta.tomlIf flattened AF count columns were added after samples were already imported, backfill them from the stored
samples.raw_json without re-importing runs:
PYTHONPATH=$PWD python -m virtitta.cli backfill-af-counts --config virtitta.tomlTo verify the local output cache against the current remote files for all imported runs, excluding manually added failed samples:
PYTHONPATH=$PWD python -m virtitta.cli verify-cache --config virtitta.toml --all-runsAuthentication is optional and disabled by default. To enable the self-contained local login system, set:
[auth]
enabled = true
provider = "local"
cookie_secure = true # use true behind HTTPSCreate local users from the CLI:
PYTHONPATH=$PWD python -m virtitta.cli create-user --config virtitta.toml --username alice --role admin
PYTHONPATH=$PWD python -m virtitta.cli create-user --config virtitta.toml --username bob --role reviewer
PYTHONPATH=$PWD python -m virtitta.cli list-users --config virtitta.tomlRoles:
admin: all actions, including deletes, metadata overrides, run refresh, and user management through the CLIreviewer: QC, categories, groups, comments, read exports, and server-side LIMS exportcommenter: view, read exports, and add commentsviewer: view and read exports only
When authentication is enabled, all write forms use CSRF tokens and comments/QC updates use the logged-in user name.
Typical use:
- Run
virpipaon a sequencing run. - Import the completed run into Virtitta with
import-run. - Open Virtitta in the browser.
- Review samples in the main table.
- Assign QC status and comments.
- Open individual samples for more detail, rug plot, file links, and IGV launch.
- Export selected reviewed samples to the LIMS format.
The main table is the primary work area. It includes:
LIDas the presentation-first identifierSample ID- sequencing date and import date
- subtype and BLAST identity
- read and host/human filtering metrics
- QC coverage and depth metrics
- sample metadata such as CT and library values
Run- comment summary
- row actions such as
IGV,LIMS, andOpen
Features:
- sortable columns
- filtering on run, subtype, QC state, and selected numeric thresholds
- sticky leading columns during horizontal scroll
- client-side show/hide for columns
- bulk selection and bulk QC actions
Each sample detail page shows:
- imported summary values
- current QC status
- comments
- compact manual overrides for LID, Date, CT, library concentration, and subtype
- rug KDE plot
- result-file download links
- IGV track-file links
- LIMS export for that sample
- samples can be marked
pass,fail, orunreviewed - failing a sample requires a comment
- QC comments can be added during the QC action itself
- comments can be deleted
Imported pipeline values remain stored unchanged. On a sample detail page, Edit metadata can set narrow
manual overrides for LID, Date, CT, Lib Conc, and Subtype. Overridden values are rendered in italic
in the detail view and main table. Each changed field also creates an automatic comment so reimports do not
silently hide manual edits.
Virtitta can export:
- one sample
- multiple selected samples into one file
Export is blocked if any selected sample is still unreviewed.
Save location behavior:
- the default
Export LIMSaction writes the export on the server under:<lims_root>/<YYYY-MM-DD>/
- repeated exports on the same day keep unique filenames instead of overwriting earlier ones
- browser download remains available as an explicit alternative from the export dropdown
- if
exports.lims_rootis not configured, the default export action reports that as a warning instead of silently failing - the main table export dropdown also supports clipboard export of:
- the currently visible main table
- selected export FASTA records
- selected 15% IUPAC FASTA records
- the two FASTA clipboard exports and the rug/KDE image are served from the local output cache when present
Future work is tracked in Plans and TODO.
- sample deletion removes the sample from the Virtitta database only
- deleting a sample does not remove any result files from disk
- IGV launch assumes local desktop IGV is already running and listening on the configured port
- authentication is optional, but should be enabled before exposing Virtitta beyond a trusted local workstation