Shiny Contest Submission: Transmission Tree of Infectious Diseases, Host and Viral populations visualisations

Shiny Contest Submission: Transmission Tree of Infectious Diseases, Host and Viral populations visualisations

Description

The main goal of this application is to visualize DNA sequencing of viral populations and host populations informations from real and simulated data in epidemical context.

The actual Shiny dashboard include these widgets (that can interact between them) :

  • a representation of the transmission tree of the epidemie,
  • a diversity indices informations on viral DNA sequences,
  • a time line of the hosts,
  • a graph of variants.

Links

Presentation

Main dashboard

To start, you have to select a data set from the left menu.
Here we put a fake data set call simul_1 .

Data will load and the Transmission Tree box will be draw.

Time is in julian day (but it can be real date)

Transmission Tree box

This widget represents an epidemic transmission tree over the time.
Hosts are identify by their ID positionned as a circle and epidemic relations as arrows.

  • You can play with time dimension using the top scroll bar and the bottom right buttons.
  • Mouse over host ID will show epidemic relations for this host in the time window.
  • Mouse click on a host ID will trigger the others widgets, to show DNA diversity indices, host timeline and graph of variants.

Diversity indices box

This box show several diversity indices of the DNA sequences of the viral populations observed on the select host (here 113).

Timeline box

This widget show informations about a host as a time line.
Informations such as infected by (red), affect (green), viral population observed (purple) and the host status (alive, dead, infectious...).

  • You can click on a circle (host ID or obsevations ID) to change the current host visualize and/or update the graph of variants.

Graph of Variants box

This widget shows Variants genotypes distances as a graph (using Minimum Spanning Tree algorithm) for a host observated at several times.

Each node is an identified variant ("a DNA sequence") with his size related to his proportion in the all variant observed set.
Each edge is a mutation in the DNA sequence.
The small nodes are not observed but they allow to display the number of mutation between two observed nodes (variants).
When there is multiple observations, each node contains the porportions observed at each times.

  • You can zoom, drab and drop the nodes, stop/start graph force, export as svg file and select date of observations (one or several).
  • Mouse over a node, shows variant identifier and related informations.

Under development

This app and related widgets are still under development.
Future versions will include more widgets such as host population over a map in time, DNA data visualisation etc.
Code improvements and browser compatibility are on the rails.

Technical details

To create this application we developed a R package, call SMITIDvisu, that implements those widgets using HTMLwidgets, Shiny bindings and Shiny Proxy. Its mainly implemented in javascript using D3JS, noUiSlider and FileSaver libraries and communicate via JSON data format.

The Shiny application load data from a directory (here simul_1) using an another R package, call SMITIDstruct. This package can read the directory files structures and what they contain and return variables that can be manipulate by the Shiny app (in a reactive mode).
After that, events from widgets are observe (observeEvent) and widgets are redraw if necessary.

Thank you for reading so far.

...

1 Like

I updated the app with a new dataset (simul2.rds) that use real Dates.

Due to a bug (my mistake), you have to reload the app at dataset change.

Enjoy.

1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.