Skip to content

data

Read-only datasets for the dashboard API.

Each dataset call opens its own DuckDB connection. Missing workflow stages produce empty results; recorded file paths are resolved against the session.

DashboardData

Read session metadata without modifying the database or generating files.

Keep the session unchanged while browsing. Database errors propagate to callers.

Attributes:

Name Type Description
session_dir

Resolved session root.

database

Path to the session's meta.duckdb.

__init__(session_dir)

Store the session location without opening its database.

Parameters:

Name Type Description Default
session_dir Path

Directory containing existing metadata and workflow files.

required

candidates()

Return candidate structures, including rejected and unfitted candidates.

Returns:

Type Description
list[dict[str, Any]]

Rows ordered by structure, with identifiers, UniProt accessions, source, filtering outcomes, and available quality measurements. Missing tables yield an empty list.

fitting()

Return all fitting solutions, including solutions without saved structures.

Returns:

Type Description
list[dict[str, Any]]

Rows ordered by CC descending, with run/structure/rank identity, scores, and viewer availability. Group top solutions by (powerfit_run_id, structure). Returns an empty list when solutions are absent.

provenance()

Return recorded workflow commands with their inputs and outputs.

Returns:

Type Description
list[dict[str, Any]]

Actions ordered by start time and ID, or an empty list when none are recorded.

refinements()

Return final refinement members across independent refinement runs.

Returns:

Type Description
list[dict[str, Any]]

Rows ordered by PowerFit CC after refinement descending. HADDOCK cluster scores are kept separate. Both changes are after minus before; positive CC change and negative HADDOCK score change mean improvement. Group members by refinement run, fitted input, and cluster. Returns an empty list when required metadata tables are absent.

summary()

Return session counts and fitting progress.

Returns:

Type Description
dict[str, Any]

Candidate and workflow counts, available tables, PowerFit runs, and fitting status. Counts for absent workflow stages are omitted.