DataStatsPlot is an R/Shiny application to visualize raw data points, and their summary statistics including Boxplot, Violin plot, Bar plot, mean and median values.
Essential steps to use DataStatsPlot is shown in the left panel of the Shiny application.
Input data of correct format are required to use DataStatsPlot.
Four types of data format are accepted and are illustrated in the Data format menu.
Download figure in PDF or SVG
Plot options
X axis
X axis range
Y axis
X axis range
Choose a figure theme
Plot options for mean values
Plot options for median statistics
Plot options for Error Bar statistics
Plot options for Quasirandom points
Plot options for Beeswarm points
Plot options for Jitter points
Plot options for Dotplot points
Plot options for Half points
Plot options for Boxplot
Plot options for Left Half Boxplot
Plot options for Right Half Boxplot
Plot options for Violin
Plot options for Left Half Violin
Plot options for Right Half Violin
Plot options for Barplot
Statistical comparison of different data groups and conditions
ANOVA and multiple comparison by Tukey test
1. Tidy data without conditions
The input dataset should contain only 2 columns with fixed order.
Column names are optional.
The second column should be a numeric vector representing the data values to be visualized.
The first column should be a character vector indicating different groups of the data values in the second column.
The input dataset should contain at least 1 column.
Every column should be a numeric vector.
The length of different columns can be either identical or different from each other.
Column names are compulsory.
A column name should be composed of two parts separated by an
underscore. The character before the underscore represents the group of the column while
the character after the underscore indicates the condition of the column.
The detailed format of input data for different types of plots are described in the following sections.
1. Single genome plot
1.1 Genome data
The dataset should contain only 2 columns with fixed order. Column names are optional. 1st column: chromosome ID. 2nd column: chromosome length.
Acceptable input data format can be
chr size
1 43268879
2 35930381
3 36406689
or
1 43268879
2 35930381
3 36406689
1.2 Point
The dataset should contain >=3 columns.
In the simplest situation, the dataset should contain 3 columns with fixed order. In this case, column names are optional. 1st column: chromosome ID. 2nd column: chromosome position. 3rd column: data value.
Acceptable input data format can be
chr position value
1 202360 0.315323
1 213775 1.113439
1 218457 0.393112
To control the color of points, add a color column to categorize the data into different groups. Then different colors will be assigned to different groups of data. In this case, column names are compulsory. The name of the first three columns can be any appropriate variable names in R and the order of the first three columns must be fixed as the simplest situation. The name of the color column must be ‘color’.
chr position value color
1 202360 0.315323 a
1 213775 1.113439 a
1 218457 0.393112 a
This is the repository for the Shiny application presented in “DataStatsPlot: an interactive web application for visualizing data and their summary statistics” (Jia et al. 2022).
2. Launch DataStatsPlot directly from R and GitHub
User can choose to run DataStatsPlot installed on local computers (Windows, Mac or Linux) for a more preferable experience.
Step 1: Install R and RStudio
Before running the app you will need to have R and RStudio installed (tested with R 3.5.0 and RStudio 1.2.5033).
Please check CRAN (https://cran.r-project.org/) for the installation of R.
Please check https://www.rstudio.com/ for the installation of RStudio.
Step 2: Install the R Shiny package and other packages required by DataStatsPlot
Start an R session using RStudio and run these lines:
Put the directory containing the code and data of DataStatsPlot to /srv/shiny-server.
Step 5: Configure shiny server (/etc/shiny-server/shiny-server.conf)
# Define the user to spawn R Shiny processes
run_as shiny;
# Define a top-level server which will listen on a port
server {
# Use port 3838
listen 3838;
# Define the location available at the base URL
location /datastatsplot {
# Directory containing the code and data of DataStatsPlot
app_dir /srv/shiny-server/DataStatsPlot;
# Directory to store the log files
log_dir /var/log/shiny-server;
}
}
Step 6: Change the owner of the DataStatsPlot directory
$ chown -R shiny /srv/shiny-server/DataStatsPlot
Step 7: Start Shiny-Server
$ start shiny-server
Now, the DataStatsPlot app is available at http://IPAddressOfTheServer:3838/DataStatsPlot/.
Note that you should replace “IPAddressOfTheServer” as the actual IP address of your Linux web server.
DataStatsPlot is a Shiny web application for visualization of data and their summary statistics. DataStatsPlot can be used to visualize and compare different data sets. The raw data can be visualized as varying types of points (jitter points, Quasi-random points, Bee swarm points, dot plot). In addition, summary statistics (mean, median, boxplot, violinplot, barplot) and inferential statistics (confidence intervals) can be added to further enhance the comparison.
Software references
R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna. R version 3.5.0
shiny: Web Application Framework for R. R package version 1.4.0
ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. R package version 3.2.1
ggthemes: Extra Themes, Scales and Geoms for “ggplot2”. R package version 4.2.0
ggbeeswarm: Categorical Scatter (Violin Point) Plots. R package version 0.6.0
ggsignif: Significance Brackets for ‘ggplot2’. R package version 0.6.0
gghalves: Compose Half-Half Plots Using Your Favourite Geoms. R package version 0.0.1
gridExtra: Miscellaneous Functions for “Grid” Graphics. R package version 2.3
shinyWidgets: Custom Inputs Widgets for Shiny. R package version 0.5.0
shinyBS: Twitter Bootstrap Components for Shiny. R package version 0.61
shinyjs: Easily Improve the User Experience of Your Shiny Apps in Seconds. R package version 1.1
shinyjqui: ‘jQuery UI’ Interactions and Effects for Shiny. R package version 0.3.3
colourpicker: A Colour Picker Tool for Shiny and for Selecting Colours in Plots. R package version 1.0
RColorBrewer: ColorBrewer palettes. R package version 1.1-2
dplyr: A fast, consistent tool for working with data frame like objects, both in memory and out of memory. R package version 0.8.4
data.table: Extension of “data.frame”. R package version 1.12.8
DT: A Wrapper of the JavaScript Library ‘DataTables’. R package version 0.12
markdown: “Markdown” Rendering for R. R package version 1.1
multcompView: Visualizations of Paired Comparisons. R package version 0.1-8
ggallin: Grab Bag of ‘ggplot2’ Functions. R package version 0.1.1
lemon: Freshing Up your ‘ggplot2’ Plots. R package version 0.4.5
ShinySky: Various UI widgets/components not part of Shiny e.g. alerts, styled buttons. R package version 0.1.2
Further references
This application was created by Wen Yao. Please send bugs and feature requests to Wen Yao (yaowen at henau.edu.cn). This application uses the shiny package from RStudio.