Skip to content

Commit

Permalink
docs: gc-fid vignette, v0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbass committed Oct 12, 2024
1 parent 8b93cf7 commit 7d9030b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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")),
Expand Down Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
)
8 changes: 5 additions & 3 deletions vignettes/articles/GC-FID.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7d9030b

Please sign in to comment.