get_assays {PubChemR} | R Documentation |
Retrieve Assays from PubChem
Description
This function sends a request to PubChem to retrieve assay data based on the specified parameters.
Usage
get_assays(
identifier,
namespace = "aid",
operation = NULL,
searchtype = NULL,
options = NULL
)
Arguments
identifier |
A vector of positive integers (e.g., cid, sid, aid) or identifier strings (source, inchikey, formula). In some cases, only a single identifier string (name, smiles, xref; inchi, sdf by POST only) can be provided. Multiple elements can be included as a vector. See Notes for details. |
namespace |
Specifies the namespace for the query. For the 'compound' domain, possible values include 'cid', 'name', 'smiles', 'inchi', 'sdf', 'inchikey', 'formula', 'substructure', 'superstructure', 'similarity', 'identity', 'xref', 'listkey', 'fastidentity', 'fastsimilarity_2d', 'fastsimilarity_3d', 'fastsubstructure', 'fastsuperstructure', and 'fastformula'. For other domains, the possible namespaces are domain-specific. |
operation |
The operation to be performed (default: NULL). |
searchtype |
The type of search to be performed (default: NULL). |
options |
Additional parameters (currently has no effect on the results). |
Value
An object of class 'PubChemInstanceList' containing the information retrieved from the PubChem database.
Note
To extract information about a specific assay from the returned list, use the instance function.
Each assay may include information on several properties. Specific information from the assay can be extracted using the retrieve function. See examples.
See Also
Examples
# Retrieve a list of assays from the PubChem database
assays <- get_assays(
identifier = c(1234, 7815),
namespace = 'aid'
)
# Return assay information for assay ID '1234'
assay1234 <- instance(assays, "1234")
print(assay1234)
# Retrieve specific elements from the assay output
retrieve(assay1234, "aid")