diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | DESCRIPTION | 4 | ||||
-rw-r--r-- | GNUmakefile | 2 | ||||
-rw-r--r-- | R/chent.R | 2 | ||||
-rw-r--r-- | test.log | 11 | ||||
-rw-r--r-- | tests/testthat/test_pai.R | 8 |
6 files changed, 26 insertions, 13 deletions
@@ -1,3 +1,15 @@ +commit 65c481910d65f6935b7f52450ea809586e71d384 +Author: Johannes Ranke <jranke@uni-bremen.de> +Date: 2016-10-13 10:08:32 +0200 + + Do not fail if PythonInR is not installed + +commit 7517eb0ed1a66488b937c039d4bcadefeff6b479 +Author: Johannes Ranke <jranke@uni-bremen.de> +Date: 2016-10-08 03:07:50 +0200 + + Add a method to write cropped pdf files + commit d22214d9f1b17bd3ab2febe810ab996bebb01410 Author: Johannes Ranke <jranke@uni-bremen.de> Date: 2016-09-28 08:56:57 +0200 diff --git a/DESCRIPTION b/DESCRIPTION index 11a63f8..bc02e64 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: chents Type: Package Title: Chemical Entities as R Objects -Version: 0.2-3 -Date: 2016-10-07 +Version: 0.2-4 +Date: 2016-10-13 Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "jranke@uni-bremen.de")) Description: Utilities for dealing with chemical entities and associated diff --git a/GNUmakefile b/GNUmakefile index 76339e7..c22ff44 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -5,6 +5,8 @@ TGZ := $(PKGNAME)_$(PKGVERS).tar.gz R_HOME ?= $(shell R RHOME) DATE := $(shell date +%Y-%m-%d) +all: install + .PHONEY: usage check clean roxygen sd usage: @@ -89,7 +89,7 @@ chent <- R6Class("chent", try_pubchem = function(identifier) { message("PubChem:") if (missing(identifier)) identifier <- self$identifier - pubchem_cids = webchem::get_cid(identifier) + pubchem_cids = webchem::get_cid(identifier)[[identifier]] if (is.na(pubchem_cids[1])) { message("Query ", identifier, " did not give results at PubChem") @@ -1,23 +1,22 @@ Loading chents Loading required package: testthat - +Testing chents +Generation of chent objects: Initialize Python Version 2.7.9 (default, Jun 29 2016, 13:11:10) [GCC 4.9.2] -Testing chents -Generation of chent objects: Trying to get chemical information from RDKit using user SMILES +Trying to get chemical information from RDKit using user SMILES CCCCCCCCO ...... Generation of pai objects: alanwood.net: Querying glyphosate.html PubChem: -http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/glyphosate/cids/JSON -No encoding supplied: defaulting to UTF-8. +http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON Found 1 entries in PubChem, using the first one. http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,ExactMass,MonoisotopicMass,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount,RotatableBondCount,HeavyAtomCount,IsotopeAtomCount,AtomStereoCount,DefinedAtomStereoCount,UndefinedAtomStereoCount,BondStereoCount,DefinedBondStereoCount,UndefinedBondStereoCount,CovalentUnitCount,Volume3D,XStericQuadrupole3D,YStericQuadrupole3D,ZStericQuadrupole3D,FeatureCount3D,FeatureAcceptorCount3D,FeatureDonorCount3D,FeatureAnionCount3D,FeatureCationCount3D,FeatureRingCount3D,FeatureHydrophobeCount3D,ConformerModelRMSD3D,EffectiveRotorCount3D,ConformerCount3D,Fingerprint2D/JSON http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON Trying to get chemical information from RDKit using PubChem_Canonical SMILES C(C(=O)O)NCP(=O)(O)O -........ +....... DONE =========================================================================== diff --git a/tests/testthat/test_pai.R b/tests/testthat/test_pai.R index 944ad04..1718a9a 100644 --- a/tests/testthat/test_pai.R +++ b/tests/testthat/test_pai.R @@ -1,8 +1,8 @@ context("Generation of pai objects") glyphosate <- pai$new("glyphosate", chyaml = FALSE) - -test_that("We can generate a pai object from its ISO common name", { + +test_that("a pai object is generated from its ISO common name", { expect_equivalent(glyphosate$alanwood$cas, "1071-83-6") expect_equivalent(glyphosate$alanwood$formula, "C3H8NO5P") expect_equivalent(glyphosate$alanwood$iupac_name, "N-(phosphonomethyl)glycine") @@ -12,8 +12,8 @@ test_that("We can generate a pai object from its ISO common name", { expect_equal(glyphosate$inchikey, ik) }) -test_that("RDKit information was added", { - expect_equivalent(glyphosate$rdkit$mw, 169.073) +test_that("a pai object is generated from an ambiguous name", { + deltamethrin <- pai$new("deltamethrin", chyaml = FALSE) }) test_that("PubChem information was added via webchem", { |