B
BarCodeR documentationEmbedded documentation — works offline
/

Filtration — 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 filtering interface modules/filtration/mod_filtration_ui.R
Reactive filtering server modules/filtration/mod_filtration_server.R
Registry, inspection and export UI modules/filtration/io/mod_filtration_io_ui.R
Registry, inspection and export server modules/filtration/io/mod_filtration_io_server.R
Provenance carry-over modules/_shared/_provenance.R
Dataset naming modules/_shared/_dataset_naming.R
Phyloseq integrity guard modules/_shared/_ps_guard.R
Active-dataset synchronization modules/_shared/_active_dataset_sync.R
Application integration app.R
Documentation source documentation-src/en/filtration/
Generated documentation www/documentation/en/filtration/

2. Architecture and main data flows#

datasets() + active_ds()
  → selected_ds_filtration
  → reactive block parameters
  → ps_filtered()
      taxonomy
      → abundance
      → samples
      → sequences
  → filtration_log
  → temporary result
temporary filtered phyloseq
  → save name normalization
  → optional overwrite confirmation
  → bcr_guard_ps()
  → add_dataset() / datasets()
  → active_ds()
  → explicit project save in Datasets

2.1. Reactive state and memory#

Identifier Role
selected_ds_filtration Parent dataset synchronized with active_ds().
ps_filtered() Temporary phyloseq automatically recalculated for every active parameter.
advanced_conditions Reactive list of metadata conditions combined with AND.
filtration_log Result attribute storing dimensions, text, parameters and removed items.
pending_overwrite_name Cleaned name waiting for overwrite confirmation.
datasets() / active_ds() Global registry updated only when the result is saved.

2.2. Validation and integrity guard#

Layer Function Effect
Fixed order ps_filtered() Applies taxonomy → abundance → samples → sequences in one pass.
Taxon safeguard safe_prune_taxa() Rejects a step that would remove every taxon.
Sample safeguard safe_prune_samples() Rejects a step that would remove every sample.
Sequences get_refseq_aligned() Aligns RefSeq and retains uncovered ASVs without testing under partial coverage.
Traceability filtration_log$params Stores structured parameters independently from localized text.
Saving io submodule Adds or overwrites datasets(); an empty name replaces the parent.
Integrity bcr_guard_ps() Checks OTU, sample and taxonomy consistency before registry insertion.

3. Shiny inputs#

