Description Usage Arguments Value Author(s) See Also Examples
Creates a sparseMatrix
object which has an activity value for each distinct target identifier rather than each distinct assay. Users can optionally choose how replicates are resolved. By default active scores always take preference over inactives: if any assay for a given target vs compound combination shows active, this combination will be marked active in the resulting object.
Either binary activity categories or scalar numeric scores can be used. When used with numeric data, this will create a Z-score compound vs. target matrix similar to High Throughput Screening Fingerprints (HTSFPs).
This function is not designed for single assays with multiple targets, and if they are present only one of the targets will be considered.
1 2 3 | perTargetMatrix(assays, inactives = TRUE, assayTargets = FALSE,
targetOrder = FALSE, summarizeReplicates = "activesFirst",
useNumericScores = FALSE)
|
assays |
A |
inactives |
A logical value. Include both active and inactive scores. If FALSE only active scores are returned. This is only used if |
assayTargets |
Provide a custom merge table of target identifiers for each assay. For example, if you have clustered the targets of many assays into bins you can here merge by common clusters instead of distinct targets. This must be vector of class |
targetOrder |
An optional |
summarizeReplicates |
Optionally allows users to choose how replicates (multiple assays sharing common compounds and targets) are resolved if they disagree. If 'activesFirst' any active score will take precedence over an inactive. If 'mode' the resulting score will be computed according to the statistical mode using |
useNumericScores |
A logical value. Use numeric score rather than binary data to create a scalar compound vs. target
matrix. When used with the output of |
When used with useNumericScores = FALSE
a sparseMatrix
which contains a value of 2 for each target vs compound combination which shows activity in at least one parent assay, a value of 1 for inactive combinations, and a value of zero for untested or ambiguous values.
Note that this is different from older versions of bioassayR (1.6 and older) which used to return a value of 1 for actives and did not have the option to process inactives.
When used with useNumericScores = TRUE
the raw numeric scores are returned, with replicates summarized as specified with the summarizeReplicates
option.
Tyler William H Backman
Functions: scaleBioassaySet
, getAssays
, bioactivityFingerprint
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## connect to a test database
extdata_dir <- system.file("extdata", package="bioassayR")
sampleDatabasePath <- file.path(extdata_dir, "sampleDatabase.sqlite")
sampleDB <- connectBioassayDB(sampleDatabasePath)
## option 1: retrieve all data for three compounds
assays <- getBioassaySetByCids(sampleDB, c("2244","3715","133021"))
assays
## option 2: retrieve all data for three assays
assays <- getAssays(sampleDB, c("673509","103","105"))
assays
## collapse assays into perTargetMatrix
targetMatrix <- perTargetMatrix(assays)
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.