Learn R Programming

PubChemR (version 2.0.1)

get_assays: 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
)

Value

An object of class 'PubChemInstanceList' containing the information retrieved from the PubChem database.

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).

See Also

retrieve, instance

Examples

Run this code
# 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")

Run the code above in your browser using DataLab