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

Data directory #11

Merged
merged 78 commits into from
Feb 8, 2024
Merged

Data directory #11

merged 78 commits into from
Feb 8, 2024

Conversation

russHyde
Copy link
Contributor

@russHyde russHyde commented Jun 13, 2023

This pull request allows you (the developer, or whoever deploys the app) to declare a data-directory wherein the static-plots and data used within the app are stored.
By default the data-directory will coincide with the ./inst/app/data/ directory within the package.
If the environment variable "APP_DATA_DIR" is set, the app will use this to define the data-directory for the app.
Details of how to specify this environment variable are included in the README.

Any data-directory must contain the subdirectories mutations, scanner_output, sequences, treeview and have a structure identical to that in ./inst/app/data/. (Once mrc-ide/tfpscanner#8 is merged into {tfpscanner}, this can be created using tfpscanner::create_browser_data())

Notes:

  • the data-directory is fixed at deployment (before the app runs), this isn't something that app-users have any control over
  • there are several additional changes at the start of this branch, these have been merged into the Jumping Rivers fork of this repository, but have not been merged into the mrc-ide upstream

This has now been tested with the western-cape demo dataset.

Much of the work in this PR involved ensuring the data directory was declared in a single place, and that single definition used elsewhere in the app. Previously, paths to ./inst/app/www/data were hardcoded in many places.

The update_data() function, and it's description in the README have been removed. The responsibility for setting up data directories that are of the correct structure for the app has been moved to tfpscanner.

Note that the app cannot currently work with the datasets that are stored in ./inst/app/www/data. There are .rds files in there that contain ggplot2/ggtree objects that were generated a while ago. Attempts were made to find a version of ggtree/ggplot2 and/or their dependencies that allowed these files to be imported. This was very time-consuming and was ultimately a failure. These files could be regenerated using up-to-date packages if necessary.


2024-01-22

Changes to the UI have been incorporated into this branch. Details of the changes can be found in jumpingrivers#66

Briefly, these put all selectors into a collapsible sidebar, make all selectors into dropdown-type, and make the mutation/sequence selectors invisible except for when the current treeview admits highlighting mutations or sequences.

@russHyde russHyde marked this pull request as draft June 13, 2023 10:08
@russHyde russHyde marked this pull request as ready for review July 6, 2023 09:42
@KieranODrake KieranODrake merged commit 412f8e9 into mrc-ide:main Feb 8, 2024
2 checks passed
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.

5 participants