B
BarCodeR documentationEmbedded documentation — works offline
/

Input data — 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
Loader interface modules/data/mod_data_loader_ui.R
Reading, detection, modals and insertion modules/data/mod_data_loader_server.R
Dataset-name cleaning modules/_shared/_dataset_naming.R
Phyloseq integrity guard modules/_shared/_ps_guard.R
Global registry and upload limit app.R
Documentation source documentation-src/en/input-data/
Generated documentation www/documentation/en/input-data/

2. Architecture and main data flows#

fileInput rds_input
  → read_serialized_input()
  → detect_supported_object_type()
  → pending_obj / pending_type / pending_candidates
  → selection or confirmation modal
  → mt_prepare_loaded_phyloseq()
  → bcr_guard_ps() for a single dataset
  → datasets() registry
  → active_ds()
  → unsaved project state

2.1. Reactive state and memory#

Identifier Role
pending_obj() Loaded object waiting for user confirmation.
pending_type() Detected type: dataset or project.
pending_file_name() Original uploaded file name.
pending_object_name() Object name selected inside an RData file.
pending_candidates() Compatible candidates found in a multi-object RData file.
datasets() Reactive registry containing all datasets in the current BarCodeR project.
active_ds() Dataset name used by default by downstream modules.

2.2. Traceability chains#

single phyloseq
  → proposed label
  → add or replace modal
  → mt_prepare_loaded_phyloseq()
  → bcr_guard_ps()
  → datasets(new_registry)
  → active_ds(final_label)
  → detailed cleaning report
project object
  → datasets / ps_registry / list-of-phyloseq extraction
  → clean_project_phyloseq_list()
  → name collision resolution
  → merge or replace datasets()
  → active dataset restoration
  → aggregate restoration report

3. Shiny inputs#

Identifier Widget UI Source Server references
cancel_load_dataset actionButton mod_data_loader_server.R:629 mod_data_loader_server.R:1082
cancel_project_load actionButton mod_data_loader_server.R:772 mod_data_loader_server.R:1158
cancel_rdata_choice actionButton mod_data_loader_server.R:574 mod_data_loader_server.R:1032
close_dataset_report actionButton mod_data_loader_server.R:730 mod_data_loader_server.R:735
close_info_modal actionButton mod_data_loader_server.R:539 mod_data_loader_server.R:544
close_loader_modal_top server-only / dynamic mod_data_loader_server.R:548
close_project_report actionButton mod_data_loader_server.R:832 mod_data_loader_server.R:837
confirm_load_dataset actionButton mod_data_loader_server.R:630 mod_data_loader_server.R:1088
confirm_project_load actionButton mod_data_loader_server.R:773 mod_data_loader_server.R:1164
confirm_rdata_choice actionButton mod_data_loader_server.R:575 mod_data_loader_server.R:1038
dataset_import_mode radioButtons mod_data_loader_server.R:606 mod_data_loader_server.R:1095
dataset_label_modal textInput mod_data_loader_server.R:596 mod_data_loader_server.R:1096
project_import_mode radioButtons mod_data_loader_server.R:756 mod_data_loader_server.R:1165
rdata_object_choice selectInput mod_data_loader_server.R:562 mod_data_loader_server.R:1039, mod_data_loader_server.R:1042, mod_data_loader_server.R:1044, mod_data_loader_server.R:1047, mod_data_loader_server.R:1055
rds_input fileInput mod_data_loader_ui.R:314 mod_data_loader_server.R:968, mod_data_loader_server.R:969, mod_data_loader_server.R:973, mod_data_loader_server.R:988, mod_data_loader_server.R:999, mod_data_loader_server.R:1005

4. Shiny outputs#

Identifier Widget UI Source Server references

5. Validation and integrity guard#

Layer Function Effect
Serialized file readRDS() / load() Reads the object; RData is loaded in an isolated environment.
Object detection detect_supported_object_type() Recognizes a phyloseq, datasets/ps_registry project, or list of phyloseq.
Sample identifiers sanitize_sample_names() Transliterates, replaces unsafe characters and resolves duplicates.
Metadata blanks replace_empty_metadata_with_na() Converts columns to character and replaces empty/space-only cells with NA.
Phyloseq structure bcr_guard_ps() Requires a phyloseq with OTU table and checks sample/taxon identifiers.
Dataset label bcr_clean_label() / bcr_make_unique_label() Creates a safe and unique registry key.

6. Internal functions#

6.1. Files and serialization#

