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

View source: R/queries.R

screenedAtLeastR Documentation

Return all compounds in the database screened at least 'minTargets' times.

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

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

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

TylerBackman/bioassayR documentation built on April 27, 2022, 6:47 a.m.