Description Usage Arguments Value Author(s) References See Also Examples
This computes tanimoto similarity coefficients between bioactivity profiles in a sparse matrix
aware way, where only commonly tested targets are considered. The computation is trinary in that
each compound is a column in a compound vs target matrix with three possible values
(2=active, 1=inactive, 0=untested or inconclusive) as generated by the perTargetMatrix
function.
A comparison will return a value of NA unless one of the two minimum thresholds is satisfied,
either a minimum number of shared screened targets, or a minimum number of shared active targets
as performed in Dancik, V. et al. (see references).
1 2 | trinarySimilarity(queryMatrix, targetMatrix,
minSharedScreenedTargets = 12, minSharedActiveTargets = 3)
|
queryMatrix |
This is a compound vs. target sparse matrix representing the bioactivity profiles for one
compounds across one or more assays or targets. The format must be a
|
targetMatrix |
This is a compound vs. target sparse matrix representing the bioactivity profiles for one or more
compounds across one or more assays or targets. The format must be
|
minSharedScreenedTargets |
A |
minSharedActiveTargets |
A |
A numeric
vector where each element represents the tanimoto similarity between
the queryMatrix
and a given row in the targetMatrix
where only the shared
set of commonly screened targets is considered. If both the minSharedScreenedTargets
and minSharedActiveTargets
thresholds are unsatisfied, an NA
will be returned for the
given similarity value.
An NA
will also be returned if the tanimoto coefficient is undefined due
to a zero in the denominator, which occurs when neither compound was found active
against any of the commonly screened targets.
Tyler Backman
Tanimoto similarity coefficient: Tanimoto TT (1957) IBM Internal Report 17th Nov see also Jaccard P (1901) Bulletin del la Societe Vaudoisedes Sciences Naturelles 37, 241-272.
Dancik, V. et al. Connecting Small Molecules with Similar Assay Performance Profiles Leads to New Biological Hypotheses. J Biomol Screen 19, 771-781 (2014).
perTargetMatrix
getBioassaySetByCids
bioactivityFingerprint
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## connect to a test database
extdata_dir <- system.file("extdata", package="bioassayR")
sampleDatabasePath <- file.path(extdata_dir, "sampleDatabase.sqlite")
sampleDB <- connectBioassayDB(sampleDatabasePath)
## retrieve activity data for three compounds
assays <- getBioassaySetByCids(sampleDB, c("2244","3715","133021"))
## collapse assays into perTargetMatrix
targetMatrix <- perTargetMatrix(assays)
## compute similarity between first column and all columns
queryMatrix <- targetMatrix[,1,drop=FALSE]
trinarySimilarity(queryMatrix, targetMatrix)
## disconnect from sample database
disconnectBioassayDB(sampleDB)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.