Skip to content

Commit

Permalink
changed vignette to use only one wavelength
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbass committed Sep 26, 2023
1 parent 2450b94 commit df7ab3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#### Other changes

* Made some minor improvements to the vignette.
* Made some minor changes to vignette to improve clarity (e.g. using single wavelength for integration, etc.)

#### Bug fixes

Expand Down
16 changes: 8 additions & 8 deletions vignettes/chromatographR.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ oldpar <- par(no.readonly = TRUE) # save current par settings
par(mfrow=c(2,1))
# plot warped data
plot_chroms(warp, lambdas = c("210","260"))
plot_chroms(warp, lambdas = c("210"))
legend("topleft", legend="ptw", bty = "n")
# plot unwarped data
plot_chroms(dat.pr, lambdas = c("210","260"))
plot_chroms(dat.pr, lambdas = c("210"))
legend("topleft", legend="raw", bty = "n")
par(oldpar) # restore par settings
```
Expand All @@ -121,10 +121,10 @@ warp <- correct_rt(chrom_list = dat.pr, alg = "vpdtw", lambdas = "210", what = "
oldpar <- par(no.readonly = TRUE) # save current par settings
par(mfrow=c(2,1))
plot_chroms(warp, lambdas = c("210","260"))
plot_chroms(warp, lambdas = c("210"))
legend("topleft", legend = "vpdtw", bty = "n")
plot_chroms(dat.pr, lambdas = c("210","260"))
plot_chroms(dat.pr, lambdas = c("210"))
legend("topleft", legend = "raw", bty = "n")
par(oldpar) # restore par settings
Expand All @@ -138,13 +138,13 @@ The `get_peaks` function produced a nested list of peaks by looping through the

```{r get_peaks, message=FALSE, warning=FALSE}
# find and integrate peaks using gaussian peak fitting
pks_gauss <- get_peaks(warp, lambdas = c('210','260'), sd.max = 40, fit = "gaussian")
pks_gauss <- get_peaks(warp, lambdas = c('210'), sd.max = 40, fit = "gaussian")
# find and integrate peaks using exponential-gaussian hybrid model
pks_egh <- get_peaks(warp, lambdas = c('210', '260'), sd.max = 40, fit="egh")
pks_egh <- get_peaks(warp, lambdas = c('210'), sd.max = 40, fit="egh")
# find and integrate peaks without modeling peak shape
pks_raw <- get_peaks(warp, lambdas = c('210', '260'), sd.max = 100, fit="raw")
pks_raw <- get_peaks(warp, lambdas = c('210'), sd.max = 100, fit="raw")
```

#### Filtering
Expand Down Expand Up @@ -199,7 +199,7 @@ pk_tab <- normalize_data(peak_table = pk_tab, column="mass")
The `mirror_plot` function provides a quick way to visually compare results across treatment groups.

```{r mirror_plot}
mirror_plot(pk_tab, lambdas = c("210","260"), var = "trt", legend_size = 2)
mirror_plot(pk_tab, lambdas = c("210"), var = "trt", legend_size = 2)
```

##### Plotting spectra
Expand Down

0 comments on commit df7ab3e

Please sign in to comment.