Description Usage Arguments Details Value Examples
A function takes as an benchmarked interactions object and outputs confusion table statistics.
1 2 | confusionMatrix(interactionsBench, benchCol = "Bench", prefilterCol = NULL,
thresholdID = NULL, thresholdValue = 0.05, statistics = "PPV")
|
interactionsBench |
GInteractions object with added benchmark
|
benchCol |
character (default "Bench"), results of benchmarking procedure; eg a column name of the metadata which indicates the column where the result of benchmarking procedure is stored. A vector of 0's and 1's is expected. |
prefilterCol |
character (default NULL), results of prefiltering procedure; eg a column name of the metadata which indicates the column where the result of prefiltering procedure is stored. A vector of 0's and 1's is expected. |
thresholdID |
character (def:NULL) name which indicates a column where statistics of the modelling procedure is stored. This column is filtered such that everything below predefined threshold is considered to be statistically significant association (set to be equal to 0), whereas everything above that threshold is 0". |
thresholdValue |
numeric (def:0.05) A value of a threshold. |
statistics |
character (def "ConfusionMatrix"). Currentlty, "ConfusionMatrix" or "PPV" are options. |
Reports statistics based on the confusion matrix. There are four different categories in the confusion matrix: TP = (number of) true positive: interactions entry that was reported to be associated (reported gene-enhancer statistics lower than a predefined threshold) and was benchmarked. FP = (number of) false positive: interactions entry that was reported to be associated (reported gene-enhancer statistics lower than a predefined threshold) BUT was not overlapped with benchmark dataset FN = (number of) false negative: interactions entry that was NOT reported to be associated (reported gene-enhancer statistics NOT lower than a predefined threshold) BUT is benchmarked TN = (number of) true negative: interactions entry that was NOT reported to be associated (reported gene-enhancer statistics NOT lower than a predefined threshold) AND is NOT benchmarked. If no benchmark and no statistically significant data is entered, then 0 is reported.
The formulas used in this function are:
Sensitivity = TP/(TP+FN)
Specificity = TN/(TN+FP)
Accuracy = (TP+TN)/(TP+FN+FP+TN)
PPV = TP/(TP+FP)
NPV = TN/(TN+FN)
F1 = (2*TP)/((2*TP)+FP+FN)
integer vector or a list. If "ConfusionMatrix" is requested then the output is list with following elements:TP,FP,TN,FN,Specificity, Accuracy,PPV, NPV,F1. Otherwise only PPV is reported.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | require(GenomicRanges)
require(InteractionSet)
interactionsBench <- GInteractions(GRReg1_toy,GRReg1_toy$reg)
interactionsBench$PValue <- seq(0, 1,length.out = length(GRReg1_toy))
confusionMatrix(interactionsBench,
thresholdID = "PValue",
thresholdValue = 0.05,
benchCol = "anchor1.Bench1Exp",
prefilterCol = "anchor1.Filter1Exp",
statistics = "ConfusionMatrix")
confusionMatrix(interactionsBench,
thresholdID = "PValue",
thresholdValue = 0.05,
benchCol = "anchor1.Bench1Exp",
prefilterCol = "anchor1.Filter1Exp",
statistics = "PPV")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.