Datasets — Technical reference
Technical inventory generated from the code embedded in this BarCodeR version.
This page is regenerated by documentation-src/build_docs.py. Function names, identifiers and line numbers come from the current source code.
1. Source files#
| Role | Path |
|---|---|
| Interface Shiny | modules/datasets/mod_datasets_ui.R |
| Dataset and project actions | modules/datasets/mod_datasets_server.R |
| Dataset naming | modules/_shared/_dataset_naming.R |
| Persistent project store | modules/_shared/_project_store.R |
| UI state persistence | modules/_shared/_ui_state.R |
| Application integration | app.R |
| Documentation source | documentation-src/en/datasets/ |
| Generated documentation | www/documentation/en/datasets/ |
2. Architecture and main data flows#
datasets() + active_ds()
→ registry rendering
→ activate / rename / duplicate / reorder / delete
→ unsaved-state marker
→ bcr_save_registry()
→ save/projects/<slug>/registry.rds
project manager
→ manifest + .current pointer
→ save / restore / create / open / rename
→ duplicate / delete
→ ZIP export / import
→ full-session reload on project switch
2.1. Reactive state and memory#
| Identifier | Role |
|---|---|
datasets() |
Named reactive list of phyloseq objects currently held in memory. |
active_ds() |
Name of the dataset used as the global application reference. |
vals$persist_project() |
Global callback used to persist the current registry. |
vals$switch_project() |
Global callback that changes the current project and reloads the session. |
proj_tick() |
Reactive counter that refreshes the project list and project sizes. |
rv$export_name |
Dataset selected for individual export. |
rv$del_project_slug |
Project slug waiting for deletion confirmation. |
2.2. Traceability chains#
row action
→ Shiny input (activate/edit/duplicate/export/reorder/delete)
→ datasets() and/or active_ds() mutation
→ project marked unsaved
→ explicit Save project
→ registry.rds + manifest.rds
Open project
→ attempt to persist current project
→ bcr_write_current_slug()
→ session reload
→ bcr_load_registry() + UI-state restoration
3. Shiny inputs#
| Identifier | Widget | UI Source | Server references |
|---|---|---|---|
ask_delete_project |
server-only / dynamic |
mod_datasets_server.R:727, mod_datasets_server.R:728 |
|
ask_rename_project |
actionButton |
mod_datasets_server.R:598 |
mod_datasets_server.R:689 |
close_ds_modal_top |
server-only / dynamic |
mod_datasets_server.R:81 |
|
confirm_delete_project |
actionButton |
mod_datasets_server.R:744 |
mod_datasets_server.R:749 |
confirm_new_project |
actionButton |
mod_datasets_server.R:662 |
mod_datasets_server.R:667 |
confirm_rename_project |
actionButton |
mod_datasets_server.R:697 |
mod_datasets_server.R:701 |
confirm_restore |
actionButton |
mod_datasets_server.R:511 |
mod_datasets_server.R:517 |
del_confirm |
actionButton |
mod_datasets_server.R:403 |
mod_datasets_server.R:408 |
do_export_dl |
downloadButton |
mod_datasets_ui.R:155 |
|
ds_act |
server-only / dynamic |
mod_datasets_server.R:248, mod_datasets_server.R:249, mod_datasets_server.R:250 |
|
dup_confirm |
actionButton |
mod_datasets_server.R:373 |
mod_datasets_server.R:378 |
dup_name |
textInput |
mod_datasets_server.R:369 |
mod_datasets_server.R:381 |
duplicate_project |
server-only / dynamic |
mod_datasets_server.R:713, mod_datasets_server.R:714 |
|
edit_confirm |
actionButton |
mod_datasets_server.R:306 |
mod_datasets_server.R:327 |
edit_name |
textInput |
mod_datasets_server.R:292 |
mod_datasets_server.R:338 |
edit_note |
server-only / dynamic |
mod_datasets_server.R:332 |
|
edit_tags |
textInput |
mod_datasets_server.R:300 |
mod_datasets_server.R:333 |
export_project |
downloadButton |
mod_datasets_ui.R:215 |
|
export_zip |
downloadButton |
mod_datasets_ui.R:204 |
|
global_active |
server-only / dynamic |
mod_datasets_server.R:432, mod_datasets_server.R:433 |
|
import_project_zip |
fileInput |
mod_datasets_ui.R:211 |
mod_datasets_server.R:798, mod_datasets_server.R:799 |
new_project |
actionButton |
mod_datasets_ui.R:186 |
mod_datasets_server.R:650 |
new_project_name |
textInput |
mod_datasets_server.R:657 |
mod_datasets_server.R:668 |
open_project |
server-only / dynamic |
mod_datasets_server.R:682, mod_datasets_server.R:683 |
|
refresh_registry |
actionButton |
mod_datasets_ui.R:145 |
mod_datasets_server.R:437 |
rename_project_name |
textInput |
mod_datasets_server.R:693 |
mod_datasets_server.R:702 |
restore_session |
actionButton |
mod_datasets_ui.R:191 |
mod_datasets_server.R:497 |
save_session |
actionButton |
mod_datasets_ui.R:181 |
mod_datasets_server.R:475 |
4. Shiny outputs#
| Identifier | Widget | UI Source | Server references |
|---|---|---|---|
current_project_line |
uiOutput |
mod_datasets_ui.R:178 |
mod_datasets_server.R:591 |
do_export_dl |
downloadButton |
mod_datasets_ui.R:155 |
mod_datasets_server.R:442 |
export_project |
downloadButton |
mod_datasets_ui.R:215 |
mod_datasets_server.R:454 |
export_size_note |
uiOutput |
mod_datasets_ui.R:222 |
mod_datasets_server.R:771 |
export_zip |
downloadButton |
mod_datasets_ui.R:204 |
mod_datasets_server.R:781 |
project_list |
uiOutput |
mod_datasets_ui.R:226 |
mod_datasets_server.R:604 |
registry_table |
DTOutput |
mod_datasets_server.R:190 |
mod_datasets_server.R:193 |
registry_wrap |
uiOutput |
mod_datasets_ui.R:151 |
mod_datasets_server.R:180 |
session_status |
uiOutput |
mod_datasets_ui.R:197 |
mod_datasets_server.R:537 |
5. Validation and integrity guard#
| Layer | Function | Effect |
|---|---|---|
| Dataset name | bcr_clean_label() / bcr_make_unique_label() |
Builds a safe key and prevents silent overwrite. |
| Filtered lineage | relabel_dataset_parents() |
Updates or clears parent_dataset in recognized descendants. |
| Persistence | bcr_save_registry() |
Writes the registry atomically and protects a non-empty save from empty memory. |
| Current project | .current + bcr_write_current_slug() |
Persists the slug reopened at next startup. |
| ZIP archive | bcr_find_project_root() |
Looks for registry.rds, manifest.rds or known history folders. |
| Project deletion | bcr_delete_project() |
Rejects the current project and verifies that its directory is gone. |
6. Internal functions#
6.1. Configuration#
| Identifier | Source | Line | Role |
|---|---|---|---|
bcr_read_ui_params() |
modules/_shared/_ui_state.R |
60 | Internal helper in the Configuration layer. |
bcr_capture_params() |
modules/_shared/_ui_state.R |
96 | Internal helper in the Configuration layer. |
6.2. Files and serialization#
| Identifier | Source | Line | Role |
|---|---|---|---|
session_path() |
modules/datasets/mod_datasets_server.R |
469 | Internal helper in the Files and serialization layer. |
bcr_current_pointer_path() |
modules/_shared/_project_store.R |
271 | Internal helper in the Files and serialization layer. |
bcr_manifest_path() |
modules/_shared/_project_store.R |
311 | Internal helper in the Files and serialization layer. |
bcr_ui_state_path() |
modules/_shared/_ui_state.R |
26 | Internal helper in the Files and serialization layer. |
6.3. General#
| Identifier | Source | Line | Role |
|---|---|---|---|
tr() |
modules/datasets/mod_datasets_server.R |
27 | Internal helper in the General layer. |
fa_html() |
modules/datasets/mod_datasets_server.R |
35 | Internal helper in the General layer. |
ds_kind() |
modules/datasets/mod_datasets_server.R |
89 | Derives the displayed provenance from filtration_log and openmetabar_run. |
ds_parent() |
modules/datasets/mod_datasets_server.R |
95 | Internal helper in the General layer. |
ds_last_modified() |
modules/datasets/mod_datasets_server.R |
100 | Internal helper in the General layer. |
ds_meta() |
modules/datasets/mod_datasets_server.R |
110 | Internal helper in the General layer. |
kind_badge() |
modules/datasets/mod_datasets_server.R |
115 | Internal helper in the General layer. |
action_buttons() |
modules/datasets/mod_datasets_server.R |
159 | Internal helper in the General layer. |
btn() |
modules/datasets/mod_datasets_server.R |
160 | Internal helper in the General layer. |
row_slug() |
modules/datasets/mod_datasets_server.R |
589 | Internal helper in the General layer. |
set_iv() |
modules/datasets/mod_datasets_server.R |
612 | Internal helper in the General layer. |
bcr_make_unique_label() |
modules/_shared/_dataset_naming.R |
35 | Internal helper in the General layer. |
.bcr_or() |
modules/_shared/_project_store.R |
46 | Internal helper in the General layer. |
.bcr_name_fingerprint() |
modules/_shared/_project_store.R |
52 | Internal helper in the General layer. |
bcr_slugify() |
modules/_shared/_project_store.R |
66 | Internal helper in the General layer. |
bcr_set_pending_open() |
modules/_shared/_project_store.R |
105 | Internal helper in the General layer. |
bcr_take_pending_open() |
modules/_shared/_project_store.R |
109 | Internal helper in the General layer. |
bcr_register_session() |
modules/_shared/_project_store.R |
126 | Internal helper in the General layer. |
bcr_unregister_session() |
modules/_shared/_project_store.R |
132 | Internal helper in the General layer. |
bcr_other_sessions() |
modules/_shared/_project_store.R |
137 | Internal helper in the General layer. |
norm() |
modules/_shared/_project_store.R |
183 | Internal helper in the General layer. |
norm() |
modules/_shared/_project_store.R |
200 | Internal helper in the General layer. |
bcr_migrate_legacy_histories() |
modules/_shared/_project_store.R |
222 | Internal helper in the General layer. |
bcr_read_current_slug() |
modules/_shared/_project_store.R |
273 | Internal helper in the General layer. |
bcr_write_current_slug() |
modules/_shared/_project_store.R |
294 | Internal helper in the General layer. |
bcr_read_manifest() |
modules/_shared/_project_store.R |
375 | Internal helper in the General layer. |
bcr_write_manifest() |
modules/_shared/_project_store.R |
384 | Internal helper in the General layer. |
bcr_unique_slug() |
modules/_shared/_project_store.R |
462 | Internal helper in the General layer. |
has_marker() |
modules/_shared/_project_store.R |
548 | Internal helper in the General layer. |
bcr_is_nav_input() |
modules/_shared/_ui_state.R |
34 | Internal helper in the General layer. |
bcr_capture_nav() |
modules/_shared/_ui_state.R |
40 | Internal helper in the General layer. |
bcr_is_param_input() |
modules/_shared/_ui_state.R |
89 | Internal helper in the General layer. |
.bcr_session_token() |
modules/_shared/_ui_state.R |
132 | Internal helper in the General layer. |
bcr_restore_param() |
modules/_shared/_ui_state.R |
165 | Internal helper in the General layer. |
bcr_restore_module_inputs() |
modules/_shared/_ui_state.R |
233 | Internal helper in the General layer. |
bcr_apply_nav() |
modules/_shared/_ui_state.R |
310 | Internal helper in the General layer. |
6.4. UI / rendering#
| Identifier | Source | Line | Role |
|---|---|---|---|
build_modal_shell() |
modules/datasets/mod_datasets_server.R |
45 | Internal helper in the UI / rendering layer. |
make_modal_info_box() |
modules/datasets/mod_datasets_server.R |
74 | Internal helper in the UI / rendering layer. |
open_edit_modal() |
modules/datasets/mod_datasets_server.R |
284 | Internal helper in the UI / rendering layer. |
open_dup_modal() |
modules/datasets/mod_datasets_server.R |
358 | Internal helper in the UI / rendering layer. |
open_delete_modal() |
modules/datasets/mod_datasets_server.R |
390 | Internal helper in the UI / rendering layer. |
bcr_read_ui_state() |
modules/_shared/_ui_state.R |
51 | Internal helper in the UI / rendering layer. |
bcr_ui_state_prime() |
modules/_shared/_ui_state.R |
140 | Internal helper in the UI / rendering layer. |
bcr_write_ui_state() |
modules/_shared/_ui_state.R |
286 | Internal helper in the UI / rendering layer. |
6.5. Validation / formatting#
| Identifier | Source | Line | Role |
|---|---|---|---|
fmt_size() |
modules/datasets/mod_datasets_server.R |
583 | Internal helper in the Validation / formatting layer. |
bcr_clean_label() |
modules/_shared/_dataset_naming.R |
25 | Internal helper in the Validation / formatting layer. |
bcr_invalidate_size_cache() |
modules/_shared/_project_store.R |
426 | Internal helper in the Validation / formatting layer. |
6.6. Phyloseq / datasets#
| Identifier | Source | Line | Role |
|---|---|---|---|
mod_datasets_server() |
modules/datasets/mod_datasets_server.R |
21 | Initializes the dataset registry, active selector and project manager. |
reorder_dataset() |
modules/datasets/mod_datasets_server.R |
274 | Reorders datasets() entries without changing the underlying objects. |
relabel_dataset_parents() |
modules/datasets/mod_datasets_server.R |
316 | Updates parent_dataset references after rename or deletion. |
bcr_project_slug() |
modules/_shared/_project_store.R |
86 | Internal helper in the Phyloseq / datasets layer. |
bcr_set_project_slug() |
modules/_shared/_project_store.R |
89 | Internal helper in the Phyloseq / datasets layer. |
bcr_project_root() |
modules/_shared/_project_store.R |
142 | Internal helper in the Phyloseq / datasets layer. |
bcr_project_dir() |
modules/_shared/_project_store.R |
150 | Internal helper in the Phyloseq / datasets layer. |
bcr_project_dir_rel() |
modules/_shared/_project_store.R |
160 | Internal helper in the Phyloseq / datasets layer. |
bcr_register_project_resource() |
modules/_shared/_project_store.R |
180 | Internal helper in the Phyloseq / datasets layer. |
bcr_release_project_resources() |
modules/_shared/_project_store.R |
199 | Internal helper in the Phyloseq / datasets layer. |
bcr_registry_path() |
modules/_shared/_project_store.R |
308 | Internal helper in the Phyloseq / datasets layer. |
bcr_save_registry() |
modules/_shared/_project_store.R |
326 | Writes registry.rds with datasets, order and active dataset. |
bcr_load_registry() |
modules/_shared/_project_store.R |
348 | Reads a project’s persisted registry. |
bcr_registry_status() |
modules/_shared/_project_store.R |
366 | Internal helper in the Phyloseq / datasets layer. |
bcr_project_size_bytes() |
modules/_shared/_project_store.R |
410 | Internal helper in the Phyloseq / datasets layer. |
bcr_list_projects() |
modules/_shared/_project_store.R |
435 | Inventories and sorts persisted projects. |
bcr_project_name_taken() |
modules/_shared/_project_store.R |
474 | Internal helper in the Phyloseq / datasets layer. |
bcr_create_project() |
modules/_shared/_project_store.R |
489 | Internal helper in the Phyloseq / datasets layer. |
bcr_rename_project() |
modules/_shared/_project_store.R |
501 | Internal helper in the Phyloseq / datasets layer. |
bcr_delete_project() |
modules/_shared/_project_store.R |
508 | Internal helper in the Phyloseq / datasets layer. |
bcr_export_project_zip() |
modules/_shared/_project_store.R |
524 | Archives the complete project directory as ZIP. |
bcr_find_project_root() |
modules/_shared/_project_store.R |
544 | Internal helper in the Phyloseq / datasets layer. |
bcr_import_project_zip() |
modules/_shared/_project_store.R |
565 | Validates and extracts an archive as a new project. |
bcr_duplicate_project() |
modules/_shared/_project_store.R |
607 | Internal helper in the Phyloseq / datasets layer. |