From ee3de83334b6093c006497b355183df361d5eea0 Mon Sep 17 00:00:00 2001 From: Zacharias Steinmetz Date: Thu, 20 May 2021 17:37:48 +0200 Subject: [PATCH] Prepare v0.9.2 release (#86) * Update citations * Update package news * Make README consistent with package description --- .github/FUNDING.yml | 2 +- DESCRIPTION | 13 ++++++------ NEWS.md | 17 ++++++++++++++++ R/OpenSpecy-package.R | 5 +++++ README.md | 43 ++++++++++++++++++---------------------- cran-comments.md | 27 ++++--------------------- inst/shiny/ui.R | 41 ++++++++++++++++++++------------------ man/OpenSpecy-package.Rd | 14 +++++++++---- vignettes/sop.Rmd | 6 ++++++ vignettes/sop.html | 5 +++-- 10 files changed, 94 insertions(+), 79 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 20f9aac5..d730ec5e 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: [wincowgerDEV] +github: [wincowgerDEV, zsteinmetz] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username diff --git a/DESCRIPTION b/DESCRIPTION index 0c9f4519..7c065120 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: OpenSpecy Type: Package Title: Analyze, Process, Identify, and Share, Raman and (FT)IR Spectra -Version: 0.9.1 -Date: 2021-04-10 +Version: 0.9.2 +Date: 2021-05-20 Authors@R: c(person("Win", "Cowger", role = c("cre", "aut"), email = "wincowger@gmail.com", comment = c(ORCID = "0000-0001-9226-3104")), @@ -25,10 +25,11 @@ Authors@R: c(person("Win", "Cowger", role = c("cre", "aut"), comment = c(ORCID = "0000-0001-7633-8524")), person("Orestis", "Herodotou", role = c("ctb", "dtc"))) Description: Raman and (FT)IR spectral analysis tool for plastic particles and - other environmental samples. Supported features include reading spectral - data files (.asp, .csv, .jdx, .spc, .spa, .0), Savitzky-Golay smoothing of - spectral intensities with smooth_intens(), correcting background noise with - subtr_bg() in accordance with Zhao et al. (2007) + other environmental samples (Cowger et al. 2021, + ). Supported features include reading + spectral data files (.asp, .csv, .jdx, .spc, .spa, .0), Savitzky-Golay + smoothing of spectral intensities with smooth_intens(), correcting + background noise with subtr_bg() in accordance with Zhao et al. (2007) , and identifying spectra using an onboard reference library (Cowger et al. 2020, ). Analyzed spectra can be shared with the Open Specy community. A Shiny app is diff --git a/NEWS.md b/NEWS.md index 2fd02b89..8871ae2c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,20 @@ +# OpenSpecy 0.9.2 + +## New Features + +- Manual baseline corrections +- Citable technical note + +## Minor Improvements + +- More generic .spa file reading +- Added funding + +## Bug Fixes + +- UI improvements + + # OpenSpecy 0.9.1 ## Bug Fixes diff --git a/R/OpenSpecy-package.R b/R/OpenSpecy-package.R index 73a6c384..1a060c2b 100644 --- a/R/OpenSpecy-package.R +++ b/R/OpenSpecy-package.R @@ -14,6 +14,11 @@ #' #' Cowger, W (2021). “Library data.” \emph{OSF}. \doi{10.17605/OSF.IO/X7DPZ}. #' +#' Cowger W, Steinmetz Z, Gray A, Munno K, Lynch J, Hapich H, Primpke S, +#' De Frond H, Rochman C, Herodotou O (2021). “Microplastic Spectral +#' Classification Needs an Open Source Community: Open Specy to the Rescue!” +#' \emph{Analytical Chemistry}. \doi{10.1021/acs.analchem.1c00123}. +#' #' Primpke S, Wirth M, Lorenz C, Gerdts G (2018). “Reference Database Design #' for the Automated Analysis of Microplastic Samples Based on Fourier #' Transform Infrared (FTIR) Spectroscopy.” \emph{Analytical and Bioanalytical diff --git a/README.md b/README.md index d6004b1c..b9fa50c2 100644 --- a/README.md +++ b/README.md @@ -7,19 +7,22 @@ Analyze, Process, Identify, and Share, Raman and (FT)IR Spectra [![Project Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![R-CMD-check](https://github.com/wincowgerDEV/OpenSpecy/workflows/R-CMD-check/badge.svg)](https://github.com/wincowgerDEV/OpenSpecy/actions) [![License: CC BY 4.0](https://img.shields.io/badge/license-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/) +[![DOI](https://img.shields.io/badge/DOI-10.1021/acs.analchem.1c00123-blue.svg)](https://doi.org/10.1021/acs.analchem.1c00123) [![Website](https://img.shields.io/badge/web-openspecy.org-white)](https://wincowger.shinyapps.io/OpenSpecy/) [![Twitter Follow](https://img.shields.io/twitter/follow/OpenSpecy)](https://twitter.com/OpenSpecy) Raman and (FT)IR spectral analysis tool for plastic particles and -other environmental samples. Supported features include reading spectral -data files (.asp, .csv, .jdx, .spc, .spa, .0), Savitzky-Golay smoothing of -spectral intensities with `smooth_intens()`, correcting background noise with -`subtr_bg()` in accordance with Zhao et al. (2007, doi: -[dbhfsj](https://doi.org/dbhfsj)), -and identifying spectra using an onboard reference library (Cowger et al. 2020, -doi: [f3sk](https://doi.org/f3sk)). Analyzed spectra can be shared with the Open -Specy community. A Shiny app is available via `run_app()` or online at +other environmental samples (Cowger et al. 2021, doi: +[10.1021/acs.analchem.1c00123](https://doi.org/10.1021/acs.analchem.1c00123)). +Supported features include reading spectral data files (.asp, .csv, .jdx, .spc, +.spa, .0), Savitzky-Golay smoothing of spectral intensities with +`smooth_intens()`, correcting background noise with `subtr_bg()` in accordance +with Zhao et al. (2007, doi: +[10.1366/000370207782597003](https://doi.org/10.1366/000370207782597003)), and +identifying spectra using an onboard reference library (Cowger et al. 2020, doi: [10.1177/0003702820929064](https://doi.org/10.1177/0003702820929064)). +Analyzed spectra can be shared with the Open Specy community. A Shiny app is +available via `run_app()` or online at [http://www.openspecy.org](https://wincowger.shinyapps.io/OpenSpecy/). ## Installation @@ -92,22 +95,14 @@ match_spec(raman_proc, library = spec_lib, which = "raman") find_spec(sample_name == 5381, library = spec_lib, which = "raman") ``` -## Citation +## Citations -To cite the R package **OpenSpecy** use: +Cowger W, Steinmetz Z, Gray A, Munno K, Lynch J, Hapich H, Primpke S, +De Frond H, Rochman C, Herodotou O (2021). “Microplastic Spectral Classification +Needs an Open Source Community: Open Specy to the Rescue!” +*Analytical Chemistry*. doi: +[10.1021/acs.analchem.1c00123](https://doi.org/10.1021/acs.analchem.1c00123). -Win Cowger and Zacharias Steinmetz (2021). OpenSpecy: Analyze, Process, -Identify, and Share, Raman and (FT)IR Spectra. R package version 0.9.1. +Cowger W, Steinmetz Z (2021). “OpenSpecy: Analyze, Process, +Identify, and Share, Raman and (FT)IR Spectra.” *R package version 0.9.2*. [https://github.com/wincowgerDEV/OpenSpecy](https://github.com/wincowgerDEV/OpenSpecy) - -A BibTeX entry for LaTeX users is - -```latex -@Manual{, - title = {OpenSpecy: Analyze, Process, Identify, and Share, Raman and (FT)IR Spectra}, - author = {Win Cowger and Zacharias Steinmetz}, - year = {2021}, - note = {R package version 0.9.1}, - url = {https://github.com/wincowgerDEV/OpenSpecy}, -} -``` diff --git a/cran-comments.md b/cran-comments.md index 5eb93009..ebddbcdd 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,6 @@ ## Test environments -* local Linux/5.10.23-1-MANJARO, R-4.0.4 +* local Linux/5.10.34-1-MANJARO, R-4.0.5 * ubuntu 20.04 (via GitHub Actions), R-release * ubuntu 20.04 (via GitHub Actions), R-devel * windows latest (via GitHub Actions), R-release @@ -8,28 +8,9 @@ ## R CMD check results -0 errors | 0 warnings | 1 note +0 errors | 0 warnings | 0 note -* Days since last update: 1 +## Comments -## Reviewer comments - -Dear maintainer, - -Please see the problems shown on -. - -Please correct before 2021-04-23 to safely retain your package on CRAN. - -It seems we need to remind you of the CRAN policy: - -'Packages which use Internet resources should fail gracefully with an informative message -if the resource is not available or has changed (and not give a check warning nor error).' - -This needs correction whether or not the resource recovers. - -The CRAN Team - -> Sorry for the inconvenience. We reviewed CRAN's policy on source packages once -> more and fixed our checking routines accordingly. +See NEWS file diff --git a/inst/shiny/ui.R b/inst/shiny/ui.R index 77ade341..f7d553cc 100644 --- a/inst/shiny/ui.R +++ b/inst/shiny/ui.R @@ -16,14 +16,13 @@ library(DT) # Name keys for human readable column names ---- load("data/namekey.RData") -pkgdesc <- packageDescription("OpenSpecy") -citation <- paste(paste( - format(as.personList(utils:::.read_authors_at_R_field(pkgdesc$`Authors@R`)), - include = c("given", "family")), collapse = ", "), - paste0("(", format(as.Date(pkgdesc$Date), "%Y"), ")."), - paste0("Open Specy: ", pkgdesc$Title, "."), - paste0("Version ", pkgdesc$Version, "."), - "www.openspecy.org") +version <- paste0("Open Specy v", packageVersion("OpenSpecy")) +citation <- paste( + "Cowger W, Steinmetz Z, Gray A, Munno K, Lynch J, Hapich H, Primpke S, De", + "Frond H, Rochman C, Herodotou O (2021). “Microplastic Spectral", + "Classification Needs an Open Source Community: Open Specy to the Rescue!”", + "Analytical Chemistry. https://doi.org/10.1021/acs.analchem.1c00123." +) # Functions ---- labelMandatory <- function(label) { @@ -99,7 +98,7 @@ plotcontainerfunction <- function(...) { #style = "padding:0.1rem", div(class = "jumbotron jumbotron-fluid", style = "border:solid #f7f7f9;background-color:rgba(0, 0, 0, 0.5);padding:1rem", - align = "justify", + align = "justify", ...) ) } @@ -470,7 +469,8 @@ ui <- fluidPage( fluidRow( column(3), column(6, align = "center", - tags$p("Citation: ", citation) + tags$p(citation), + tags$p(version) ), column(3) @@ -544,10 +544,10 @@ ui <- fluidPage( selectInput(inputId = "baseline_selection", label = "Technique", choices = c("Polynomial", "Manual")), sliderInput("baseline", "Baseline Correction Polynomial", min = 1, max = 20, value = 8), fluidRow( - column(6, + column(6, actionButton("go", "Correct With Trace"), - ), - column(6, + ), + column(6, actionButton("reset", "Reset"), ) ), @@ -616,7 +616,8 @@ ui <- fluidPage( fluidRow( column(3), column(6, align = "center", - tags$p("Citation: ", citation) + tags$p(citation), + tags$p(version) ), column(3) @@ -629,7 +630,7 @@ ui <- fluidPage( fluidRow( column(3, style = columnformat(), fluidRow( - column(4, + column(4, radioButtons("Spectra", "Type", c("Raman" = "raman", "FTIR" = "ftir")), @@ -640,7 +641,7 @@ ui <- fluidPage( placement = "bottom", trigger = "hover" )), - column(4, + column(4, radioButtons("Data", "Analysis", c("Processed" = "processed", "Uploaded" = "uploaded" @@ -664,7 +665,7 @@ ui <- fluidPage( placement = "bottom", trigger = "hover" ) - + ) ), fluidRow(style = "padding:1rem", @@ -685,7 +686,8 @@ ui <- fluidPage( fluidRow( column(3), column(6, align = "center", - tags$p("Citation: ", citation) + tags$p(citation), + tags$p(version) ), column(3) @@ -723,7 +725,8 @@ ui <- fluidPage( fluidRow( column(3), column(6, align = "center", - tags$p("Citation: ", citation) + tags$p(citation), + tags$p(version) ), column(3) diff --git a/man/OpenSpecy-package.Rd b/man/OpenSpecy-package.Rd index ea2285e5..d0d9f4d3 100644 --- a/man/OpenSpecy-package.Rd +++ b/man/OpenSpecy-package.Rd @@ -8,10 +8,11 @@ \title{OpenSpecy: Analyze, Process, Identify, and Share, Raman and (FT)IR Spectra} \description{ Raman and (FT)IR spectral analysis tool for plastic particles and - other environmental samples. Supported features include reading spectral - data files (.asp, .csv, .jdx, .spc, .spa, .0), Savitzky-Golay smoothing of - spectral intensities with smooth_intens(), correcting background noise with - subtr_bg() in accordance with Zhao et al. (2007) + other environmental samples (Cowger et al. 2021, + ). Supported features include reading + spectral data files (.asp, .csv, .jdx, .spc, .spa, .0), Savitzky-Golay + smoothing of spectral intensities with smooth_intens(), correcting + background noise with subtr_bg() in accordance with Zhao et al. (2007) , and identifying spectra using an onboard reference library (Cowger et al. 2020, ). Analyzed spectra can be shared with the Open Specy community. A Shiny app is @@ -32,6 +33,11 @@ Spectra in Microplastic Research.” \emph{Applied Spectroscopy}, Cowger, W (2021). “Library data.” \emph{OSF}. \doi{10.17605/OSF.IO/X7DPZ}. +Cowger W, Steinmetz Z, Gray A, Munno K, Lynch J, Hapich H, Primpke S, +De Frond H, Rochman C, Herodotou O (2021). “Microplastic Spectral +Classification Needs an Open Source Community: Open Specy to the Rescue!” +\emph{Analytical Chemistry}. \doi{10.1021/acs.analchem.1c00123}. + Primpke S, Wirth M, Lorenz C, Gerdts G (2018). “Reference Database Design for the Automated Analysis of Microplastic Samples Based on Fourier Transform Infrared (FTIR) Spectroscopy.” \emph{Analytical and Bioanalytical diff --git a/vignettes/sop.Rmd b/vignettes/sop.Rmd index aaf99d7f..6ea34556 100644 --- a/vignettes/sop.Rmd +++ b/vignettes/sop.Rmd @@ -721,6 +721,12 @@ Processing and Classification Techniques for Images and Spectra in Microplastic Research.” *Applied Spectroscopy*, **74**(9), 989–1010. doi: [10.1177/0003702820929064](https://doi.org/10.1177/0003702820929064). +Cowger W, Steinmetz Z, Gray A, Munno K, Lynch J, Hapich H, Primpke S, +De Frond H, Rochman C, Herodotou O (2021). “Microplastic Spectral Classification +Needs an Open Source Community: Open Specy to the Rescue!” +*Analytical Chemistry*. doi: +[10.1021/acs.analchem.1c00123](https://doi.org/10.1021/acs.analchem.1c00123). + Primpke S, Wirth M, Lorenz C, Gerdts G (2018). “Reference Database Design for the Automated Analysis of Microplastic Samples Based on Fourier Transform Infrared (FTIR) Spectroscopy.” *Analytical and Bioanalytical Chemistry*, diff --git a/vignettes/sop.html b/vignettes/sop.html index 5f0d50b3..027d489c 100644 --- a/vignettes/sop.html +++ b/vignettes/sop.html @@ -11,7 +11,7 @@ - + Standard Operating Procedure @@ -140,7 +140,7 @@

Standard Operating Procedure

Jessica Meyers, Jeremy Conkle, Win Cowger, Zacharias Steinmetz, Andrew Gray, Chelsea Rochman, Sebastian Primpke, Jennifer Lynch, Hannah Hapich, Hannah De Frond, Keenan Munno, Bridget O’Donnell

-

2021-03-26

+

2021-05-20

@@ -467,6 +467,7 @@

Conceptual diagram of data flow through Open Specy

References

Chabuka BK, Kalivas JH (2020). “Application of a Hybrid Fusion Classification Process for Identification of Microplastics Based on Fourier Transform Infrared Spectroscopy.” Applied Spectroscopy, 74(9), 1167–1183. doi: 10.1177/0003702820923993.

Cowger W, Gray A, Christiansen SH, Christiansen SH, Christiansen SH, De Frond H, Deshpande AD, Hemabessiere L, Lee E, Mill L, et al. (2020). “Critical Review of Processing and Classification Techniques for Images and Spectra in Microplastic Research.” Applied Spectroscopy, 74(9), 989–1010. doi: 10.1177/0003702820929064.

+

Cowger W, Steinmetz Z, Gray A, Munno K, Lynch J, Hapich H, Primpke S, De Frond H, Rochman C, Herodotou O (2021). “Microplastic Spectral Classification Needs an Open Source Community: Open Specy to the Rescue!” Analytical Chemistry. doi: 10.1021/acs.analchem.1c00123.

Primpke S, Wirth M, Lorenz C, Gerdts G (2018). “Reference Database Design for the Automated Analysis of Microplastic Samples Based on Fourier Transform Infrared (FTIR) Spectroscopy.” Analytical and Bioanalytical Chemistry, 410(21), 5131–5141. doi: 10.1007/s00216-018-1156-x.

Renner G, Schmidt TC, Schram J (2017). “A New Chemometric Approach for Automatic Identification of Microplastics from Environmental Compartments Based on FT-IR Spectroscopy.” Analytical Chemistry, 89(22), 12045–12053. doi: 10.1021/acs.analchem.7b02472.

Savitzky A, Golay MJ (1964). “Smoothing and Differentiation of Data by Simplified Least Squares Procedures.” Analytical Chemistry, 36(8), 1627–1639.