NciCactusConn | R Documentation |
biodbNci, a library for connecting to the National Cancer Institute (USA) CACTUS Database. connector class.
biodbNci, a library for connecting to the National Cancer Institute (USA) CACTUS Database. connector class.
Connector class for biodbNci, a library for connecting to the National Cancer Institute (USA) CACTUS Database.
This class implements a connector for accessing the NCI database, using CACTUS services. See https://www.cancer.gov/ and https://cactus.nci.nih.gov/.
biodb::BiodbConnBase
-> biodb::BiodbConn
-> NciCactusConn
new()
New instance initializer. Connector classes must not be instantiated directly. Instead, you must use the createConn() method of the factory class.
NciCactusConn$new(...)
...
All parameters are passed to the super class initializer.
Nothing.
wsChemicalIdentifierResolver()
Calls Chemical Identifier Resolver web service. See https://cactus.nci.nih.gov/chemical/structure_documentation for details.
NciCactusConn$wsChemicalIdentifierResolver( structid, repr, xml = FALSE, retfmt = c("plain", "parsed", "ids", "request") )
structid
The submitted structure identifier.
repr
The wanted representation.
xml
A flag for choosing the format returned by the web service between plain text and XML.
retfmt
Use to set the format of the returned value. 'plain' will return the raw results from the server, as a character value. 'parsed' will return the parsed results, as an XML object. 'request' will return a BiodbRequest object representing the request as it would have been sent. 'ids' will return a character vector containing the IDs of the matching entries.
Depending on retfmt
parameter.
conv()
Calls wsChemicalIdentifierResolver() to convert a list of IDs into another representation.
NciCactusConn$conv(ids, repr)
ids
A character vector containing IDs.
repr
The targeted representation.
A character vector, the same length as ids
, containing
the converted IDs. NA values will be set when conversion is not possible.
convCasToInchi()
Converts a list of CAS IDs into a list of InChI.
NciCactusConn$convCasToInchi(cas)
cas
A character vector containing CAS IDs.
A character vector, the same length as ids
, containing InChI
values or NA values where conversion was not possible.
convCasToInchikey()
Converts a list of CAS IDs into a list of InChI keys.
NciCactusConn$convCasToInchikey(cas)
cas
A character vector containing CAS IDs.
A character vector, the same length as ids
, containing InChI Key
values or NA values where conversion was not possible.
clone()
The objects of this class are cloneable with this method.
NciCactusConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
BiodbConn
.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Get a connector: conn <- mybiodb$getFactory()$createConn('nci.cactus') # Use a database extract in order to avoid the downloading of the whole # database. dbExtract <- system.file("extdata", 'generated', "cactus_extract.txt.gz", package="biodbNci") conn$setPropValSlot('urls', 'db.gz.url', dbExtract) # Get an entry e <- conn$getEntry('749674') # Terminate instance. mybiodb$terminate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.