Identifier Source Line Role
default_label_from_fileinput() modules/data/mod_data_loader_server.R 42 Internal helper in the Files and serialization layer.
reset_fileinput() modules/data/mod_data_loader_server.R 84 Internal helper in the Files and serialization layer.
read_serialized_input() modules/data/mod_data_loader_server.R 352 Reads an RDS/RData in an isolated environment and inventories compatible objects.
build_rdata_choice_modal() modules/data/mod_data_loader_server.R 552 Internal helper in the Files and serialization layer.

6.2. General#

Identifier Source Line Role
mod_data_loader_server() modules/data/mod_data_loader_server.R 1 Internal helper in the General layer.
tr() modules/data/mod_data_loader_server.R 12 Internal helper in the General layer.
make_unique_label() modules/data/mod_data_loader_server.R 40 Internal helper in the General layer.
mode_label() modules/data/mod_data_loader_server.R 80 Internal helper in the General layer.
is_same_string() modules/data/mod_data_loader_server.R 91 Internal helper in the General layer.
empty_change_df() modules/data/mod_data_loader_server.R 160 Internal helper in the General layer.
summarize_report() modules/data/mod_data_loader_server.R 324 Internal helper in the General layer.
detect_supported_object_type() modules/data/mod_data_loader_server.R 337 Classifies an object as a phyloseq dataset, a project, or unsupported content.
make_table_rows() modules/data/mod_data_loader_server.R 478 Internal helper in the General layer.
bcr_make_unique_label() modules/_shared/_dataset_naming.R 35 Internal helper in the General layer.
sb_try() modules/_shared/_ps_guard.R 11 Internal helper in the General layer.
sb_ps_slots() modules/_shared/_ps_guard.R 17 Internal helper in the General layer.

6.3. State / cleanup#

Identifier Source Line Role
clear_pending() modules/data/mod_data_loader_server.R 26 Internal helper in the State / cleanup layer.

6.4. UI / rendering#

Identifier Source Line Role
build_modal_shell() modules/data/mod_data_loader_server.R 426 Internal helper in the UI / rendering layer.
make_kpi_card() modules/data/mod_data_loader_server.R 469 Internal helper in the UI / rendering layer.
make_change_card() modules/data/mod_data_loader_server.R 490 Internal helper in the UI / rendering layer.
show_message_modal() modules/data/mod_data_loader_server.R 527 Internal helper in the UI / rendering layer.
sb_ps_require() modules/_shared/_ps_guard.R 84 Internal helper in the UI / rendering layer.
bcr_guard_message() modules/_shared/_ps_guard.R 142 Internal helper in the UI / rendering layer.

6.5. Validation / formatting#

Identifier Source Line Role
clean_label() modules/data/mod_data_loader_server.R 39 Internal helper in the Validation / formatting layer.
sanitize_sample_names() modules/data/mod_data_loader_server.R 97 Standardizes sample identifiers and resolves duplicates.
replace_empty_metadata_with_na() modules/data/mod_data_loader_server.R 140 Replaces blank metadata cells with NA after character conversion.
bcr_clean_label() modules/_shared/_dataset_naming.R 25 Internal helper in the Validation / formatting layer.
sb_ps_check_ids() modules/_shared/_ps_guard.R 42 Internal helper in the Validation / formatting layer.
bcr_guard_ps() modules/_shared/_ps_guard.R 136 Checks phyloseq class, OTU table presence and identifier consistency before insertion.

6.6. Phyloseq / datasets#

Identifier Source Line Role
prepare_named_phyloseq_list() modules/data/mod_data_loader_server.R 51 Internal helper in the Phyloseq / datasets layer.
extract_project_dataset_names() modules/data/mod_data_loader_server.R 59 Internal helper in the Phyloseq / datasets layer.
mt_prepare_loaded_phyloseq() modules/data/mod_data_loader_server.R 164 Cleans and synchronizes OTU/metadata identifiers and returns a change report.
build_dataset_load_modal() modules/data/mod_data_loader_server.R 580 Internal helper in the Phyloseq / datasets layer.
build_dataset_report_modal() modules/data/mod_data_loader_server.R 635 Internal helper in the Phyloseq / datasets layer.
build_project_load_modal() modules/data/mod_data_loader_server.R 739 Internal helper in the Phyloseq / datasets layer.
build_project_report_modal() modules/data/mod_data_loader_server.R 778 Internal helper in the Phyloseq / datasets layer.
load_pending_project() modules/data/mod_data_loader_server.R 849 Cleans project phyloseq objects, merges or replaces the registry, and restores the active dataset.
clean_project_phyloseq_list() modules/data/mod_data_loader_server.R 866 Internal helper in the Phyloseq / datasets layer.