Description Usage Arguments Value References Examples
View source: R/RankTheHypotheses.r
Rank the hypotheses in the causal network. This function can be run with parallelisation using the doParallel flag.
1 2 3 4 5 |
network |
Computational Causal Graph, as an igraph. |
experimentalData |
The experimental data read in using ReadExperimentalData. The results is an n x 2 matrix; where the first column contains the node ids of the nodes in the network that the results refer to. The second column contains values indicating the direction of regulation in the results - (+)1 for up, -1 for down and 0 for insignificant amounts of regulation. The name of the first column is the filename the data was read from. |
delta |
Distance to search within the causal graph. |
epsilon |
The threshold that is used when calculating the p-value using the cubic algorithm (see 'Assessing statistical significance in causal graphs'). |
useCubicAlgorithm |
An indicator specifying which algorithm will be used to calculate the p-value. The default is set as useCubicAlgorithm = TRUE which uses the cubic algorithm. If this value is set as FALSE, the algorithm will use the much slower quartic algorithm which does compute the exact answer, as opposed to using approximations like the cubic algorithm. |
use1bAlgorithm |
An indicator specifying whether the 1a or 1b (default, faster) variant of the cubic algorithm described in Chindelevitch's paper will be used to calculate the p-value. |
symmetricCCG |
This flag specifies whether the CCG is assumed to be symmetric. The value is set as TRUE as a default. If this is the case the running time of the algorithm is reduced since the bottom half of the table can be filled in using the results of calculations performed earlier. |
listOfNodes |
A list of nodes specified by the user. The algorithm will only calculate and store the results for the nodes in the specified list. The default value is NULL; here the algorithm will calculate and store results for all the nodes in the network. |
correctPredictionsThreshold |
A threshold on the number of correct predictions for a given hypothesis. If a hypothesis produces fewer correct predictions than predictionsThreshold then the algorithm will not calculate the two p-values. Instead 'NA' will be displayed in the final two columns of the corresponding row of the results table. As a default correctPredictionsThreshold is set as -Inf, so that the p-values are calculated for all specified hypotheses. |
quiet |
a flag to suppress output to console. FALSE by default. |
doParallel |
A flag for running RankTheHypothesis in parallel mode. |
numCores |
Number of cores to use if using parallel mode. If the default value of NULL is used, it will attempt to detect the number of cores available and use all of them bar one. |
writeFile |
A flag for determining if the output should be written to a file in the working directory. Default is TRUE. |
outputDir |
the directory to output the files to. Default is the working directory |
A data frame containing the results of the algorithm.
L Chindelevitch et al. Assessing statistical significance in causal graphs. BMC Bioinformatics, 13(35), 2012.
1 2 3 4 5 6 7 8 9 10 11 12 | #get path to example network file
networkFile <- system.file(package='CausalR', 'extdata', 'testNetwork.sif')
#create ccg
network <- CreateCCG(networkFile)
#get path to example experimental data
experimentalDataFile <- system.file(package='CausalR', 'extdata', 'testData.txt')
#read in experimetal data
experimentalData <- ReadExperimentalData(experimentalDataFile, network)
#run in single threaded mode
RankTheHypotheses(network, experimentalData, 2)
#run in parallel mode
RankTheHypotheses(network, experimentalData, 2, doParallel=TRUE, numCores=2)
|
Number of Nodes to analyse: 10
NodeID Regulation Score Correct Incorrect Ambiguous p-value
NodeH- 8 -1 7 8 1 1 0.02380952
NodeF- 6 -1 4 6 2 2 0.16666667
NodeA+ 1 1 3 5 2 2 0.20238095
NodeC+ 3 1 3 6 3 1 0.26190476
NodeG+ 7 1 3 6 3 1 0.26190476
NodeB- 2 -1 3 5 2 3 0.20238095
NodeJ- 10 -1 3 6 3 0 0.26190476
NodeI+ 9 1 2 5 3 2 0.38095238
NodeD- 4 -1 2 4 2 4 0.34126984
NodeE+ 5 1 1 4 3 1 0.50000000
NodeE- 5 -1 -1 3 4 1 0.77777778
NodeD+ 4 1 -2 2 4 4 0.88095238
NodeI- 9 -1 -2 3 5 2 0.85714286
NodeB+ 2 1 -3 2 5 3 0.97619048
NodeJ+ 10 1 -3 3 6 0 0.91666667
NodeA- 1 -1 -3 2 5 2 0.97619048
NodeC- 3 -1 -3 3 6 1 0.89682540
NodeG- 7 -1 -3 3 6 1 0.89682540
NodeF+ 6 1 -4 2 6 2 0.96031746
NodeH+ 8 1 -7 1 8 1 0.99603175
Enrichment p-value
NodeH- 1
NodeF- 1
NodeA+ 1
NodeC+ 1
NodeG+ 1
NodeB- 1
NodeJ- 1
NodeI+ 1
NodeD- 1
NodeE+ 1
NodeE- 1
NodeD+ 1
NodeI- 1
NodeB+ 1
NodeJ+ 1
NodeA- 1
NodeC- 1
NodeG- 1
NodeF+ 1
NodeH+ 1
Number of Nodes to analyse: 10
NodeID Regulation Score Correct Incorrect Ambiguous p-value
NodeH- 8 -1 7 8 1 1 0.02380952
NodeF- 6 -1 4 6 2 2 0.16666667
NodeA+ 1 1 3 5 2 2 0.20238095
NodeC+ 3 1 3 6 3 1 0.26190476
NodeG+ 7 1 3 6 3 1 0.26190476
NodeB- 2 -1 3 5 2 3 0.20238095
NodeJ- 10 -1 3 6 3 0 0.26190476
NodeI+ 9 1 2 5 3 2 0.38095238
NodeD- 4 -1 2 4 2 4 0.34126984
NodeE+ 5 1 1 4 3 1 0.50000000
NodeE- 5 -1 -1 3 4 1 0.77777778
NodeD+ 4 1 -2 2 4 4 0.88095238
NodeI- 9 -1 -2 3 5 2 0.85714286
NodeB+ 2 1 -3 2 5 3 0.97619048
NodeJ+ 10 1 -3 3 6 0 0.91666667
NodeA- 1 -1 -3 2 5 2 0.97619048
NodeC- 3 -1 -3 3 6 1 0.89682540
NodeG- 7 -1 -3 3 6 1 0.89682540
NodeF+ 6 1 -4 2 6 2 0.96031746
NodeH+ 8 1 -7 1 8 1 0.99603175
Enrichment p-value
NodeH- 1
NodeF- 1
NodeA+ 1
NodeC+ 1
NodeG+ 1
NodeB- 1
NodeJ- 1
NodeI+ 1
NodeD- 1
NodeE+ 1
NodeE- 1
NodeD+ 1
NodeI- 1
NodeB+ 1
NodeJ+ 1
NodeA- 1
NodeC- 1
NodeG- 1
NodeF+ 1
NodeH+ 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.