Skip to content

Commit

Permalink
Wrapped up pH generalization for DB
Browse files Browse the repository at this point in the history
  • Loading branch information
julianstanley committed Jun 14, 2020
1 parent e7f54de commit 8966f26
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 10 deletions.
8 changes: 6 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ formatSpectraData <-
values_max,
lambda_min,
values_min,
sensor_midpoint) {
sensor_midpoint,
lambda1_recommended,
lambda2_recommended) {
# Data validation -------

# Validating lengths
Expand Down Expand Up @@ -148,7 +150,9 @@ formatSpectraData <-
values_max = values_max,
lambda_min = lambda_min,
values_min = values_min,
sensor_midpoint = sensor_midpoint
sensor_midpoint = sensor_midpoint,
lambda1_recommended = lambda1_recommended,
lambda2_recommended = lambda2_recommended
)
)
}
Expand Down
5 changes: 3 additions & 2 deletions docs/articles/accessing-database.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ pkgdown: 1.5.1
pkgdown_sha: ~
articles:
accessing-database: accessing-database.html
last_built: 2020-06-14T14:49Z
last_built: 2020-06-14T15:17Z

4 changes: 3 additions & 1 deletion docs/reference/formatSpectraData.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion inst/shinyApp/server/server_01_welcome.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ observeEvent(input$`use-upload`, {
})

update_sensor_lambda <- observeEvent(input$sensors, {
browser()
if (input$sensors %in% sensorNames) {
index <- match(input$sensors, sensorData$sensor_name)
updateNumericInput(session, inputId = "lambda1",
Expand Down
4 changes: 3 additions & 1 deletion man/formatSpectraData.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions vignettes/accessing-database.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ In the following methods, "values_min"/other references to 'min' refer to the li
lambda_max <- deGFP1$V1
values_max <- deGFP1$V2
lambda_min <- deGFP1$V3
values_max <- deGFP1$V4
values_min <- deGFP1$V4
```

Now, you can use the `sensorOverlord::formatSpectraData` function to format the data into
a list for submission to the database:

```R
submission <- formatSpectraData(name = "deGFP1", type = "pH", readout = "emission ratiometric", lambda_max = lambda_max, values_max = values_max, lambda_min = lambda_min, values_min = values_min, sensor_midpoint = 8.02)
submission <- formatSpectraData(name = "deGFP1", type = "pH", readout = "emission ratiometric", lambda_max = lambda_max, values_max = values_max, lambda_min = lambda_min, values_min = values_min, sensor_midpoint = 8.02,
lambda1_recommended = 515, lambda2_recommended = 460)
```

Then, when you're ready to submit your entry, you can use `sensorOverlord::getDb()` and `$insert` to add your new submission:
Expand Down

0 comments on commit 8966f26

Please sign in to comment.