Skip to content

FastRet

1.3.0Package record

Retention Time Prediction in Liquid Chromatography

0packages depend
3.1Kdownloads / year
29.8%test coverage
8/13flavors OK

Overview

About

A framework for predicting retention times in liquid chromatography. Users can train custom models for specific chromatography columns, predict retention times using existing models, or adjust existing models to account for altered experimental conditions. The provided functionalities can be accessed either via the R console or via a graphical user interface. Related work: Bonini et al. (2020) doi:10.1021/acs.analchem.9b05765.

Changes in 1.3.0

API Improvements:

1. getCDs():

  • Calculation of CDs is skipped, if all CDs are already present in the input dataframe.
  • In addition to a dataframe with column "SMILES", a plain character vector of SMILES strings can now be provided as input.
  • Improved progress output.
  • More Smiles are now pre-cached internally to speed up retrieval of CDs for large datasets.

2. plot_frm():

  • Now available as exported function (the function existed before, but was only exposed via the Graphical User Interface). Now users can call it directly from R scripts.
Show all changes in 1.3.0Hide the rest of the changes in 1.3.0
  • Added semi-transparent background to legends for better readability
  • Changed the point character from unfilled circles with colored borders to filled circles with black borders for better visibility.
  • Constant predictions (causing correlation to be NA) do no longer cause a warning.

3. preprocess_data():

  • Added argument add_cds to control whether chemical descriptors should be added to the input data using getCDs().
  • Added argument rm_ucs to control whether unsupported columns (i.e. columns that are neither mandatory nor optional) should be removed from the input data.
  • Added argument rt_terms to control whether transformations of the RT column (square, cube, log, exp, sqrt) should be added to the input data.
  • In case of missing mandatory columns (SMILES, RT, NAME) an error is now raised.
  • INCHIKEY and Chemical Descriptors listed in CDFeatures are allowed as optional columns.
  • Columns that are neither mandatory nor optional are automatically removed.
  • Improved runtime for generation of polynomial features and/or interaction terms.
  • Removal of NA and/or near-zero-variance predictors is now done after adding polynomial features and/or interaction terms.
  • Improved progress output.

4. train_frm():

  • Added argument do_cv to control whether cross-validation should be performed for performance estimation. Default is TRUE.
  • Removal of near-zero-variance predictors and/or removal of NA values is now done as part of the internal model training, i.e. it happens separately for each fold during cross-validation. This prevents data leakage from the training set to the validation set. The corresponding hint about "overoptimistic cross-validation results" has consequently been removed from the documentation.
  • Argument method now accepts two values for training models with xgbtree base: "gbtreeDefault" (train xgboost with default params) and "gbtreeRP" (train xgboost with parameters optimized for the RP dataset). The old value "gbtree" still works and is now an alias for "gbtreeDefault".
  • Improved documentation of the return value (i.e. frm objects are fully specified now).
  • Added type checking for each user input.
  • Performance estimation via cross-validation now uses the new clipping mechanism provided by clip_predictions(). Of course, the clipping is always based on the RT range of training folds, not the whole original training data.
  • Calculating proportion of variance explained (R²) no longer throws a warning for constant predictions (causing correlation to be NA). Instead, R² is set to 0 in such cases.

5. predict.frm():

  • Data transformations applied to the training data (adding polynomial features and/or adding interaction terms) are now automatically applied to new data as well. This was not the case before, leading to errors when trying to predict RTs using models trained with degree_polynomial>1 and/or interaction_terms=TRUE, unless the transformations were manually applied to the new data beforehand.
  • Added argument clip to allow clipping of predictions to be within the RT range of the training data. Works for both adjusted and unadjusted models.
  • Predictions are now clipped to be within a sensible range by default. To produce unclipped predictions, set clip=FALSE. See clip_predictions() for details.
  • If a chemical descriptor is NA in the new data, but required by the model, the NA value is now replaced by the mean of that descriptor in the training data. Previously, the prediction for such entries was NA. The old behavior can be restored by setting impute=FALSE in predict.frm().

6. selective_measuring():

  • Added argument rt_coef, allowing user to control the influence of RT on the clustering. A value of 0 means that RT is ignored, a value of "max_ridge_coefficient" means that RT has the same weight as the most important chemical descriptor and a value of 1 means no scaling at all (except standardization to z-scores, which is applied before to the whole dataset before the ridge regression is trained).

