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

Description Usage Arguments Value Author(s) Examples

View source: R/queries.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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)

Example output

Loading required package: DBI
Loading required package: RSQLite
Loading required package: Matrix
Loading required package: rjson
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:Matrix':

    colMeans, colSums, rowMeans, rowSums, which

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min


Attaching package: 'bioassayR'

The following objects are masked from 'package:BiocGenerics':

    organism, organism<-

bioassayR documentation built on March 1, 2021, 2 a.m.