LieberInstitute / spatialLIBD

Code for the spatialLIBD R/Bioconductor package and shiny app
http://LieberInstitute.github.io/spatialLIBD/
78 stars 16 forks source link

[BUG] Errors are shown when you select a gene for which there are no modeling results #41

Closed lcolladotor closed 2 years ago

lcolladotor commented 2 years ago

Using https://github.com/LieberInstitute/spatialDLPFC/blob/6c572d57533ae4830ccb7364be91d4838f9d77cd/code/deploy_app_k16/app.R#L71 the app shows weird errors when selecting a gene for which there are no modeling results for the particular model type and test selected.

Screen Shot 2022-07-15 at 2 30 01 PM

We are encountering this issue on an app that for k = 16 clusters, meaning that there choose(k, 2) * 2 is equal to 72. That's a lot of combinations and genes, so we are using sig_genes_extract_all(n = 4000), and thus that's why not all genes are present. I had not anticipated this use case.

First reported by @abspangler13.