7. adjust_frm():

  • Added argument seed to allow reproducible results.
  • Added argument do_cv to control whether cross-validation should be performed for performance estimation. Default is TRUE.
  • Added argument adj_type to control which model should be trained for adjustment: supported options are "lm", "lasso", "ridge", or "gbtree". Previously, only "lm" was supported. To stay backwards compatible, the default is "lm".
  • Added argument add_cds to control whether chemical descriptors should be added to the input data using getCDs(). Only recommended for adj_type other than "lm".
  • Added support for mapping by SMILES+INCHIKEY in addition to SMILES+NAME. SMILES+INCHIKEY is used by default if both columns are present in the adjusted and the original training data. Otherwise SMILES+NAME is used as before.
  • Improved error handling. Previously, unmappable entries in the new data had been ignored silently. Now, an error is raised in such cases.
  • Function arguments are now stored in the returned frm object for better reproducibility.
  • Mapping is now performed by matching each new entry to the average RT of all original training entries with the same key (SMILES+INCHIKEY or SMILES+NAME). Example: if the new dataset contains a key twice, and the original training data contains the key three times, both new entries are mapped to the average RT of the three original entries.
  • Performance estimation via cross-validation now uses the new clipping mechanism provided by clip_predictions(). Of course, the clipping is always based on the RT range of training folds, not the whole original training data.
  • Calculating proportion of variance explained (R²) no longer throws a warning for constant predictions (causing correlation to be NA). Instead, R² is set to 0 in such cases.

8. print.frm():

  • frm objects can now be printed directly to the console in a user-friendly format.

9. clip_predictions():

  • New utility function for clipping predicted RTs to be within a sensible range. Used internally by train_frm(), predict.frm() and adjust_frm().

10. get_predictors():

  • Added arguments base and adjust to control whether predictors for the base model, the adjustment model or both should be returned.

Bugfixes:

1. Interaction terms generated by preprocess_data() are now generated

correctly as product of the involved features instead of a division. This

follows common practice in regression modeling and avoids division by zero

issues. Passing older models, trained with division-based interaction terms,

to downstream functions like predict.frm() or adjust_frm() will now lead

to an error. (This is not a breaking change, as predict.frm() and friends

have in fact never been able to handle such models).

2. plot_frm() with type "scatter.cv.adj" or "scatter.train.adj" now correctly

shows retention times from the new data (used for model adjustment) as x-axis

values instead of the original training retention times.

3. catf() now only emits escape codes (i.e. colored output), it the output is

directed to a terminal. If the output is redirected to a file or a pipe, no

escape codes are emitted anymore. Since catf() is used throughout the

package for logging, this fixes the output for the whole package.

Internal Improvements:

1. Added or improved unit tests for:

  • adjust_frm()
  • fit_gbtree()
  • fit_glmnet()
  • get_param_grid()
  • get_predictors()
  • getCDs()
  • plot_frm()
  • predict_frm()
  • preprocess_data()
  • selective_measuring()
  • train_frm()
  • validate_inputdata()

2. Removed caret dependency by adding custom implementations for:

  • createFolds()
  • nearZeroVar()

3. Extract mapping and merging part of adjust_frm() into a private function

merge_dfs().

4. Replaced fit_glmnet(), fit_lasso() and fit_ridge() with a single

function fit_glmnet(), that takes the method ("lasso" or "ridge") as

parameter. Instead of a dataframe df that has to contain only predictors

plus the RT column (as reponse), the function now takes a matrix of

predictors X and a vector of responses y. This makes the function more

flexible and easier to test.

5. Replaced fit_gbtree_grid() with a much simpler function

find_params_best(). Instead of allowing the specification of every grid

parameter, the new function instead accepts a keyword searchspace for

specifying predefined grids to choose from.

6. Improved fit_gbtree by exposing lots of hardcoded internal xgboost

parameters as function parameters with sensible defaults. In particular, the

user can now set xpar to "default", "rpopt" or a predefined grid-size to

train the model with different hyperparameter settings. Furthermore, the

function is now written in a way that works with both, version 1.7.9.1 and

the new 3.1.2.1 version published on 2025/12/03 (yes, version 2.x was skipped

completely).

7. Added helper function get_param_grid() for returning predefined

