B
BarCodeR documentationEmbedded documentation — works offline
/

Data Edition — 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
Main interface modules/dataedition/mod_dataedition_main_ui.R
Main server and edit log modules/dataedition/mod_dataedition_main_server.R
Metadata editor modules/dataedition/edit_metadata/
OTU editor modules/dataedition/edit_otu/
Taxonomy editor modules/dataedition/edit_taxonomy/
Full component import/export/deletion modules/dataedition/input_tables/
Active-dataset synchronization modules/_shared/_active_dataset_sync.R
Dataset naming modules/_shared/_dataset_naming.R
Application integration app.R
Documentation source documentation-src/en/data-edition/
Generated documentation www/documentation/en/data-edition/

2. Architecture and main data flows#

datasets() + active_ds()
  → selected_dataset
  → metadata / OTU / taxonomy local editor state
  → immediate apply to the phyloseq object
  → datasets() replacement
  → edit_log append
  → explicit project save in Datasets
full component import
  → fileInput selection
  → identifier and coverage checks
  → slot replacement
  → local editors must be refreshed

2.1. Reactive state and memory#

Identifier Role
selected_dataset Edited dataset synchronized with active_ds().
edit_log phyloseq attribute storing descriptive audit entries.
initial_data / previous_data Local states used by Reset and Undo in each submodule.
tax_edit_info_seen Tracks whether the taxonomy-edit warning has been displayed.
replacement_preview Inventory of taxonomy cells matching replacement patterns.
pending_save_label Cleaned name waiting for overwrite confirmation.

2.2. Traceability chains#

cell / structure action
  → capture previous local state
  → rebuild sample_data / otu_table / tax_table
  → update datasets()[selected_dataset]
  → append edit_log
  → mark project unsaved
Save under another name
  → edited source already changed
  → copy current edited state to a new registry key
  → new key becomes active
  → project still requires explicit disk save

3. Shiny inputs#

Identifier Widget UI Source Server references
add_col_btn actionButton mod_edit_metadata_ui.R:155 mod_edit_metadata_server.R:450, mod_edit_otu_server.R:545, mod_edit_taxonomy_server.R:580
apply_asv_rename_btn actionButton mod_edit_otu_ui.R:185 mod_edit_otu_server.R:889
apply_csv_btn actionButton mod_edit_metadata_ui.R:244 mod_edit_metadata_server.R:800
apply_csv_otu_btn actionButton mod_edit_otu_ui.R:241 mod_edit_otu_server.R:807
apply_csv_tax_btn actionButton mod_edit_taxonomy_ui.R:290 mod_edit_taxonomy_server.R:814
apply_remove server-only / dynamic mod_dataedition_input_tables_server.R:610
apply_replace_btn actionButton mod_edit_taxonomy_ui.R:239 mod_edit_taxonomy_server.R:1004
asv_in_cols server-only / dynamic mod_edit_otu_server.R:864, mod_edit_otu_server.R:899
confirm_apply_replace_btn actionButton mod_edit_taxonomy_server.R:956 mod_edit_taxonomy_server.R:963
confirm_del_suggest_btn actionButton mod_edit_metadata_server.R:600 mod_edit_metadata_server.R:653, mod_edit_otu_server.R:727, mod_edit_taxonomy_server.R:764
confirm_overwrite_registry actionButton mod_dataedition_main_server.R:355 mod_dataedition_main_server.R:374
confirm_remove server-only / dynamic mod_dataedition_input_tables_server.R:673
csv_row_names server-only / dynamic mod_edit_metadata_server.R:808
csv_sep selectInput mod_edit_metadata_ui.R:220 mod_edit_metadata_server.R:773, mod_edit_metadata_server.R:807, mod_edit_metadata_server.R:865
del_col textInput mod_edit_metadata_ui.R:159 mod_edit_metadata_server.R:544, mod_edit_otu_server.R:631, mod_edit_taxonomy_server.R:666
del_col_btn actionButton mod_edit_metadata_ui.R:160 mod_edit_metadata_server.R:540, mod_edit_otu_server.R:627, mod_edit_taxonomy_server.R:661
empty_patterns server-only / dynamic mod_edit_taxonomy_server.R:880, mod_edit_taxonomy_server.R:969
export_meta_csv downloadButton mod_dataedition_input_tables_ui.R:215
export_otu downloadButton mod_dataedition_input_tables_ui.R:219
export_refseq_fasta downloadButton mod_dataedition_input_tables_ui.R:232
export_tax downloadButton mod_dataedition_input_tables_ui.R:223
export_tree_nwk downloadButton mod_dataedition_input_tables_ui.R:236
import_meta_file server-only / dynamic mod_dataedition_input_tables_server.R:563
import_otu_file server-only / dynamic mod_dataedition_input_tables_server.R:564
import_refseq_file server-only / dynamic mod_dataedition_input_tables_server.R:566
import_tax_file server-only / dynamic mod_dataedition_input_tables_server.R:565
import_tree_file server-only / dynamic mod_dataedition_input_tables_server.R:567
meta_file fileInput mod_edit_metadata_ui.R:212 mod_edit_metadata_server.R:765, mod_edit_metadata_server.R:766, mod_edit_metadata_server.R:802
meta_table_editable_cell_edit server-only / dynamic mod_edit_metadata_server.R:379, mod_edit_metadata_server.R:380
new_col textInput mod_edit_metadata_ui.R:154 mod_edit_metadata_server.R:454, mod_edit_otu_server.R:549, mod_edit_taxonomy_server.R:585
otu_csv_row_names server-only / dynamic mod_edit_otu_server.R:816
otu_csv_sep selectInput mod_edit_otu_ui.R:217 mod_edit_otu_server.R:784, mod_edit_otu_server.R:815, mod_edit_otu_server.R:883
otu_file fileInput mod_edit_otu_ui.R:213 mod_edit_otu_server.R:777, mod_edit_otu_server.R:778, mod_edit_otu_server.R:809
otu_table_editable_cell_edit server-only / dynamic mod_edit_otu_server.R:506, mod_edit_otu_server.R:507
preview_replace_btn actionButton mod_edit_taxonomy_ui.R:233 mod_edit_taxonomy_server.R:877, mod_edit_taxonomy_server.R:1005
rename_asv_prefix textInput mod_edit_otu_ui.R:180 mod_edit_otu_server.R:891
rename_col_btn actionButton mod_edit_metadata_ui.R:198 mod_edit_metadata_server.R:296
rename_new_col textInput mod_edit_metadata_ui.R:189 mod_edit_metadata_server.R:300
rename_old_col selectInput mod_edit_metadata_ui.R:180 mod_edit_metadata_server.R:238, mod_edit_metadata_server.R:299
replace_value textInput mod_edit_taxonomy_ui.R:224 mod_edit_taxonomy_server.R:881, mod_edit_taxonomy_server.R:970
reset_btn actionButton mod_edit_metadata_ui.R:170 mod_edit_metadata_server.R:689, mod_edit_otu_server.R:763, mod_edit_taxonomy_server.R:800
save_label textInput mod_dataedition_main_ui.R:156 mod_dataedition_main_server.R:276, mod_dataedition_main_server.R:300
save_to_registry actionButton mod_dataedition_main_ui.R:165 mod_dataedition_main_server.R:294
selected_dataset server-only / dynamic mod_dataedition_main_server.R:218, mod_dataedition_main_server.R:232
sort_by_asv checkboxInput mod_edit_otu_ui.R:252 mod_edit_otu_server.R:474, mod_edit_otu_server.R:514, mod_edit_taxonomy_server.R:515, mod_edit_taxonomy_server.R:552
tables_to_remove server-only / dynamic mod_dataedition_input_tables_server.R:619
tax_csv_row_names server-only / dynamic mod_edit_taxonomy_server.R:825
tax_csv_sep selectInput mod_edit_taxonomy_ui.R:266 mod_edit_taxonomy_server.R:824, mod_edit_taxonomy_server.R:1102
tax_file fileInput mod_edit_taxonomy_ui.R:258 mod_edit_taxonomy_server.R:818
tax_table_editable_cell_edit server-only / dynamic mod_edit_taxonomy_server.R:545, mod_edit_taxonomy_server.R:548
undo_btn actionButton mod_edit_metadata_ui.R:165 mod_edit_metadata_server.R:679, mod_edit_otu_server.R:753, mod_edit_taxonomy_server.R:789

4. Shiny outputs#

Identifier Widget UI Source Server references
add_feedback rendered output mod_dataedition_input_tables_server.R:552
asv_axis_info uiOutput mod_edit_otu_ui.R:203 mod_edit_otu_server.R:863
export_meta_csv downloadButton mod_dataedition_input_tables_ui.R:215 mod_dataedition_input_tables_server.R:116
export_otu downloadButton mod_dataedition_input_tables_ui.R:219 mod_dataedition_input_tables_server.R:162
export_refseq_fasta downloadButton mod_dataedition_input_tables_ui.R:232 mod_dataedition_input_tables_server.R:243
export_tax downloadButton mod_dataedition_input_tables_ui.R:223 mod_dataedition_input_tables_server.R:202
export_tree_nwk downloadButton mod_dataedition_input_tables_ui.R:236 mod_dataedition_input_tables_server.R:272
full_history_log rendered output mod_dataedition_main_server.R:253
global_log rendered output mod_dataedition_main_server.R:263
meta_log rendered output mod_edit_metadata_server.R:871
meta_table_editable DTOutput mod_edit_metadata_ui.R:257 mod_edit_metadata_server.R:357
otu_log rendered output mod_edit_otu_server.R:870
otu_table_editable DTOutput mod_edit_otu_ui.R:261 mod_edit_otu_server.R:468
remove_feedback rendered output mod_dataedition_input_tables_server.R:782
replace_preview_ui uiOutput mod_edit_taxonomy_ui.R:249 mod_edit_taxonomy_server.R:1009
save_label_warning rendered output mod_dataedition_main_server.R:273
summary_log rendered output mod_dataedition_main_server.R:243
tax_log rendered output mod_edit_taxonomy_server.R:1107
tax_table_editable DTOutput mod_edit_taxonomy_ui.R:310 mod_edit_taxonomy_server.R:512
ui_remove_tables uiOutput mod_dataedition_input_tables_ui.R:247 mod_dataedition_input_tables_server.R:593

5. Validation and integrity guard#

Control Function Effect
Active synchronization bcr_bind_active_picker() Links the Data Edition picker to the global active dataset.
Immediate application apply_*() functions Rewrites the phyloseq component and datasets() on every action.
Audit trail add_edit_log() Adds a descriptive entry without a full snapshot of the previous object.
Numeric OTU matrix/numeric conversion Non-convertible values become NA and generate a warning.
RefSeq / tree post-OTU realignment Reorders or drops the component when it no longer covers all taxa.
Full import fileInput handlers Replaces the selected slot as soon as a file is chosen, without a general preview.
Registry save save_to_registry Copies or overwrites a registry entry; it does not persist the project to disk.

6. Internal functions#

6.1. General#

Identifier Source Line Role
mod_dataedition_main_server() modules/dataedition/mod_dataedition_main_server.R 3 Internal helper in the General layer.
tr() modules/dataedition/mod_dataedition_main_server.R 13 Internal helper in the General layer.
make_code_chip_list() modules/dataedition/mod_dataedition_main_server.R 57 Internal helper in the General layer.
log_append() modules/dataedition/mod_dataedition_main_server.R 163 Internal helper in the General layer.
mod_edit_metadata_server() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 1 Internal helper in the General layer.
tr() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 9 Internal helper in the General layer.
make_issue_list() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 56 Internal helper in the General layer.
make_code_chip_list() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 62 Internal helper in the General layer.
detect_meta_empty_issues() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 126 Internal helper in the General layer.
is_numeric_like() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 152 Internal helper in the General layer.
apply_meta() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 160 Internal helper in the General layer.
detect_delimiter() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 702 Internal helper in the General layer.
strip_quoted() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 714 Internal helper in the General layer.
mode_value() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 719 Internal helper in the General layer.
score_one() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 724 Internal helper in the General layer.
sep_label() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 758 Internal helper in the General layer.
mod_edit_otu_server() modules/dataedition/edit_otu/mod_edit_otu_server.R 1 Internal helper in the General layer.
tr() modules/dataedition/edit_otu/mod_edit_otu_server.R 8 Internal helper in the General layer.
make_issue_list() modules/dataedition/edit_otu/mod_edit_otu_server.R 56 Internal helper in the General layer.
make_code_chip_list() modules/dataedition/edit_otu/mod_edit_otu_server.R 62 Internal helper in the General layer.
get_refseq_aligned() modules/dataedition/edit_otu/mod_edit_otu_server.R 84 Internal helper in the General layer.
detect_delimiter() modules/dataedition/edit_otu/mod_edit_otu_server.R 151 Internal helper in the General layer.
strip_quoted() modules/dataedition/edit_otu/mod_edit_otu_server.R 161 Internal helper in the General layer.
mode_value() modules/dataedition/edit_otu/mod_edit_otu_server.R 166 Internal helper in the General layer.
score_one() modules/dataedition/edit_otu/mod_edit_otu_server.R 171 Internal helper in the General layer.
sep_label() modules/dataedition/edit_otu/mod_edit_otu_server.R 191 Internal helper in the General layer.
detect_otu_issues() modules/dataedition/edit_otu/mod_edit_otu_server.R 198 Internal helper in the General layer.
align_refseq_to_taxa() modules/dataedition/edit_otu/mod_edit_otu_server.R 290 Internal helper in the General layer.
align_tree_to_taxa() modules/dataedition/edit_otu/mod_edit_otu_server.R 319 Internal helper in the General layer.
apply_otu() modules/dataedition/edit_otu/mod_edit_otu_server.R 350 Internal helper in the General layer.
asv_order_natural() modules/dataedition/edit_otu/mod_edit_otu_server.R 460 Internal helper in the General layer.
mod_edit_taxonomy_server() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 3 Internal helper in the General layer.
tr() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 11 Internal helper in the General layer.
make_issue_list() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 61 Internal helper in the General layer.
make_code_chip_list() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 67 Internal helper in the General layer.
make_report_table() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 88 Internal helper in the General layer.
detect_tax_issues() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 162 Internal helper in the General layer.
ensure_tax_edit_confirmed() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 176 Internal helper in the General layer.
rename_rows() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 393 Internal helper in the General layer.
apply_tax() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 451 Internal helper in the General layer.
extract_asv_num() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 497 Internal helper in the General layer.
order_asv_natural() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 502 Internal helper in the General layer.
mod_dataedition_input_tables_server() modules/dataedition/input_tables/mod_dataedition_input_tables_server.R 3 Internal helper in the General layer.
tr() modules/dataedition/input_tables/mod_dataedition_input_tables_server.R 10 Internal helper in the General layer.
tr_tokens() modules/dataedition/input_tables/mod_dataedition_input_tables_server.R 15 Internal helper in the General layer.
make_code_chip_list() modules/dataedition/input_tables/mod_dataedition_input_tables_server.R 67 Internal helper in the General layer.
detect.sep() modules/dataedition/input_tables/mod_dataedition_input_tables_server.R 100 Internal helper in the General layer.
do_import() modules/dataedition/input_tables/mod_dataedition_input_tables_server.R 305 Internal helper in the General layer.
bcr_bind_active_picker() modules/_shared/_active_dataset_sync.R 30 Internal helper in the General layer.
bcr_follow_active_picker() modules/_shared/_active_dataset_sync.R 51 Internal helper in the General layer.
bcr_make_unique_label() modules/_shared/_dataset_naming.R 35 Internal helper in the General layer.

6.2. UI / rendering#

Identifier Source Line Role
build_modal_shell() modules/dataedition/mod_dataedition_main_server.R 28 Internal helper in the UI / rendering layer.
make_modal_info_box() modules/dataedition/mod_dataedition_main_server.R 50 Internal helper in the UI / rendering layer.
build_log_line() modules/dataedition/mod_dataedition_main_server.R 68 Internal helper in the UI / rendering layer.
build_full_history_html() modules/dataedition/mod_dataedition_main_server.R 111 Internal helper in the UI / rendering layer.
build_summary_html() modules/dataedition/mod_dataedition_main_server.R 122 Internal helper in the UI / rendering layer.
build_modal_shell() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 24 Internal helper in the UI / rendering layer.
make_modal_info_box() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 74 Internal helper in the UI / rendering layer.
build_modal_shell() modules/dataedition/edit_otu/mod_edit_otu_server.R 24 Internal helper in the UI / rendering layer.
make_modal_info_box() modules/dataedition/edit_otu/mod_edit_otu_server.R 74 Internal helper in the UI / rendering layer.
build_modal_shell() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 29 Internal helper in the UI / rendering layer.
make_modal_info_box() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 79 Internal helper in the UI / rendering layer.
compute_replace_preview() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 215 Internal helper in the UI / rendering layer.
build_replace_modal_body() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 293 Internal helper in the UI / rendering layer.
build_modal_shell() modules/dataedition/input_tables/mod_dataedition_input_tables_server.R 35 Internal helper in the UI / rendering layer.
make_modal_info_box() modules/dataedition/input_tables/mod_dataedition_input_tables_server.R 75 Internal helper in the UI / rendering layer.

6.3. Validation / formatting#

Identifier Source Line Role
fmt_dim() modules/dataedition/mod_dataedition_main_server.R 75 Internal helper in the Validation / formatting layer.
sanitize_metadata() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 83 Internal helper in the Validation / formatting layer.
check_colname_compatibility() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 247 Internal helper in the Validation / formatting layer.
make_safe_name() modules/dataedition/edit_metadata/mod_edit_metadata_server.R 271 Internal helper in the Validation / formatting layer.
check_colname_compatibility() modules/dataedition/edit_otu/mod_edit_otu_server.R 107 Internal helper in the Validation / formatting layer.
make_safe_name() modules/dataedition/edit_otu/mod_edit_otu_server.R 128 Internal helper in the Validation / formatting layer.
sanitize_metadata() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 108 Internal helper in the Validation / formatting layer.
check_colname_compatibility() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 119 Internal helper in the Validation / formatting layer.
make_safe_name() modules/dataedition/edit_taxonomy/mod_edit_taxonomy_server.R 140 Internal helper in the Validation / formatting layer.
log_safe() modules/dataedition/input_tables/mod_dataedition_input_tables_server.R 83 Internal helper in the Validation / formatting layer.
bcr_clean_label() modules/_shared/_dataset_naming.R 25 Internal helper in the Validation / formatting layer.