diff options
author | Ranke Johannes <johannes.ranke@agroscope.admin.ch> | 2024-06-20 15:32:48 +0200 |
---|---|---|
committer | Ranke Johannes <johannes.ranke@agroscope.admin.ch> | 2024-06-20 15:32:48 +0200 |
commit | 5694ab788df7d333cf1d99faac749af360ba08c4 (patch) | |
tree | 8f378f4014647bbe4ddcf5d9173bf58fd662df62 | |
parent | 81dd5ed73a48ba811304ab9211d501b973eb640c (diff) |
Use first 27 chars from InChIKey if BCPC returns more
-rw-r--r-- | DESCRIPTION | 4 | ||||
-rw-r--r-- | R/chent.R | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/DESCRIPTION b/DESCRIPTION index 1895fb9..d933661 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: chents Type: Package Title: Chemical Entities as R Objects -Version: 0.3.4 -Date: 2024-04-07 +Version: 0.3.5 +Date: 2024-06-20 Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "johannes.ranke@jrwb.de")) Description: Utilities for dealing with chemical entities and associated @@ -699,9 +699,9 @@ pai <- R6Class("pai", attr(self$iso, "source") <- "bcpc" attr(self$iso, "status") <- self$bcpc$status bcpc_ik = self$bcpc$inchikey - if (length(bcpc_ik) == 1 && nchar(bcpc_ik) == 27 && !is.na(bcpc_ik)) { + if (length(bcpc_ik) == 1 && !is.na(bcpc_ik)) { if (is.null(self$inchikey)) { - self$inchikey = self$bcpc$inchikey + self$inchikey = substr(self$bcpc$inchikey, 1, 27) attr(self$inchikey, "source") <- "bcpc" } else { if (bcpc_ik == self$inchikey) { |