hyperparameter grids for xgboost model training based on keywords like

"tiny", "small" or "large".

8. Added function benchmark_find_params() to benchmark runtime of

find_params_best() for different numbers of cores and/or threads. As it

turns out, choosing a higher number of cores is usually more efficient (at

the cost of worse progress output).

9. Added utility functions named(), as_str(), is_valid_smiles() and

as_canonical()

From NEWS.md in the release

Install

Health

CRAN checks
5NOTE8OK
Check messages
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names:
  FastRet/R/server.R (.Names: 1)
'.Names' should be changed to 'names'.

CRAN check page ↗

Slowest check: 1.9 min · r-oldrel-windows-x86_64
Status changes
  • NOTE8 OK, 5 NOTENow
  • NOTE10 OK, 3 NOTE2026-07-16
  • OK13 OK2026-07-14
  • ERROR12 OK, 1 ERROR2026-07-10
  • OK13 OK2026-05-26
  • ERROR12 OK, 1 ERROR2026-05-24
Show 3 earlier changesHide 3 earlier changes
  • OK14 OK2026-04-06
  • ERROR13 OK, 1 ERROR2026-04-04
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.3.0
READMEYes · 274 wordsVignettes· In the repository, left out of the releaseNEWSYes · 100% structured · mentions 1.3.0Citation fileNoWebsiteYes · pkgdown
Help pages
29 (14 internal)
Examples that run
96%27 run in a plain check (1 of them under a condition) · 1 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
100%
Documented parameters
96%
Return-value docs
93%
Help pages citing references
3%

Downloads

3.1K
CRAN downloads in the past year
Rank #10,750 · ~8/day · ~258/mo
Daily download trend is not available in this view yet.
35630 days
97190 days
3.1K1 year
Compare downloads with other packages →
Also on109 r2u1 autocran

Repository

2Stars
0Forks
0Open issues
0Open PRs
7Releases
80Commits
1Commit identities
data-sciencelcms
80 commits · Last activity 2026-10-05 · Default branch at 1.5.2, ahead of CRAN 1.3.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
93%
Median days to close, 50 most recently updated closed issues
52
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-06-08 · 22026-07-07 · 2
PracticesBeta

9 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/spang-lab/fastret on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-10-05 · The repository has a site deploy workflow

pkgdown site last built 2026-10-05

Coverage (1)
Coverage reporting (Codecov)
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 1 practice
Lint, format, editor (1)
lintr
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2025-09-22
    Seen in the repository: .github/copilot-instructions.md
    Pull request: opened by its own account
  • Claude Codefirst seen 2026-06-12
    Seen in the repository: CLAUDE.md
How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
32 external dependencies (excludes base and recommended)

Installing FastRet adds 76 packages (37 with compiled code, 90 MB of source tarballs). Heaviest: rcdklibs 19 MB, stringi 11 MB, ggplot2 6.0 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (6)
Author, Maintainer since 1.1.3 (2024), Copyright holder
Author, Copyright holder
Author, Copyright holder
Contributor, Copyright holder
Thesis advisor, Copyright holder
Thesis advisor, Copyright holder
Releases (3)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.3.0Latest
    record
    2025-12-18 · current release · diff ↗ ·
    removed 3 exports
    getCDsFor1Molecule, get_cache_dir, ram_cache
    added 3 exports
    as_canonical, clip_predictions, plot_frm
  • R
    R 4.5.0 released · 2025-04-11
  • unarchivedReturned to CRAN
    2025-02-10
  • 1.1.4
    record
    2025-02-10 · diff ↗ ·
    removed 2 exports
    check_lm_suitability, plot_lm_suitability
  • archivedRemoved from CRAN
    2024-07-09
    policy violation Does not clean up usage of ~/.R.cache
  • 1.1.3
    record
    2024-06-25
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2024-06-25
Total releases
3 / 2 yrs
License
GPL-3 OSI
Minimum R
≥ 4.1.0
Bundled data
7.6 KB / 1 file
Download size
1.3 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("FastRet")
Schmidt, T., Amesoeder, C., Dettmer, K., Fadil, F., Oefner, P., & Schoen, M. (2025). FastRet: Retention Time Prediction in Liquid Chromatography (Version 1.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.FastRet

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for FastRet version 1.3.0 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy