Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example shiny app as a sandbox #3

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Example shiny app as a sandbox #3

wants to merge 13 commits into from

Conversation

jonocarroll
Copy link
Collaborator

This PR adds a shiny app in inst/shiny/sandbox which can load any of fdge, fpca, or ffsea as modules.

This is a barebones app with no additional features, merely a prototype for a sandbox in which modules could be loaded. This helped identify some minor issues (e.g. facilebio/FacileAnalysis#49 and something else happening with ffsea which crashes here). This also has some best-practices in terms of cleaning up destroyed modules. I've also used it to prototype the idea of keeping a running list of analyses performed - again, this is just a simple implementation.

Dataset loading is limited to FacileData:::exampleFacileDataSet().

@jonocarroll
Copy link
Collaborator Author

Since it's always easier to show than tell:

Screen.Recording.2022-05-05.at.11.11.22.am.mov

@jonocarroll
Copy link
Collaborator Author

jonocarroll commented May 5, 2022

Still TODO:

  • properly namespace and destroy the filteredReactiveFacileDataStoreUI()
  • actually store the results so they can be presented / interacted with
  • ?


observeEvent(input$add_module, {
req(module_res())
result. <- sparrow::failWith(list(), FacileAnalysis::unreact(FacileAnalysis::faro(module_res())))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lianos this may be where I'm going wrong - I seem to get the fallback list(). Not doing this step produces something that seems to error. Any guidance appreciated.

@jonocarroll
Copy link
Collaborator Author

jonocarroll commented May 11, 2022

Now with filtering as an "output" that can be fed back in as an "input"

Screen.Recording.2022-05-11.at.4.43.20.pm.mov

Still TODO:

  • properly namespace (and destroy) the filteredReactiveFacileDataStoreUI() - this may be the reason I'm getting multiple filters (some inaccessible) with the 'add' button but I'll dig further. It may be a bug in the UI, may just be my implementation
  • actually store the results so they can be presented / interacted with
  • store a provenance chain linking all outputs to their inputs, recursively
  • present a network graph of the inputs and outputs - someone may add a filter then pca vs raw with dge then fsea
  • find out why debug=TRUE is a necessary condition - filtering UI doesn't show without this
  • limit "output" to only the methods compatible with the selected "input". Somewhat chicken/egg if it should also work as selecting "inputs" which are compatible with "outputs".
  • ?

samples. <- .x
sample.filter <- FALSE
restrict_samples <- samples.
} else if (is(.x, "ReactiveFacileDataStore")) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is growing a bit too big, but I think this is the correct way to extract out the relevant parts - feel free to correct me, I'm still learning how these parts work.

@jonocarroll jonocarroll marked this pull request as draft May 11, 2022 11:59
@jonocarroll jonocarroll marked this pull request as ready for review May 12, 2022 01:58
@jonocarroll
Copy link
Collaborator Author

The doubled filters issue is now resolved and the right number of samples propagates through the filter into the result and retrieval by a later analysis. The filteredReactiveFacileDataStore server logic invoked as part of ReactiveFacileDataStore isn't being destroyed (because it's not an observer in the top scope) so invoking a second filter loads the settings from the first - this could be dealt with via a more consistent module for filtering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants