Repository navigation
Shrink demo data for Bioconductor + fix protein-name resolution + fix cross-model drug selection - #39
Merged
Merged
Conversation
amcim
approved these changes
Jul 8, 2026
amcim
left a comment
Contributor
There was a problem hiding this comment.
Looks good. Three things to note:
- I got a note from R CMD CHECK
❯ checking R code for possible problems ... NOTE
makeCrossModelPerformancePlot: no visible binding for global variable
‘.env’
Undefined global functions or variables:
.env
I added this to the global variables. The note is basically because .env looks undefined when you are telling filter to use the argument and not the column name.
- If its true that
Shigella_sonnei/cluster_feature.parquet, then eventually we can put this in adata-rawfolder in the root. Once features and data stop being added, that will be the time to make these decisions - I confirmed that the created tarball is <10 MB (8.1). So things look good on this front and the issue is solved so long as no more is added.
Approved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bundled
inst/extdataparquets have more data than the dashboard can display, pushing several files over Bioconductor's size expectations. This PR trims them, adds reproducible regeneration scripts, and fixes two rendering bugs. Totalinst/extdata: 55 MB → 7.3 MB.1. Top-features subset :
inst/scripts/subset_demo_top_features.RRegenerates every
{all,country,year}_top_features.parquet:shuffled == TRUErows (permutation-null baseline; read by no code path. I confirmed with @AbhirupaGhosh that these aren't a dashboard input).filename/seed_from_namecolumns from the stratified files.Name-map subset :
inst/scripts/subset_demo_name_maps.RTrims whole-proteome/-genome name maps to only the IDs a top-features
Variablecan reference (run after script 1). sonneiprotein_names.parquet:10.5 MB (9.56M rows) → 0.10 MB (6,135 rows).
Fix: protein names never resolved:
R/utils_annotation.Rprotein_names.parquetkeys usefig|624...while the top-featuresVariableusesfig.624..., andload_feature_name_map()didn't normalize the|, so the Feature Importance protein lookup matched 0 rows. Now normalizes|→.(as the annotated-join path already does), so protein features get labels.Fix: cross-model performance ignored the selected drug :
R/plots_crossmodel.R,makeCrossModelPerformancePlot()filtered with a baredrug, but the performance data has a column literally nameddrug. Result: the plot ignored the drug selection entirely and rendered the same drug-agnostic matrix for every drug (identical output for AMP / CIP / TET, and even for a nonsense value). For flexneri the broken filter matched 0 rows, so the panel was blank.Fixes:
drug→.env$drugso the selected drug is used.if_else(which throws whenstrat_value_testis an all-NA logical column, e.g. flexneri) with a type-robustcoalesce, otherwise fixing the filter would surface a crash instead of a blank.makeCrossModelRidgePlot().test-plots.Rcases that used the oldNULLreturn to expect a plotly placeholder.Not touched (kept intentionally)
sonnei/cluster_feature.parquetis currently unreferenced by the dashboard, but may be the raw source for regenerating sonnei's COG annotation file?sonnei/MDR_*is not currently being used, however these files were kept because MDR plots will be a future dashboard feature.Verification