Identifier Widget UI Source Server references
ab_min_rel_abund numericInput mod_filtration_ui.R:170 mod_filtration_server.R:257, mod_filtration_server.R:483, mod_filtration_server.R:1027, mod_filtration_server.R:1437, mod_filtration_server.R:2071
ab_min_samples numericInput mod_filtration_ui.R:159 mod_filtration_server.R:256, mod_filtration_server.R:482, mod_filtration_server.R:1006, mod_filtration_server.R:1436, mod_filtration_server.R:2070
ab_min_total_reads numericInput mod_filtration_ui.R:148 mod_filtration_server.R:255, mod_filtration_server.R:481, mod_filtration_server.R:985, mod_filtration_server.R:1435, mod_filtration_server.R:2069
add_meta_filter actionButton mod_filtration_ui.R:260 mod_filtration_server.R:800
confirm_overwrite actionButton mod_filtration_io_server.R:234 mod_filtration_io_server.R:273
enable_abund checkboxInput mod_filtration_ui.R:137 mod_filtration_server.R:253, mod_filtration_server.R:386, mod_filtration_server.R:479, mod_filtration_server.R:1431, mod_filtration_server.R:2068
enable_samples checkboxInput mod_filtration_ui.R:198 mod_filtration_server.R:263, mod_filtration_server.R:389, mod_filtration_server.R:491, mod_filtration_server.R:1173, mod_filtration_server.R:1503, mod_filtration_server.R:2074
enable_seq checkboxInput mod_filtration_ui.R:282 mod_filtration_server.R:358, mod_filtration_server.R:392, mod_filtration_server.R:512, mod_filtration_server.R:1741, mod_filtration_server.R:2082
enable_tax checkboxInput mod_filtration_ui.R:65 mod_filtration_server.R:243, mod_filtration_server.R:383, mod_filtration_server.R:468, mod_filtration_server.R:1359, mod_filtration_server.R:2061
export_biom downloadButton mod_filtration_io_server.R:460
export_meta downloadButton mod_filtration_io_server.R:459
export_otu downloadButton mod_filtration_io_server.R:457
export_tax downloadButton mod_filtration_io_server.R:458
project_table_rows_selected server-only / dynamic mod_filtration_io_server.R:428, mod_filtration_io_server.R:470
samp_meta_num_comp selectInput mod_filtration_server.R:748 mod_filtration_server.R:289, mod_filtration_server.R:734, mod_filtration_server.R:1189, mod_filtration_server.R:1602, mod_filtration_server.R:2008
samp_meta_op selectInput mod_filtration_server.R:742 mod_filtration_server.R:288, mod_filtration_server.R:298, mod_filtration_server.R:746, mod_filtration_server.R:777, mod_filtration_server.R:1186, mod_filtration_server.R:1599, mod_filtration_server.R:2007, mod_filtration_server.R:2016
samp_meta_val numericInput mod_filtration_server.R:754 mod_filtration_server.R:290, mod_filtration_server.R:299, mod_filtration_server.R:300, mod_filtration_server.R:735, mod_filtration_server.R:1190, mod_filtration_server.R:1201, mod_filtration_server.R:1603, mod_filtration_server.R:1625…
samp_meta_val2 numericInput mod_filtration_server.R:759 mod_filtration_server.R:291, mod_filtration_server.R:736, mod_filtration_server.R:1191, mod_filtration_server.R:1604, mod_filtration_server.R:2010
samp_meta_var selectInput mod_filtration_ui.R:243 mod_filtration_server.R:278, mod_filtration_server.R:498, mod_filtration_server.R:716, mod_filtration_server.R:1076, mod_filtration_server.R:1175, mod_filtration_server.R:1555, mod_filtration_server.R:1996, mod_filtration_server.R:1997
samp_min_reads numericInput mod_filtration_ui.R:209 mod_filtration_server.R:268, mod_filtration_server.R:494, mod_filtration_server.R:1048, mod_filtration_server.R:1509, mod_filtration_server.R:2075
samp_min_richness numericInput mod_filtration_ui.R:218 mod_filtration_server.R:268, mod_filtration_server.R:495, mod_filtration_server.R:1068, mod_filtration_server.R:1510, mod_filtration_server.R:2076
samp_name_op selectInput mod_filtration_ui.R:231 mod_filtration_server.R:695, mod_filtration_server.R:1558, mod_filtration_server.R:1990
samp_name_values server-only / dynamic mod_filtration_server.R:230
save_filtered actionButton mod_filtration_io_ui.R:29 mod_filtration_io_server.R:144
save_label textInput mod_filtration_io_ui.R:16 mod_filtration_io_server.R:153, mod_filtration_io_server.R:317
selected_ds_filtration selectInput mod_filtration_ui.R:36 mod_filtration_server.R:203
seq_gc_max numericInput mod_filtration_ui.R:312 mod_filtration_server.R:363, mod_filtration_server.R:517, mod_filtration_server.R:1157, mod_filtration_server.R:1758, mod_filtration_server.R:2086
seq_gc_min numericInput mod_filtration_ui.R:307 mod_filtration_server.R:362, mod_filtration_server.R:516, mod_filtration_server.R:1156, mod_filtration_server.R:1757, mod_filtration_server.R:2085
seq_len_max numericInput mod_filtration_ui.R:298 mod_filtration_server.R:361, mod_filtration_server.R:515, mod_filtration_server.R:1129, mod_filtration_server.R:1756, mod_filtration_server.R:2084
seq_len_min numericInput mod_filtration_ui.R:293 mod_filtration_server.R:360, mod_filtration_server.R:514, mod_filtration_server.R:1128, mod_filtration_server.R:1755, mod_filtration_server.R:2083
seq_max_ambig numericInput mod_filtration_ui.R:321 mod_filtration_server.R:364, mod_filtration_server.R:518, mod_filtration_server.R:1759, mod_filtration_server.R:2087
seq_max_homopolymer numericInput mod_filtration_ui.R:326 mod_filtration_server.R:365, mod_filtration_server.R:519, mod_filtration_server.R:1760, mod_filtration_server.R:2088
tax_exclude_keywords server-only / dynamic mod_filtration_server.R:247, mod_filtration_server.R:467, mod_filtration_server.R:1405, mod_filtration_server.R:2065
tax_exclude_values server-only / dynamic mod_filtration_server.R:245, mod_filtration_server.R:465, mod_filtration_server.R:1366, mod_filtration_server.R:2063
tax_keep_values server-only / dynamic mod_filtration_server.R:246, mod_filtration_server.R:466, mod_filtration_server.R:1386, mod_filtration_server.R:2064
tax_rank selectInput mod_filtration_ui.R:80 mod_filtration_server.R:647, mod_filtration_server.R:650, mod_filtration_server.R:1363, mod_filtration_server.R:2062

