fungenomics / braindex

A web portal for exploring scRNAseq data in the developing brain, including our in-house atlas of the E10-P6 forebrain and brainstem
http://cc-shiny-01.functionalgenomics.ca/braindex/clusters/
GNU General Public License v3.0
0 stars 1 forks source link

Extract input validation into a function (currently duplicated code) #37

Closed bhavyaac closed 3 years ago

bhavyaac commented 3 years ago

The validate() function in shiny is generally used within a reactive({}) code block, and I have placed them in the blocks that involve retrieving data (in order to validate before any errors occur with using gene inputs to select feather columns). Currently, there are four locations in the app where I separately validate gene input: dendrogram & expression table tabs, timecourse tab, single cell expression tabs, ranked clusters tab. It would be ideal to remove code duplication by validating within a function or a prior step before the code for tabs. I'm not sure how a function would work since validate() must be used in a reactive context.