allCids: List compound cids in a 'BioassayDB', 'bioassay',...

View source: R/queries.R

allCidsR Documentation

List compound cids in a BioassayDB, bioassay, bioassaySet, or target matrix (dgCMatrix) object

Description

Returns a vector of small molecule cids contained within a BioassayDB, bioassay, bioassaySet, or target matrix (dgCMatrix) object. It can optionally only returned cids labeled as active.

Usage

allCids(inputObject, activesOnly = FALSE)

Arguments

inputObject

A BioassayDB, bioassay, bioassaySet, or target matrix (dgCMatrix) object to query.

activesOnly

logical. Should only active compounds be returned? Defaults to FALSE.

Value

A vector of distinct small molecule cids. No particular order is guranteed.

Author(s)

Tyler Backman

Examples

## connect to a test database
extdata_dir <- system.file("extdata", package="bioassayR")
sampleDatabasePath <- file.path(extdata_dir, "sampleDatabase.sqlite")
sampleDB <- connectBioassayDB(sampleDatabasePath)

## get all compound cids
myCids <- allCids(sampleDB)

## get only active compound cids
activeCids <- allCids(sampleDB, activesOnly = TRUE)

## disconnect from database
disconnectBioassayDB(sampleDB)

girke-lab/bioassayR documentation built on Oct. 22, 2024, 8:13 a.m.