Skip to content

Commit

Permalink
Big shiny app update
Browse files Browse the repository at this point in the history
  • Loading branch information
julianstanley committed Jun 7, 2020
1 parent 6d18084 commit b56e3b8
Show file tree
Hide file tree
Showing 12 changed files with 595 additions and 422 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: sensorOverlord
Type: Package
Title: A Tyrant of Absolute Quantitative Ratiometric Microscopy
Version: 0.1.0
Version: 0.2.0
Author: Julian Stanley
Maintainer: Julian Stanley <[email protected]>
Description: "This package provides a few classes and methods that can help you
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export(ranges_df)
export(rescaleToRange)
export(spectraMatrixFromValues)
exportClasses(Sensor)
exportClasses(ligandSensor)
exportClasses(pHSensor)
exportClasses(redoxSensor)
exportClasses(sensorSpectra)
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# sensorOverlord 0.2.0

* Computes error directly
* Extends computations to ligandSensor objects
* Adds rangePlot functionality
* Major improvements and UI redesign of shiny application

# sensorOverlord 0.1.0

* First functional version of the package, published alongwide biorxiv preprint.
41 changes: 21 additions & 20 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -911,28 +911,29 @@ create_ranges_multiple <- function(error_df, thresholds = c(0.5, 1, 1.5, 2, 2.5)
#' @import cowplot
#' @export
plot_ranges_general <- function(ranges, ylim, by, y_label) {
ranges$Inaccuracy <- as.numeric(ranges$Inaccuracy)
suppressWarnings(ranges$Minimum <- as.numeric(ranges$Minimum))
suppressWarnings(ranges$Maximum <- as.numeric(ranges$Maximum))
ranges <- ranges[complete.cases(ranges), ]
ggplot() +
geom_linerange(
data = ranges %>% arrange(-error_thresh),
mapping = aes(
x = Sensor_Name, ymin = Minimum,
ymax = Maximum, lwd = 1, color = error_thresh
),
size = 10
) +
scale_y_continuous(breaks = seq(ylim[1], ylim[2], by = by)) +
scale_color_continuous(high = "lightgreen", low = "forestgreen") +
xlab("") +
ylab(y_label) +
theme_classic() +
theme(aspect.ratio = 1) +
coord_flip(ylim = ylim)
ranges$Inaccuracy <- as.numeric(ranges$Inaccuracy)
suppressWarnings(ranges$Minimum <- as.numeric(ranges$Minimum))
suppressWarnings(ranges$Maximum <- as.numeric(ranges$Maximum))
ranges <- ranges[complete.cases(ranges), ]
ggplot() +
geom_linerange(
data = ranges %>% arrange(-error_thresh),
mapping = aes(
x = Sensor_Name, ymin = Minimum,
ymax = Maximum, lwd = 1, color = error_thresh
),
size = 10
) +
scale_y_continuous(breaks = seq(ylim[1], ylim[2], by = by)) +
scale_color_continuous(high = "lightgreen", low = "forestgreen") +
xlab("") +
ylab(y_label) +
theme_classic() +
theme(aspect.ratio = 1) +
coord_flip(ylim = ylim)
}


#' Takes in a ranges_df dataframe and makes a plot (for redox).
#' @param ranges A dataframe of ranges with at least these columns:
#' 'Sensor_Name': the name of the sensor
Expand Down
5 changes: 3 additions & 2 deletions inst/shinyApp/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ ui <- navbarPage(
fluid=TRUE,
theme = "bootstrap.min.css",
source(file.path("ui", "ui_01_welcome.R"), local = TRUE)$value,
source(file.path("ui", "ui_02_customSensor.R"), local = TRUE)$value,
source(file.path("ui", "ui_04_settings.R"), local = TRUE)$value,
source(file.path("ui", "ui_02_analysis.R"), local = TRUE)$value,
source(file.path("ui", "ui_03_more.R"), local = TRUE)$value,
#source(file.path("ui", "ui_04_settings.R"), local = TRUE)$value,
footer = includeHTML("www/footer.html")
)

Expand Down
Loading

0 comments on commit b56e3b8

Please sign in to comment.