4. Shiny outputs#

Identifier Widget UI Source Server references
dataset_details uiOutput mod_filtration_io_ui.R:53 mod_filtration_io_server.R:423
export_biom downloadButton mod_filtration_io_server.R:460 mod_filtration_io_server.R:625
export_meta downloadButton mod_filtration_io_server.R:459 mod_filtration_io_server.R:616
export_otu downloadButton mod_filtration_io_server.R:457 mod_filtration_io_server.R:598
export_tax downloadButton mod_filtration_io_server.R:458 mod_filtration_io_server.R:607
filter_summary rendered output mod_filtration_server.R:2106
filtration_box_styles uiOutput mod_filtration_ui.R:46 mod_filtration_server.R:581
filtration_params_view DTOutput mod_filtration_io_server.R:455 mod_filtration_io_server.R:475
filtration_status_local uiOutput mod_filtration_ui.R:43 mod_filtration_server.R:417
meta_filters_ui uiOutput mod_filtration_ui.R:268 mod_filtration_server.R:809
msg_abund uiOutput mod_filtration_ui.R:143 mod_filtration_server.R:572
msg_samples uiOutput mod_filtration_ui.R:204 mod_filtration_server.R:573
msg_seq uiOutput mod_filtration_ui.R:288 mod_filtration_server.R:574
msg_tax uiOutput mod_filtration_ui.R:71 mod_filtration_server.R:571
otu_table_view DTOutput mod_filtration_io_server.R:451 mod_filtration_io_server.R:559
plot_ab_prev rendered output mod_filtration_server.R:992
plot_ab_relmax rendered output mod_filtration_server.R:1013
plot_ab_total rendered output mod_filtration_server.R:970
plot_gc rendered output mod_filtration_io_server.R:538
plot_len rendered output mod_filtration_io_server.R:549
plot_log rendered output mod_filtration_io_server.R:532
plot_reads rendered output mod_filtration_io_server.R:526
plot_samp_meta rendered output mod_filtration_server.R:1074
plot_samp_reads rendered output mod_filtration_server.R:1034
plot_samp_rich rendered output mod_filtration_server.R:1054
plot_seq_gc rendered output mod_filtration_server.R:1136
plot_seq_len rendered output mod_filtration_server.R:1111
project_table DTOutput mod_filtration_io_ui.R:43 mod_filtration_io_server.R:346
removed_samples_table DTOutput mod_filtration_io_server.R:455 mod_filtration_io_server.R:585
removed_taxa_table DTOutput mod_filtration_io_server.R:454 mod_filtration_io_server.R:574
samp_meta_condition_ui uiOutput mod_filtration_ui.R:250 mod_filtration_server.R:714
samp_name_values_ui uiOutput mod_filtration_ui.R:238 mod_filtration_server.R:687
sample_table_view DTOutput mod_filtration_io_server.R:453 mod_filtration_io_server.R:569
save_label_warning rendered output mod_filtration_io_server.R:311
tax_table_view DTOutput mod_filtration_io_server.R:452 mod_filtration_io_server.R:564

5. Internal functions#

5.1. Configuration#

Identifier Source Line Role
bcr_provenance_snapshot() modules/_shared/_provenance.R 144 Internal helper in the Configuration layer.

5.2. General#

Identifier Source Line Role
mod_filtration_server() modules/filtration/mod_filtration_server.R 4 Reactively builds the filtered phyloseq by applying the four blocks in a fixed order.
tr() modules/filtration/mod_filtration_server.R 17 Internal helper in the General layer.
num_or() modules/filtration/mod_filtration_server.R 27 Parses locale-aware numeric input and falls back to a neutral value when invalid.
int_or() modules/filtration/mod_filtration_server.R 80 Normalizes and rounds integer read or prevalence thresholds.
otu_to_mat() modules/filtration/mod_filtration_server.R 96 Extracts the OTU table as a usable matrix without changing the source object.
taxa_sums() modules/filtration/mod_filtration_server.R 100 Computes total abundance per taxon in the current orientation.
sample_sums() modules/filtration/mod_filtration_server.R 104 Computes sequencing depth per sample in the current orientation.
taxa_prev() modules/filtration/mod_filtration_server.R 108 Counts samples in which each taxon is strictly present.
sample_rich() modules/filtration/mod_filtration_server.R 112 Counts strictly present taxa in each sample.
max_rel_abund() modules/filtration/mod_filtration_server.R 116 Computes each taxon’s maximum relative abundance across samples.
keep_numeric() modules/filtration/mod_filtration_server.R 139 Builds metadata masks for numeric comparisons.
get_refseq_aligned() modules/filtration/mod_filtration_server.R 161 Aligns reference sequences with taxa_names() and reports partial coverage.
border_col() modules/filtration/mod_filtration_server.R 587 Internal helper in the General layer.
add_vline() modules/filtration/mod_filtration_server.R 946 Internal helper in the General layer.
add_log() modules/filtration/mod_filtration_server.R 1322 Appends a localized descriptive line to the filtering log.
esc() modules/filtration/mod_filtration_server.R 2122 Internal helper in the General layer.
mod_filtration_io_server() modules/filtration/io/mod_filtration_io_server.R 3 Saves results to the registry, inspects filtered datasets and produces exports.
tr() modules/filtration/io/mod_filtration_io_server.R 9 Internal helper in the General layer.
make_code_chip_list() modules/filtration/io/mod_filtration_io_server.R 59 Internal helper in the General layer.
get_log() modules/filtration/io/mod_filtration_io_server.R 352 Internal helper in the General layer.
blocks_from_lines() modules/filtration/io/mod_filtration_io_server.R 358 Infers active blocks from text log lines, currently depending on French wording.
flatten() modules/filtration/io/mod_filtration_io_server.R 482 Internal helper in the General layer.
rec() modules/filtration/io/mod_filtration_io_server.R 484 Internal helper in the General layer.
bcr_carry_provenance() modules/_shared/_provenance.R 40 Copies explicitly supported provenance attributes after pruning.
bcr_provenance_flatten() modules/_shared/_provenance.R 53 Internal helper in the General layer.
.bcr_filtration_digest() modules/_shared/_provenance.R 74 Internal helper in the General layer.
.bcr_edition_digest() modules/_shared/_provenance.R 96 Internal helper in the General layer.
.bcr_prov_one() modules/_shared/_provenance.R 110 Internal helper in the General layer.
as_count() modules/_shared/_provenance.R 117 Internal helper in the General layer.
bcr_provenance_for() modules/_shared/_provenance.R 169 Internal helper in the General layer.
pad() modules/_shared/_provenance.R 187 Internal helper in the General layer.
ok_num() modules/_shared/_provenance.R 191 Internal helper in the General layer.
bcr_provenance_code_lines() modules/_shared/_provenance.R 279 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.
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.

5.3. UI / rendering#

Identifier Source Line Role
render_box_msg() modules/filtration/mod_filtration_server.R 535 Internal helper in the UI / rendering layer.
build_modal_shell() modules/filtration/io/mod_filtration_io_server.R 27 Internal helper in the UI / rendering layer.
make_modal_info_box() modules/filtration/io/mod_filtration_io_server.R 68 Internal helper in the UI / rendering layer.
.bcr_prov_render_one() modules/_shared/_provenance.R 186 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.

5.4. Validation / formatting#

Identifier Source Line Role
safe_prune_taxa() modules/filtration/mod_filtration_server.R 1267 Prevents a step from removing every taxon before prune_taxa().
safe_prune_samples() modules/filtration/mod_filtration_server.R 1286 Prevents a step from removing every sample before prune_samples().
fmt_line() modules/filtration/mod_filtration_server.R 2124 Internal helper in the Validation / formatting layer.
format_log_html() modules/filtration/io/mod_filtration_io_server.R 89 Turns filtration_log lines into readable HTML.
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 consistency before insertion into datasets().