screenedAtLeast: Return all compounds in the database screened at least...

Description Usage Arguments Value Author(s) Examples

View source: R/queries.R

Description

Returns all compound cids screened against at least 'minTargets' distinct target identifiers. For a very large database (such as PubChem Bioassay) this function may take a long time to run.

Usage

1
screenedAtLeast(database, minTargets, inconclusives=TRUE)

Arguments

database

A BioassayDB database to query.

minTargets

The minimum number of distinct targets for each returned cid.

inconclusives

Logical. If TRUE (the default) screening results with inconclusive (NA) are counted towards minTargets. If FALSE only active and inactive results are counted.

Value

Returns a character vector of all CIDs meeting the specified criteria.

Author(s)

Tyler Backman

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## connect to a test database
extdata_dir <- system.file("extdata", package="bioassayR")
sampleDatabasePath <- file.path(extdata_dir, "sampleDatabase.sqlite")
sampleDB <- connectBioassayDB(sampleDatabasePath)

## get all CIDS screened against at least 2 distinct targets
highlyScreened <- screenedAtLeast(sampleDB, 2)
highlyScreened

## get all CIDS screened against at least 2 distinct targets with conclusive results
highlyScreened <- screenedAtLeast(sampleDB, 2, inconclusives=FALSE)
highlyScreened

## disconnect from database
disconnectBioassayDB(sampleDB)

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