From 7d9030b964f86abf3b23dde3e24b6aeaf3d2e8f0 Mon Sep 17 00:00:00 2001 From: Ethan Bass Date: Sat, 12 Oct 2024 16:25:51 -0400 Subject: [PATCH] docs: gc-fid vignette, v0.7.2 --- DESCRIPTION | 4 ++-- NEWS.md | 11 +++++++++++ README.md | 2 +- inst/CITATION | 4 ++-- vignettes/articles/GC-FID.qmd | 8 +++++--- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e1f59f7..de5ee07 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: chromatographR Title: Chromatographic Data Analysis Toolset -Version: 0.7.1 +Version: 0.7.2 Authors@R: c( person("Ethan", "Bass", , "ethanbass@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6175-6739")), @@ -64,7 +64,7 @@ Suggests: VignetteBuilder: knitr Config/testthat/edition: 3 -Config/Needs/website: rdryad, vegan, quarto +Config/Needs/website: ggordiplots, rdryad, vegan, quarto Encoding: UTF-8 Language: en-US LazyData: true diff --git a/NEWS.md b/NEWS.md index 4c3d2ce..40d4ff2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,14 @@ +# chromatographR 0.7.2 + +* Export `get_times` and `get_lambdas` functions. +* Small revisions to documentation. +* Use `tryCatch` to allow for missing spectra in `plot_all_spectra`. +* Fixed rounding of p-values in `cluster_spectra`. +* Changed `alpha` in `cluster_peaks` to match common usage, such that the +`alpha` parameter now specifies the significance level rather than the +confidence level (1-alpha). +* Deprecated `peak_no` argument in `cluster_peaks` in favor of new `min_size` and `max_size` arguments. + # chromatographR 0.7.1 * Fixed bug in `get_peaks` causing peaks to erroneously filtered out in some cases. diff --git a/README.md b/README.md index 93fe8b3..b1b5aa0 100644 --- a/README.md +++ b/README.md @@ -59,4 +59,4 @@ Also see the [contributing.md](https://github.com/ethanbass/chromatographR/blob/ If you use chromatographR in published work, please cite it as follows: -Bass, E. (2023). chromatographR: Chromatographic Data Analysis Toolset (version 0.7.1). http://doi.org/10.5281/zenodo.6944334 +Bass, E. (2023). chromatographR: Chromatographic Data Analysis Toolset (version 0.7.2). http://doi.org/10.5281/zenodo.6944334 diff --git a/inst/CITATION b/inst/CITATION index 32e90a5..7f75950 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -5,11 +5,11 @@ bibentry( title = "chromatographR: Chromatographic Data Analysis Toolset", author = "Ethan Bass", year = "2023", - note = "version 0.7.1", + note = "version 0.7.2", url = "https://ethanbass.github.io/chromatographR/", doi = "10.5281/zenodo.6944334", textVersion = paste("Bass, E. (2023).", - "chromatographR: Chromatographic Data Analysis Toolset (version 0.7.1).", + "chromatographR: Chromatographic Data Analysis Toolset (version 0.7.2).", "http://doi.org/10.5281/zenodo.6944334" ) ) diff --git a/vignettes/articles/GC-FID.qmd b/vignettes/articles/GC-FID.qmd index f7ab0a5..85510b3 100644 --- a/vignettes/articles/GC-FID.qmd +++ b/vignettes/articles/GC-FID.qmd @@ -16,18 +16,19 @@ knitr::opts_chunk$set( library(chromatographR) library(rdryad) library(vegan) +library(ggplot2) ``` ### Introduction While the basic workflow is similar for analyzing different types of chromatographic data with `chromatographR`, there are a few important differences when analyzing GC-FID data (or other 1-dimensional data). This vignette highlights some important considerations when using chromatographR to analyze GC-FID data (or other 2D chromatography data). -To demonstrate the use of `chromatographR` for the analysis GC-FID data, we will analyze a dataset on cuticular hydrocarbons (CHCs) composition in four species of paper wasps (*Polistes spp.*) collected by Dr. Andrew Legan [@legan2022; @legan2022a]. The dataset includes CHCs collected from *Polistes dominula* (european paper wasp), *Polistes exclamans* (common paper wasp), *P. fuscatus* (northern paper wasp), and *P. metricus* (metric paper wasp). As in other social insects, cuticular hydrocarbons serve as chemical cues mediating a number of social behaviors in paper wasps [@legan2021], including nestmate recognition [@gamboa1986; @gamboa1996; @bruschini2011], establishment of social hierarchies [@jandt2014] and mate choice [@reed1990] in many social insects. +To demonstrate the use of `chromatographR` for the analysis GC-FID data, we will analyze a dataset on cuticular hydrocarbons (CHCs) composition in four species of paper wasps (*Polistes spp.*) collected by Dr. Andrew Legan [@legan2022; @legan2022a]. The dataset includes CHCs collected from *Polistes dominula* (european paper wasp), *Polistes exclamans* (common paper wasp), *P. fuscatus* (northern paper wasp), and *P. metricus* (metric paper wasp). As in other social insects, cuticular hydrocarbons serve as chemical cues mediating a number of social behaviors in paper wasps [@legan2021], including nestmate recognition [@gamboa1986; @gamboa1996; @bruschini2011], establishment of social hierarchies [@jandt2014] and mate choice [@reed1990]. ::: {#fig-polistes layout-ncol=2 layout-nrow=2} -![*P. dominula* [@kranz2022]](images/pdom_pipe_c.jpg){height=300} +![*P. dominula* [@kranz2020]](images/pdom_pipe_c.jpg){height=300} ![*P. exclamans* © Andrew Legan](images/PEXC_multiple_adults_on_nest_c.png){height=300} @@ -229,7 +230,7 @@ gg_ordiplot <- function (ord, groups, shape = NULL, scaling = 1, choices = c(1, } df_ord <- vegan::scores(ord, display = "sites", scaling = scaling, choices = choices) - axis.labels <- ord_labels(ord)[choices] + axis.labels <- ggordiplots::ord_labels(ord)[choices] df_ord <- data.frame(x = df_ord[, 1], y = df_ord[, 2], Group = groups) if (!is.null(shape)){ df_ord <- data.frame(df_ord, shape = shape) @@ -313,6 +314,7 @@ gg_ordiplot <- function (ord, groups, shape = NULL, scaling = 1, choices = c(1, plot = plt)) } ``` + ```{r} ord <- vegan::rda(pktab$tab, scale = TRUE) pktab$sample_meta$SEX_SP <- interaction(pktab$sample_meta$SEX,