Skip to content

Commit ecb5eaa

Browse files
zachcpegonw
andauthored
20250910 vbump (#156)
* - fix links to fingerprint package and update the docs * Add Egon and bump version * Fix a few test fns and lints * update news file and Cran comments for submission * update cache * http->https URL Updates * update description and Vignetter * ignore the vignette that uses depict, which is not on CRAN and is causing problems * add cran * Clean build * simplify examples for CRAN tests * Remove expensive tests when on CRAN * Using MACCs in our examples to speed calculation * update cran_comments * update the linux CRAN detection * fix one more URL * update CRAN submission markdown * fix: URL moved permanently * fix: set CPUs to 1 inside of CHECK environments * fix: run all tests during the check now that CPU usage has been limited in CHECK envs * fix update CRAN submission docs * spelling * update the date * Correct first name * Setup JAVA for single threaded testing to avoid triggering warning on CRAN * prep for resubmission * rebuild docs --------- Co-authored-by: Egon Willighagen <egon.willighagen@gmail.com>
1 parent 8d194fa commit ecb5eaa

42 files changed

Lines changed: 377 additions & 283 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
shell: Rscript {0}
4747

4848
- name: Cache R packages
49-
uses: actions/cache@v2
49+
uses: actions/cache@v4
5050
with:
5151
path: ${{ env.R_LIBS_USER }}
5252
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ knitr::opts_chunk$set(
1111
)
1212
```
1313

14-
[![Build Status](https://api.travis-ci.org/CDK-R/cdkr.svg?branch=master)](https://travis-ci.org/CDK-R/cdkr)
14+
1515
[![CRAN Version](https://www.r-pkg.org/badges/version/rcdk?color=green)](https://cran.r-project.org/package=rcdk)
1616
[![CRAN Downloads](http://cranlogs.r-pkg.org/badges/grand-total/rcdk?color=green)](https://cran.r-project.org/package=rcdk)
1717
[![CRAN Downloads Monthyl](http://cranlogs.r-pkg.org/badges/last-month/rcdk?color=green)](https://cran.r-project.org/package=rcdk)

rcdk/.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
^pkgdown$
77
^revdep$
88
README.Rmd
9+
vignettes/Features_29.Rmd
10+
^doc$
11+
^Meta$

rcdk/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ revdep/
55
.Rhistory
66
.Rproj
77
*.Rmd
8-
*.png
8+
*.png
9+
/doc/
10+
/Meta/

rcdk/DESCRIPTION

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
Package: rcdk
2-
Version: 3.9.0
3-
Date: 2024-03-02
2+
Version: 3.8.2
3+
Date: 2025-11-30
44
Title: Interface to the 'CDK' Libraries
55
Authors@R: c(
66
person('Rajarshi', 'Guha', ,'rajarshi.guha@gmail.com', role=c('aut',"cph"),
77
comment = c(ORCID = "0000-0001-7403-8819")),
8-
person('Zachary', 'Charlop-Powers', ,'zach.charlop.powers@gmail.com',role=c('cre'),
8+
person('Zachary', 'Charlop-Powers', ,'zach.charlop.powers@gmail.com',role=c('cre'),
99
comment = c(ORCID = "0000-0001-8816-4680")),
10-
person('Emma', 'Schymanski', ,'schymane@gmail.com', role=c('ctb'),
11-
comment = c(ORCID = "0000-0001-6868-8145")))
10+
person('Emma', 'Schymanski', ,'schymane@gmail.com', role=c('ctb'),
11+
comment = c(ORCID = "0000-0001-6868-8145")),
12+
person('Egon', 'Willighagen', ,'egon.willighagen@maastrichtuniversity.nl', role=c('ctb'),
13+
comment = c(ORCID = "0000-0001-7542-0286")))
1214
Depends:
1315
rcdklibs (>= 2.9)
1416
Imports:
@@ -23,19 +25,18 @@ Suggests:
2325
RUnit,
2426
knitr,
2527
rmarkdown,
26-
devtools,
27-
depict
28+
devtools
2829
License: LGPL
2930
URL: https://github.com/CDK-R/cdkr
3031
LazyLoad: yes
3132
LazyData: true
3233
SystemRequirements: Java (>= 8)
3334
BugReports: https://github.com/CDK-R/cdkr/issues
3435
Description: Allows the user to access functionality in the
35-
'CDK', a Java framework for chemoinformatics. This allows the user to load
36+
'CDK', a Java framework for cheminformatics. This allows the user to load
3637
molecules, evaluate fingerprints, calculate molecular descriptors and so on.
3738
In addition, the 'CDK' API allows the user to view structures in 2D.
38-
RoxygenNote: 7.3.1
39+
RoxygenNote: 7.3.3
3940
VignetteBuilder: knitr
4041
Encoding: UTF-8
41-
Remotes: CDK-R/depict
42+

rcdk/NEWS.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# rcdk 3.9.0
1+
# rcdk 3.8.2
22

3-
* Update rCDK to work with rcdklibs 2.9
3+
* Update rCDK to work with rcdklibs 2.11
44

55
# rcdk 3.8.0
66

@@ -13,9 +13,11 @@
1313
* Update rCDK to work with rcdklibs 2.8
1414

1515

16+
17+
1618
# rcdk 3.6.0
1719

18-
* Fix code to handle changes to JDK17. Notably, I needed to reduce the use of the J notation in a nubmer of places in favor of direct calls.
20+
* Fix code to handle changes to JDK17. Notably, I needed to reduce the use of the J notation in a number of places in favor of direct calls.
1921
* formally deprecated `do.typing` in favor of `set.atom.types`
2022
* Updated handling of atomic descriptors to resolve a name mismatch bug
2123
* Added a test case for atomic descriptors (thanks to Francesca Di Cesare)
@@ -30,7 +32,7 @@
3032

3133
# rcdk 3.5.0
3234

33-
* update to RCDKlibs 2.3. This changes uderlying AtomContainer defualt to Atomcontainer2 and also has new support for mass spec mass functions. On the rcdk side we have moved to a tidyverse documentation and build system.
35+
* update to RCDKlibs 2.3. This changes underlying AtomContainer default to Atomcontainer2 and also has new support for mass spec mass functions. On the rcdk side we have moved to a tidyverse documentation and build system.
3436

3537
# rcdk 3.4.7
3638

rcdk/R/deprecated_functions.R

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
################################################################################
22
#' Deprecated functions in the rcdk package.
3-
#'
3+
#'
44
#' These functions are provided for compatibility with older version of
55
#' the phyloseq package. They may eventually be completely
66
#' removed.
7-
#'
7+
#'
88
#' @usage deprecated_rcdk_function(x, value, ...)
99
#' @rdname rcdk-deprecated
1010
#' @name rcdk-deprecated
1111
#' @param x For assignment operators, the object that will undergo a replacement
1212
#' (object inside parenthesis).
13-
#' @param value For assignment operators, the value to replace with
13+
#' @param value For assignment operators, the value to replace with
1414
#' (the right side of the assignment).
15-
#' @param ... For functions other than assignment operators,
15+
#' @param ... For functions other than assignment operators,
1616
#' parameters to be passed to the modern version of the function (see table).
17-
#' @docType package
1817
#' @export do.typing
1918
#' @aliases deprecated_rcdk_function do.typing
2019
#' @details
@@ -24,4 +23,4 @@
2423
#'
2524
deprecated_rcdk_function <- function(x, value, ...){return(NULL)}
2625
do.typing <- function(...){.Deprecated("set.atom.types", package="rcdk");return(set.atom.types(...))}
27-
################################################################################
26+
################################################################################

rcdk/R/fingerprint.R

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#' Generate molecular fingerprints
2-
#'
2+
#'
33
#' `get.fingerprint` returns a `fingerprint` object representing molecular fingerprint of
44
#' the input molecule.
5-
#'
5+
#'
66
#' @param molecule A \code{jobjRef} object to an \code{IAtomContaine}
77
#' @param type The type of fingerprint. Possible values are:
88
#' \itemize{
@@ -18,52 +18,50 @@
1818
#' \item pubchem - 881 bit fingerprints defined by PubChem
1919
#' \item kr - 4860 bit fingerprint defined by Klekota and Roth
2020
#' \item shortestpath - A fingerprint based on the shortest paths between pairs of atoms and takes into account ring systems, charges etc.
21-
#' \item signature - A feature,count type of fingerprint, similar in nature to circular fingerprints, but based on the signature
21+
#' \item signature - A feature,count type of fingerprint, similar in nature to circular fingerprints, but based on the signature
2222
#' descriptor
2323
#' \item circular - An implementation of the ECFP6 (default) fingerprint. Other circular types can be chosen by modifying the \code{circular.type} parameter.
2424
#' \item substructure - Fingerprint based on list of SMARTS pattern. By default a set of functional groups is tested.
2525
#' }
2626
#' @param fp.mode The style of fingerprint. Specifying "`bit`" will return a binary fingerprint,
27-
#' "`raw`" returns the the original representation (usually sequence of integers) and
27+
#' "`raw`" returns the the original representation (usually sequence of integers) and
2828
#' "`count`" returns the fingerprint as a sequence of counts.
2929
#' @param depth The search depth. This argument is ignored for the
3030
#' `pubchem`, `maccs`, `kr` and `estate` fingerprints
31-
#' @param size The final length of the fingerprint.
32-
#' This argument is ignored for the `pubchem`, `maccs`, `kr`, `signature`, `circular` and
31+
#' @param size The final length of the fingerprint.
32+
#' This argument is ignored for the `pubchem`, `maccs`, `kr`, `signature`, `circular` and
3333
#' `estate` fingerprints
3434
#' @param substructure.pattern List of characters containing the SMARTS pattern to match. If the an empty list is provided (default) than the functional groups substructures (default in CDK) are used.
3535
#' @param circular.type Name of the circular fingerprint type that should be computed given as string. Possible values are: 'ECFP0', 'ECFP2', 'ECFP4', 'ECFP6' (default), 'FCFP0', 'FCFP2', 'FCFP4' and 'FCFP6'.
3636
#' @param verbose Verbose output if \code{TRUE}
37-
#' @return an S4 object of class \code{\link{fingerprint-class}} or \code{\link{featvec-class}},
37+
#' @return an S4 object of class \code{\link[fingerprint]{fingerprint-class}} or \code{\link[fingerprint]{featvec-class}},
3838
#' which can be manipulated with the fingerprint package.
3939
#' @export
4040
#' @author Rajarshi Guha (\email{rajarshi.guha@@gmail.com})
41-
#' @examples
41+
#' @examples
4242
#' ## get some molecules
43-
#' sp <- get.smiles.parser()
44-
#' smiles <- c('CCC', 'CCN', 'CCN(C)(C)', 'c1ccccc1Cc1ccccc1','C1CCC1CC(CN(C)(C))CC(=O)CC')
43+
#' smiles <- c('CCC', 'CCN')
4544
#' mols <- parse.smiles(smiles)
46-
#'
47-
#' ## get a single fingerprint using the standard
48-
#' ## (hashed, path based) fingerprinter
49-
#' fp <- get.fingerprint(mols[[1]])
50-
#'
51-
#' ## get MACCS keys for all the molecules
45+
#'
46+
#' ## get a single fingerprint using MACCS (fast)
47+
#' fp <- get.fingerprint(mols[[1]], type='maccs')
48+
#'
49+
#' ## get MACCS keys for both molecules
5250
#' fps <- lapply(mols, get.fingerprint, type='maccs')
53-
#'
51+
#'
5452
#' ## get Signature fingerprint
5553
#' ## feature, count fingerprinter
5654
#' fps <- lapply(mols, get.fingerprint, type='signature', fp.mode='raw')
5755
#' ## get Substructure fingerprint for functional group fragments
5856
#' fps <- lapply(mols, get.fingerprint, type='substructure')
59-
#'
57+
#'
6058
#' ## get Substructure count fingerprint for user defined fragments
6159
#' mol1 <- parse.smiles("c1ccccc1CCC")[[1]]
6260
#' smarts <- c("c1ccccc1", "[CX4H3][#6]", "[CX2]#[CX2]")
6361
#' fps <- get.fingerprint(mol1, type='substructure', fp.mode='count',
6462
#' substructure.pattern=smarts)
65-
#'
66-
#' ## get ECFP0 count fingerprints
63+
#'
64+
#' ## get ECFP0 count fingerprints
6765
#' mol2 <- parse.smiles("C1=CC=CC(=C1)CCCC2=CC=CC=C2")[[1]]
6866
#' fps <- get.fingerprint(mol2, type='circular', fp.mode='count', circular.type='ECFP0')
6967
get.fingerprint <- function(molecule, type = 'standard', fp.mode = 'bit', depth=6, size=1024, substructure.pattern=character(), circular.type = "ECFP6", verbose=FALSE) {
@@ -75,17 +73,17 @@ get.fingerprint <- function(molecule, type = 'standard', fp.mode = 'bit', depth=
7573

7674
mode(size) <- 'integer'
7775
mode(depth) <- 'integer'
78-
76+
7977
# Determine integer ID for the circular fingerprint given its desired type.
80-
# This allows us to use also ECFP4, ...
78+
# This allows us to use also ECFP4, ...
8179
if (type == 'circular') {
82-
circular.type.id <- switch(circular.type,
80+
circular.type.id <- switch(circular.type,
8381
ECFP0 = 1, ECFP2 = 2, ECFP4 = 3, ECFP6 = 4,
8482
FCFP0 = 5, FCFP2 = 6, FCFP4 = 7, FCFP6 = 8,
8583
NULL)
86-
84+
8785
if (is.null(circular.type.id)) stop(paste('Invalid circular fingerprint type: ', circular.type))
88-
86+
8987
mode(circular.type.id) <- 'integer'
9088
}
9189

@@ -103,8 +101,8 @@ get.fingerprint <- function(molecule, type = 'standard', fp.mode = 'bit', depth=
103101
shortestpath = .jnew('org/openscience/cdk/fingerprint/ShortestPathFingerprinter', size),
104102
signature = .jnew('org/openscience/cdk/fingerprint/SignatureFingerprinter', depth),
105103
circular = .jnew('org/openscience/cdk/fingerprint/CircularFingerprinter', circular.type.id),
106-
substructure =
107-
if (length(substructure.pattern) == 0)
104+
substructure =
105+
if (length(substructure.pattern) == 0)
108106
# Loads the default group substructures
109107
{ .jnew('org/openscience/cdk/fingerprint/SubstructureFingerprinter') }
110108
else
@@ -125,11 +123,11 @@ get.fingerprint <- function(molecule, type = 'standard', fp.mode = 'bit', depth=
125123
} else if (fp.mode == 'count') {
126124
jfp <- .jcall(fingerprinter,
127125
"Lorg/openscience/cdk/fingerprint/ICountFingerprint;",
128-
"getCountFingerprint", molecule, check=FALSE)
126+
"getCountFingerprint", molecule, check=FALSE)
129127
}
130-
128+
131129
e <- .jgetEx()
132-
if (.jcheck(silent=TRUE)) {
130+
if (.jcheck(silent=TRUE)) {
133131
if (verbose) print(e)
134132
return(NULL)
135133
}
@@ -139,15 +137,15 @@ get.fingerprint <- function(molecule, type = 'standard', fp.mode = 'bit', depth=
139137

140138
if (fp.mode == 'bit') {
141139
bitset <- .jcall(jfp, "Ljava/util/BitSet;", "asBitSet")
142-
140+
143141
if (type == 'maccs') nbit <- 166
144142
else if (type == 'estate') nbit <- 79
145143
else if (type == 'pubchem') nbit <- 881
146144
else if (type == 'kr') nbit <- 4860
147145
else if (type == 'substructure') nbit <- .jcall(fingerprinter, "I", "getSize")
148146
else if (type == 'circular') nbit <- .jcall(fingerprinter, "I", "getSize")
149147
else nbit <- size
150-
148+
151149
bitset <- .jcall(bitset, "S", "toString")
152150
s <- gsub('[{}]','', bitset)
153151
s <- strsplit(s, split=',')[[1]]
@@ -166,7 +164,7 @@ get.fingerprint <- function(molecule, type = 'standard', fp.mode = 'bit', depth=
166164
tempkey <- .jsimplify(tempkey)
167165
}
168166
keys[[i]] <- tempkey
169-
167+
170168
}
171169

172170
values <- list()

rcdk/R/formula.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ generate.formula <- function(mass,
528528
#' @param tol The tolerance
529529
#' @return A \code{jobjRef} corresponding to an instance of \code{IsotopePatternSimilarity}
530530
#' @seealso \code{\link{compare.isotope.pattern}}
531-
#' @references \url{http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/formula/IsotopePatternSimilarity.html}
531+
#' @references \url{https://cdk.github.io/cdk/2.10/docs/api/org/openscience/cdk/formula/IsotopePatternSimilarity.html}
532532
#' @author Miguel Rojas Cherto
533533
get.isotope.pattern.similarity <- function(tol = NULL) {
534534
ips <- .jnew("org/openscience/cdk/formula/IsotopePatternSimilarity")
@@ -544,7 +544,7 @@ get.isotope.pattern.similarity <- function(tol = NULL) {
544544
#'
545545
#' @param minAbundance The minimum abundance
546546
#' @return A \code{jobjRef} corresponding to an instance of \code{IsotopePatternGenerator}
547-
#' @references \url{http://cdk.github.io/cdk/1.5/docs/api/org/openscience/cdk/formula/IsotopePatternGenerator.html}
547+
#' @references \url{https://cdk.github.io/cdk/2.10/docs/api/org/openscience/cdk/formula/IsotopePatternGenerator.html}
548548
#' @author Miguel Rojas Cherto
549549
get.isotope.pattern.generator <- function(minAbundance = NULL) {
550550
if (is.null(minAbundance))
@@ -564,7 +564,7 @@ get.isotope.pattern.generator <- function(minAbundance = NULL) {
564564
#' @return A numeric value between 0 and 1 indicating the similarity between the two patterns
565565
#' @seealso \code{\link{get.isotope.pattern.similarity}}
566566
#' @export
567-
#' @references \url{http://cdk.github.io/cdk/2.3/docs/api/org/openscience/cdk/formula/IsotopePatternSimilarity.html}
567+
#' @references \url{https://cdk.github.io/cdk/2.10/docs/api/org/openscience/cdk/formula/IsotopePatternSimilarity.html}
568568
#' @author Miguel Rojas Cherto
569569
compare.isotope.pattern <- function(iso1, iso2, ips = NULL) {
570570
cls <- unique(c(class(iso1), class(iso2)))

rcdk/R/frags.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#' `frameworks`. Each of these elements is either a character vector of SMILES strings or a list of
2323
#' `IAtomContainer` objects.
2424
#' @author Rajarshi Guha (\email{rajarshi.guha@@gmail.com})
25-
#' @seealso [get.exhuastive.fragments()]
25+
#' @seealso [get.exhaustive.fragments()]
2626
#' @export
2727
#' @examples
2828
#' mol <- parse.smiles('c1ccc(cc1)CN(c2cc(ccc2[N+](=O)[O-])c3c(nc(nc3CC)N)N)C')[[1]]

0 commit comments

Comments
 (0)