B
BarCodeR documentationEmbedded documentation — works offline
/

Description — 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/description/mod_description_ui.R
Metrics, plots, tables and comparison logic modules/description/mod_description_server.R
Global active-dataset synchronization modules/_shared/_active_dataset_sync.R
Persistent UI state modules/_shared/_ui_state.R
Application integration app.R
Documentation source documentation-src/en/description/
Generated documentation www/documentation/en/description/

2. Architecture and main data flows#

datasets() + active_ds()
  → selected_dataset_single
  → phyloseq extraction and temporary OTU orientation
  → sample / ASV / sequence / completeness metrics
  → Plotly and DT outputs
  → optional vegan::rarefy() computation
all in-memory datasets
  → compute_dataset_stats()
  → selected comparison subset
  → normalized heatmap / dotplot / baseline delta
  → filtration-log comparison

2.1. Reactive state and memory#

Identifier Role
selected_dataset_single Inspected dataset synchronized with active_ds().
sample_group_var sample_data column used as a descriptive grouping variable.
rarefaction_result Stored result of the latest vegan::rarefy() computation.
selected_sample_id Sample shown in the detail card.
selected_datasets_compare Datasets included in Project comparison plots.
project_baseline_dataset Reference used for relative differences.

2.2. Traceability chains#

selected dataset
  → active_ds() synchronization
  → compute_dataset_stats() + sample/asv metrics
  → diagnostic cards and interactive plots
  → tables / CSV exports
Calculate curves
  → positive-count and ≥50-read checks
  → vegan::rarefy() on up to ~80 depths
  → cached rarefaction_result
  → individual or pooled-group rendering

3. Shiny inputs#

Identifier Widget UI Source Server references
download_logs_table downloadButton mod_description_ui.R:932
download_meta_table downloadButton mod_description_ui.R:917
download_otu_table downloadButton mod_description_ui.R:899
download_tax_table downloadButton mod_description_ui.R:908
jump_to_logs actionButton mod_description_ui.R:692 mod_description_server.R:1084
project_baseline_dataset selectInput mod_description_ui.R:983 mod_description_server.R:1016, mod_description_server.R:1020, mod_description_server.R:2597
project_focus_metric selectInput mod_description_ui.R:987 mod_description_server.R:1079, mod_description_server.R:2522, mod_description_server.R:2599
rarefaction_curve_mode selectInput mod_description_ui.R:817 mod_description_server.R:1063, mod_description_server.R:1820
rarefaction_display_mode selectInput mod_description_ui.R:824 mod_description_server.R:1071, mod_description_server.R:1757
rarefaction_max_samples numericInput mod_description_ui.R:825 mod_description_server.R:1758
rarefaction_show_legend checkboxInput mod_description_ui.R:818 mod_description_server.R:1821
run_rarefaction actionButton mod_description_ui.R:816 mod_description_server.R:1683
sample_group_var server-only / dynamic mod_description_server.R:922, mod_description_server.R:1039, mod_description_server.R:1734, mod_description_server.R:1932, mod_description_server.R:2130
selected_dataset_single server-only / dynamic mod_description_server.R:796
selected_datasets_compare server-only / dynamic mod_description_server.R:807, mod_description_server.R:1009, mod_description_server.R:1013

4. Shiny outputs#

Identifier Widget UI Source Server references
clicked_sample_card uiOutput mod_description_ui.R:756 mod_description_server.R:1324
dataset_diagnostic_grid uiOutput mod_description_ui.R:733 mod_description_server.R:1222
dataset_header uiOutput mod_description_ui.R:697 mod_description_server.R:1104
dataset_hero_metrics uiOutput mod_description_ui.R:698 mod_description_server.R:1138
dataset_key_message uiOutput mod_description_ui.R:699 mod_description_server.R:1151
dataset_quick_cards uiOutput mod_description_ui.R:731 mod_description_server.R:1161
download_logs_table downloadButton mod_description_ui.R:932 mod_description_server.R:2441
download_meta_table downloadButton mod_description_ui.R:917 mod_description_server.R:2433
download_otu_table downloadButton mod_description_ui.R:899 mod_description_server.R:2417
download_tax_table downloadButton mod_description_ui.R:908 mod_description_server.R:2425
log_removed_samples DTOutput mod_description_server.R:2382 mod_description_server.R:2401
log_removed_taxa DTOutput mod_description_server.R:2376 mod_description_server.R:2389
log_table uiOutput mod_description_ui.R:934 mod_description_server.R:2354
meta_missingness_table DTOutput mod_description_ui.R:926 mod_description_server.R:2345
meta_table DTOutput mod_description_ui.R:919 mod_description_server.R:2328
meta_table_overview uiOutput mod_description_ui.R:915 mod_description_server.R:2299
openmetabar_provenance uiOutput mod_description_ui.R:715 mod_description_server.R:823
otu_table DTOutput mod_description_ui.R:901 mod_description_server.R:2312
otu_table_overview uiOutput mod_description_ui.R:897 mod_description_server.R:2272
outlier_group_cards uiOutput mod_description_ui.R:854 mod_description_server.R:2125
outlier_signal_cards uiOutput mod_description_ui.R:849 mod_description_server.R:2038
outlier_spotlight_card uiOutput mod_description_ui.R:850 mod_description_server.R:2078
outlier_story_card uiOutput mod_description_ui.R:844 mod_description_server.R:1924
outlier_summary_cards uiOutput mod_description_ui.R:846 mod_description_server.R:2019
project_baseline_delta rendered output mod_description_server.R:2594
project_filtration_plot rendered output mod_description_server.R:2626
project_metric_dotplot rendered output mod_description_server.R:2573
project_metric_heatmap rendered output mod_description_server.R:2546
project_overview_cards uiOutput mod_description_ui.R:954 mod_description_server.R:2507
project_plot_memory rendered output mod_description_server.R:2666
project_plot_reads rendered output mod_description_server.R:2658
project_plot_richness rendered output mod_description_server.R:2662
project_plot_samples rendered output mod_description_server.R:2650
project_plot_taxa rendered output mod_description_server.R:2654
project_story_card uiOutput mod_description_ui.R:956 mod_description_server.R:2519
project_summary_table DTOutput mod_description_ui.R:958 mod_description_server.R:2538
rarefaction_plot rendered output mod_description_server.R:1816
sample_metric_table DTOutput mod_description_ui.R:870 mod_description_server.R:2216
sample_outlier_table DTOutput mod_description_ui.R:861 mod_description_server.R:2185
selected_cum_asvs_plot rendered output mod_description_server.R:1496
selected_cum_reads_plot rendered output mod_description_server.R:1469
selected_evenness_proxy_plot rendered output mod_description_server.R:1605
selected_gc_hist rendered output mod_description_server.R:1644
selected_reads_cumulative_group_plot rendered output mod_description_server.R:1553
selected_reads_group_plot rendered output mod_description_server.R:1549
selected_reads_hist rendered output mod_description_server.R:1523
selected_reads_richness_scatter rendered output mod_description_server.R:1372
selected_richness_group_plot rendered output mod_description_server.R:1601
selected_richness_hist rendered output mod_description_server.R:1586
selected_seq_len_hist rendered output mod_description_server.R:1629
selected_seq_scatter rendered output mod_description_server.R:1659
selected_top_asvs_bar rendered output mod_description_server.R:1443
selected_top_samples_bar rendered output mod_description_server.R:1411
tables_overview uiOutput mod_description_ui.R:886 mod_description_server.R:2255
tax_missingness_table DTOutput mod_description_ui.R:925 mod_description_server.R:2336
tax_table DTOutput mod_description_ui.R:910 mod_description_server.R:2320
tax_table_overview uiOutput mod_description_ui.R:906 mod_description_server.R:2286

5. Validation and integrity guard#

