Skip to content

Commit

Permalink
release 1.0.6
Browse files Browse the repository at this point in the history
mottensmann committed Jan 22, 2024
1 parent 2489f14 commit 4d5b267
Showing 7 changed files with 138 additions and 103 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: GCalignR
Title: Simple Peak Alignment for Gas-Chromatography Data
Version: 1.0.5.1
Date: 2023-01-27
Version: 1.0.6
Date: 2024-01-22
Encoding: UTF-8
Authors@R: c(
person("Meinolf", "Ottensmann", email = "meinolf.ottensmann@web.de", role = c("aut","cre"),
@@ -33,7 +33,7 @@ Imports:
License: GPL (>= 2) | file LICENSE
Language: en-GB
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
Suggests:
knitr,
pander,
163 changes: 91 additions & 72 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,110 +1,129 @@

# GcalignR 1.0.6

------------------------------------------------------------------------

- Removing unused argument `gc_peak_df` from `align_peaks`

# GCalignR 1.0.5

------------------------------------------------------------------------

- Bugfix in `choose_optimal_reference` that always selected the first
sample as a reference. Thanks to Heberto del Rio who pointed this out
on <https://github.com/mottensmann/GCalignR/issues/27>

# GCalignR 1.0.3.9

- Small bug fixed that caused problems when plotting x-axis labels in
`gc_heatmap`. An error occurred in case of two peaks that were
identical when rounded to decimal places.
- Added a test for detecting inconsistently ordered retention times
within samples. Retention times are expected in increasing order,
starting with the lowest number. If this assumption is violated,
retention times are reordered as indicated by a warning.
- **Speedboost** when setting `max_diff_peak2mean = 0`: In this special
case there is no need to use a time-consuming iterative approach but
peaks can be sorted simply based on absolute values. This is
implemented in two steps. (1) Across all samples, unique retention
times are extracted, sorted in increasing temporal order and written
to a template data frame. (2) For each sample, peaks are matched to
the corresponding row of the template data frame.
- Small bug fixed that caused problems when plotting x-axis labels in
`gc_heatmap`.
- Added a test for detecting inconsistently ordered retention times
within samples. Retention times are expected in increasing order,
starting with the lowest number. If this assumption is violated,
retention times are reordered and a warning is shown.

# GCalignR 1.0.3

-----

- Added `fill = TRUE` as a parameter in `utils::read.table` when
reading data from text within internal functions. *Loading GC data
with utils::read.table failed in cases of missing values in a column
(i.e. empty). This is the correct behaviour as missing data should
always be coded explicitly by ‘NA’*
- Tibbles are now coerced to data frames
- Added a new boolean parameter `remove_empty` for the main function
`align_chromatograms`. If samples are empty (i.e.. no peak) this
parameter allows to remove those cases from the dataset to avoid
problems in post-hoc analyses. By default `FALSE`, i.e.. all but the
blank samples are kept.
- Added a new boolean parameter `permute` for the functions
`align_chromatograms` and `align_peaks`. This allows to change the
default behaviour of random permutation of samples during the
alignment and might be useful if exact replication is needed.
------------------------------------------------------------------------

- Added `fill = TRUE` as a parameter in `utils::read.table` when reading
data from text within internal functions. *Loading GC data with
utils::read.table failed in cases of missing values in a column
(i.e. empty). This is the correct behaviour as missing data should
always be coded explicitly by ‘NA’*
- Tibbles are now coerced to data frames
- Added a new boolean parameter `remove_empty` for the main function
`align_chromatograms`. If samples are empty (i.e.. no peak) this
parameter allows to remove those cases from the dataset to avoid
problems in post-hoc analyses. By default `FALSE`, i.e.. all but the
blank samples are kept.
- Added a new boolean parameter `permute` for the functions
`align_chromatograms` and `align_peaks`. This allows to change the
default behaviour of random permutation of samples during the
alignment and might be useful if exact replication is needed.

# GCalignR 1.0.2

-----
------------------------------------------------------------------------

- The accompanying manuscript is published
<https://doi.org/10.1371/journal.pone.0198311> and the citation has
been added
- The function *beta* `read_empower2` allows to import HPLC data that
has been generated using the EMPOWER 2 software
- The accompanying manuscript is published
<https://doi.org/10.1371/journal.pone.0198311> and the citation has
been added
- The function *beta* `read_empower2` allows to import HPLC data that
has been generated using the EMPOWER 2 software

# GCalignR 1.0.1

-----
------------------------------------------------------------------------

**Bugfixes**

- A bugfix was applied for handling multiple blanks correctly.
- Progressbars are removed in non-interactive R sessions
- A bugfix was applied for handling multiple blanks correctly.
- Progressbars are removed in non-interactive R sessions

-----
------------------------------------------------------------------------

# GCalignR 1.0.0

**New functions implemented**

- `choose_optimal_reference` offers an automatism to pick suitable
references.
- `draw_chromatograms` allows to represent a peak list in form of
chromatogram.
- `remove_blanks`allows to get rid of peaks that represent
contamination after aligning a dataset
- `remove_singletons` allows to remove single peaks from the dataset
after aligning
- `merge_redundant_rows` allows to merge rows that were not recognised
as redundant during the alignment by increasing the threshold value
for the evaluation of similarity
- `choose_optimal_reference` offers an automatism to pick suitable
references.
- `draw_chromatograms` allows to represent a peak list in form of
chromatogram.
- `remove_blanks`allows to get rid of peaks that represent contamination
after aligning a dataset
- `remove_singletons` allows to remove single peaks from the dataset
after aligning
- `merge_redundant_rows` allows to merge rows that were not recognised
as redundant during the alignment by increasing the threshold value
for the evaluation of similarity

**Algorithm**

- Using `pbapply`, we implemented progress bars to inform the user
about the progress and the estimated running time of intermediate
steps in the alignment of peak lists.
- By implementing more efficient code, we were able to speed up the
processing, especially picking references is faster by an order of
magnitude.
- Retention times are not rounded to two decimals anymore.
Calculations still capture a precision of two decimals for
computational reasons.
- Within the aligned results, retention times correspond to the input
values. Linear adjustments are only used internally and are
documented within the Logfile accessible in the output.
- Reference samples that are used for the coarse alignment of
retention times can be picked using a novel algorithm that
determines the average similarity across the dataset.
- Using `pbapply`, we implemented progress bars to inform the user about
the progress and the estimated running time of intermediate steps in
the alignment of peak lists.
- By implementing more efficient code, we were able to speed up the
processing, especially picking references is faster by an order of
magnitude.
- Retention times are not rounded to two decimals anymore. Calculations
still capture a precision of two decimals for computational reasons.
- Within the aligned results, retention times correspond to the input
values. Linear adjustments are only used internally and are documented
within the Logfile accessible in the output.
- Reference samples that are used for the coarse alignment of retention
times can be picked using a novel algorithm that determines the
average similarity across the dataset.

**warning messages**

- Warnings addressing formatting issues are now more explicit and
partly rephrased to avoid ambiguity.
- Warnings addressing formatting issues are now more explicit and partly
rephrased to avoid ambiguity.

**Plots**

- Added horizontal axis to barplots summarising peak numbers in
`plot.GCalign`.
- Changed to more prominent colours in binary heatmaps with
`gc_heatmap`.
- The function `draw_chromatograms` was added as another visualisation
tool.
- Added horizontal axis to barplots summarising peak numbers in
`plot.GCalign`.
- Changed to more prominent colours in binary heatmaps with
`gc_heatmap`.
- The function `draw_chromatograms` was added as another visualisation
tool.

**Vignettes**

- We included a second vignette that explains the algorithm and the
supported data in detail.
- We included a second vignette that explains the algorithm and the
supported data in detail.

**Documentation**

- Helpfiles were rewritten to enhance clarity.
- Helpfiles were rewritten to enhance clarity.

-----
------------------------------------------------------------------------
5 changes: 5 additions & 0 deletions NEWS.rmd
Original file line number Diff line number Diff line change
@@ -3,7 +3,12 @@ output: github_document
html_preview: false
---

# GcalignR 1.0.6
___
* Removing unused argument `gc_peak_df` from `align_peaks`

# GCalignR 1.0.5
___

* Bugfix in `choose_optimal_reference` that always selected the first sample as a reference. Thanks to Heberto del Rio who pointed this out on https://github.com/mottensmann/GCalignR/issues/27

Binary file modified README-unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 6 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -3,8 +3,6 @@ output: github_document
html_preview: false
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
@@ -36,7 +34,7 @@ As with other software you need to get used to the input format which is shown i

### Installing GCalignR:

The latest release v1.0.5 is on `CRAN`. [Click here](https://github.com/mottensmann/GCalignR/releases) for an overview of past releases and a brief description of applied changes.
The latest release v1.0.5.2 is on `CRAN`. [Click here](https://github.com/mottensmann/GCalignR/releases) for an overview of past releases and a brief description of applied changes.

```{r, eval = FALSE}
install.packages("GCalignR", dependencies = T)
@@ -71,7 +69,7 @@ Basic usage of the main function to align peaks:

```{r}
library(GCalignR)
aligned <- align_chromatograms(data = peak_data[1:10], # list of data frame
aligned <- align_chromatograms(data = peak_data[1:4], # list of data frame
rt_col_name = "time", # retention time
max_linear_shift = 0, #
max_diff_peak2mean = 0,
@@ -93,9 +91,10 @@ df <- scholar::get_article_cite_history(id = "jB8EJjQAAAAJ", article = "_kc_bZDy
df <- data.frame(Year = df[["year"]], Citations = df[["cites"]])
library(ggplot2)
ggplot(df, aes(Year, Citations)) +
geom_bar(stat = "identity", col = "#D95F02" , fill = "#1B9E77") +
geom_bar(stat = "identity", col = "black", fill = "#1B9E77") +
egg::theme_article(base_size = 14) +
labs(title = "GCalignR usage",
caption = paste("Citations as of", Sys.Date(), "[Google Scholar]"))
scale_x_continuous(breaks = seq(2018,2024,1)) +
labs(title = "GCalignR citations on Google Scholar",
caption = paste("Citations as of", Sys.Date()))
```

18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# GCalignR [<img src="vignettes/GCalignRLogo.png" height="200" align="right"/>](https://github.com/mottensmann/GCalignR)

![Build
@@ -30,7 +28,7 @@ shown in the illustration:

### Installing GCalignR:

The latest release v1.0.5 is on `CRAN`. [Click
The latest release v1.0.5.2 is on `CRAN`. [Click
here](https://github.com/mottensmann/GCalignR/releases) for an overview
of past releases and a brief description of applied changes.

@@ -69,26 +67,26 @@ Basic usage of the main function to align peaks:

``` r
library(GCalignR)
aligned <- align_chromatograms(data = peak_data[1:10], # list of data frame
aligned <- align_chromatograms(data = peak_data[1:4], # list of data frame
rt_col_name = "time", # retention time
max_linear_shift = 0, #
max_diff_peak2mean = 0,
min_diff_peak2peak = 0.08)
#> Run GCalignR
#> Start: 2023-06-20 12:44:08
#> Start: 2024-01-22 17:51:11
#>
#> Data for 10 samples loaded.
#> Data for 4 samples loaded.
#> No reference was specified. Hence, a reference will be selected automatically ...
#>
#> 'M7' was selected on the basis of highest average similarity to all samples (score = 0.05).
#> Start correcting linear shifts with "M7" as a reference ...
#> 'C2' was selected on the basis of highest average similarity to all samples (score = 0.06).
#> Start correcting linear shifts with "C2" as a reference ...
#>
#> Start aligning peaks ... this might take a while!
#>
#> Merge redundant rows ...
#>
#> Alignment completed!
#> Time: 2023-06-20 12:44:32
#> Time: 2024-01-22 17:51:15
```

**The parameter values above differ from the defaults shown in the paper
@@ -117,6 +115,4 @@ package for aligning gas-chromatography data for ecological and
evolutionary studies. PLoS ONE 13(6): e0198311.
https://doi.org/10.1371/journal.pone.0198311](https://doi.org/10.1371/journal.pone.0198311)

#> Warning: package 'ggplot2' was built under R version 4.2.3

![](README-unnamed-chunk-7-1.png)<!-- -->
36 changes: 26 additions & 10 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
## Submission GCalignR version 1.0.5
## Submission GCalignR version 1.0.6

This is a minor release correcting an indexing error in the function choose_optimal_reference
This is a minor release, removing an unused function argument (gc_peak_df) from the function align_peaks.

## Test environments
* devtools::build_win()
* devtools::check_mac_release()
* devtools::check_win_devel()
* devtools::check_win_release()
* devtools::check_rhub()
* local Windows 10 Home
* Travis-CI
* local Windows 11 Home

## R CMD check results
There were no ERRORs or WARNINGs or Notes

## win_build check results
There were no ERRORs or WARNINGs or Notes
There were no ERRORs or WARNINGs

## travis-ci results
There were no ERRORs or WARNINGs or Notes
There are 2 NOTEs:

Note 1:

```
checking for non-standard things in the check directory ... NOTE
Found the following files/directories:
''NULL''
```
According to [R-hub issue #560](https://github.com/r-hub/rhub/issues/560), this seems to be an Rhub issue and so can likely be ignored.

Note 2:

```
* checking for detritus in the temp directory ... NOTE
Found the following files/directories:
'lastMiKTeXException'
```
According to [R-hub issue #503](https://github.com/r-hub/rhub/issues/503), this could be due to a bug/crash in MiKTeX and can likely be ignored.

0 comments on commit 4d5b267

Please sign in to comment.