aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorRanke Johannes <johannes.ranke@agroscope.admin.ch>2024-06-20 15:32:48 +0200
committerRanke Johannes <johannes.ranke@agroscope.admin.ch>2024-06-20 15:32:48 +0200
commit5694ab788df7d333cf1d99faac749af360ba08c4 (patch)
tree8f378f4014647bbe4ddcf5d9173bf58fd662df62 /R
parent81dd5ed73a48ba811304ab9211d501b973eb640c (diff)
Use first 27 chars from InChIKey if BCPC returns more
Diffstat (limited to 'R')
-rw-r--r--R/chent.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/chent.R b/R/chent.R
index aee95f0..60c42c4 100644
--- a/R/chent.R
+++ b/R/chent.R
@@ -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) {

Contact - Imprint