Control Function Effect
OTU orientation get_otu_taxa_rows() Transposes only the calculation matrix; the phyloseq object is unchanged.
Grouping get_group_var_choices() Keeps non-temporal variables with 2 to 15 non-missing levels.
Outliers iqr_outlier_flag() / iqr_distance_score() Global 1.5-IQR detection on reads, richness and dominance.
Rarefaction vegan::rarefy() Requires compatible counts and excludes samples below 50 reads.
Tables get_table_*_df() Adds ASV/SampleID and secures names only for display/export.
Project view compute_dataset_stats() Sums dimensions across datasets without deduplication.

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
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
mod_description_server() modules/description/mod_description_server.R 3 Internal helper in the General layer.
tr() modules/description/mod_description_server.R 24 Internal helper in the General layer.
tr_tokens() modules/description/mod_description_server.R 34 Internal helper in the General layer.
tr_signal() modules/description/mod_description_server.R 36 Internal helper in the General layer.
first_non_na() modules/description/mod_description_server.R 65 Internal helper in the General layer.
stat_or_na() modules/description/mod_description_server.R 72 Internal helper in the General layer.
iqr_outlier_flag() modules/description/mod_description_server.R 86 Applies Tukey's 1.5-IQR rule to flag atypical values.
iqr_distance_score() modules/description/mod_description_server.R 98 Internal helper in the General layer.
scale_01() modules/description/mod_description_server.R 125 Internal helper in the General layer.
alert_item() modules/description/mod_description_server.R 205 Internal helper in the General layer.
desc_plot() modules/description/mod_description_server.R 300 Internal helper in the General layer.
empty_plot() modules/description/mod_description_server.R 359 Internal helper in the General layer.
dt_opts() modules/description/mod_description_server.R 388 Internal helper in the General layer.
datatable_modern() modules/description/mod_description_server.R 401 Internal helper in the General layer.
get_otu_taxa_rows() modules/description/mod_description_server.R 413 Extracts the OTU table and temporarily orients taxa as rows.
get_sample_metadata() modules/description/mod_description_server.R 423 Internal helper in the General layer.
get_seq_df() modules/description/mod_description_server.R 449 Extracts reference-sequence lengths and GC composition.
get_asv_metrics() modules/description/mod_description_server.R 471 Internal helper in the General layer.
get_sample_metrics() modules/description/mod_description_server.R 494 Computes reads, observed richness, dominance and zero proportion per sample.
get_group_var_choices() modules/description/mod_description_server.R 530 Internal helper in the General layer.
get_grouped_sample_df() modules/description/mod_description_server.R 542 Internal helper in the General layer.
get_table_otu_df() modules/description/mod_description_server.R 555 Internal helper in the General layer.
get_table_tax_df() modules/description/mod_description_server.R 561 Internal helper in the General layer.
get_table_meta_df() modules/description/mod_description_server.R 569 Internal helper in the General layer.
get_log_export_df() modules/description/mod_description_server.R 573 Internal helper in the General layer.
get_tax_missingness_df() modules/description/mod_description_server.R 607 Internal helper in the General layer.
get_meta_missingness_df() modules/description/mod_description_server.R 633 Internal helper in the General layer.
kv_block() modules/description/mod_description_server.R 835 Internal helper in the General layer.
refresh_group_var_picker() modules/description/mod_description_server.R 1036 Internal helper in the General layer.
group_violin_plot() modules/description/mod_description_server.R 1538 Internal helper in the General layer.
bar_compare_plot() modules/description/mod_description_server.R 2641 Internal helper in the General layer.
bcr_bind_active_picker() modules/_shared/_active_dataset_sync.R 30 Synchronizes the Description picker with the global active dataset.
bcr_follow_active_picker() modules/_shared/_active_dataset_sync.R 51 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_outlier_reason() modules/description/mod_description_server.R 113 Internal helper in the UI / rendering layer.
build_group_palette() modules/description/mod_description_server.R 141 Internal helper in the UI / rendering layer.
status_pill() modules/description/mod_description_server.R 149 Internal helper in the UI / rendering layer.
metric_card() modules/description/mod_description_server.R 155 Internal helper in the UI / rendering layer.
mini_card() modules/description/mod_description_server.R 164 Internal helper in the UI / rendering layer.
outlier_stat_card() modules/description/mod_description_server.R 173 Internal helper in the UI / rendering layer.
quick_card() modules/description/mod_description_server.R 189 Internal helper in the UI / rendering layer.
panel_card() modules/description/mod_description_server.R 197 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_number() modules/description/mod_description_server.R 50 Internal helper in the Validation / formatting layer.
fmt_pct() modules/description/mod_description_server.R 60 Internal helper in the Validation / formatting layer.
sanitize_display_names() modules/description/mod_description_server.R 132 Internal helper in the Validation / formatting layer.
normalize_plot_title() modules/description/mod_description_server.R 219 Internal helper in the Validation / formatting layer.
normalize_plot_axis() modules/description/mod_description_server.R 254 Internal helper in the Validation / formatting layer.
normalize_plot_legend() modules/description/mod_description_server.R 283 Internal helper in the Validation / formatting layer.
fmt_val() modules/description/mod_description_server.R 830 Internal helper in the Validation / formatting layer.

6.6. Phyloseq / datasets#

Identifier Source Line Role
compute_dataset_stats() modules/description/mod_description_server.R 657 Aggregates dimensions, sparsity, completeness and global dataset metrics.
build_dataset_story() modules/description/mod_description_server.R 744 Internal helper in the Phyloseq / datasets layer.