Description Usage Arguments Details Value Note Author(s) References See Also Examples
Uses statistical tests (Wilcox Rank-Sum or T-test) to find significant edges from a number
of independent MCMC runs (performed by passing inference="mcmc"
to the ddepn
function call).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | create_signetwork(ret, alpha = 0.05, adj.method = "BY", plot = FALSE,
type = "wilcox", alternative = "one.sided",
paired = FALSE, ord = NULL)
create_signetwork_cv(ret, alpha = 0.05, adj.method = "BY", plot = FALSE,
type = "wilcox", alternative = "one.sided",
paired = FALSE, ord = NULL, sel_policy = "strict")
perform_network_tests(ret, alpha=0.05, plot=FALSE, type="wilcox",
alternative="one.sided", paired=FALSE, ord=NULL)
perform_edge_test(ret, from, to, alpha=0.05, plot=TRUE, type="wilcox",
alternative="one.sided", paired=FALSE)
draw_segments(tx, rng, alpha)
|
ret |
List. Either the returned object of the |
alpha |
Numeric in [0;1]. Significance level for the tests. |
adj.method |
String. Adjustment for multiple testing. See function |
plot |
Boolean. Should boxplots of the activation/inhibition edge counts (respectively confidences) be plotted? |
type |
String. Which test to use, either |
alternative |
String. Alternative to test. One out of |
paired |
Boolean. Paired test? Should normally be unpaired, i.e. FALSE. |
ord |
Vector of strings. Defines a node ordering. |
from |
String. Defines the source node, from which an edge originates. Used in |
to |
String. Defines the target node, to which an edge points. Used in |
tx |
Numeric Vector. Holds the pvalue for alternative greater and alternative less. |
rng |
The range of the values that were tested against each other. |
sel_policy |
String. If |
The main function is create_signetwork
.
Using multiple inhibMCMC chains (a number L), a significance testing procedure is used to calculate signfificantly occurring edges.
For each edge, the number of sampled activations and inhibitions is counted in each run, divided by the total number
of sampled edges, resulting in a 'confidence' for each edge for each run. To find significant edges, a statistical
test is performed (usually Wilcoxon Rank Sum test) to test the NULL that the means of the L activation confidences (c_a)
equal the mean of the L inhibition confidences (c_i). The alternatives c_a > c_i and c_a < c_i are
used to determine the type of interaction.
In create_signetwork_cv
a leave-one-out crossvalidation is performed to test for significant edges, i.e. every MCMC chain is
left out once and the create_signetwork
is called for the remaining runs. A final network is assembled from the CV networks
according to the edge selection policy given in argument sel_policy
. Note that at least 4 independent inhibMCMC chains have
to be present to use this function.
The functions perform_network_tests
, perform_edge_test
and draw_segments
are usually not called directly.
An adjacency matrix containing the significant edges.
Note that create_signetwork can only be performed for the results of the MCMC inference types and also only if multiple chains were run.
Christian Bender
Bender 2011, Systematic analysis of time resolved high-throughput data using stochastic network inference methods,
Dissertation, University of Heidelberg, Faculty of Biology
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ## Not run:
## load package
library(ddepn)
library(multicore)
## sample a network and data
set.seed(1234)
n <- 6
signet <- signalnetwork(n=n, nstim=2, cstim=0, prop.inh=0.2)
phit <- signet$phi
stimuli <- signet$stimuli
dataset <- makedata(phit, stimuli, mu.bg=1200, sd.bg=400,
mu.signal.a=2000, sd.signal.a=1000)
## use original network as prior matrix
## reset all entries for inhibiting edges
## to -1
B <- phit
B[B==2] <- -1
## perform inhibMCMC inference, using 4 CPU cores to get 4 MCMC chains
ret <- ddepn(dataset$datx, phiorig=phit, maxiterations=300, burnin=50,
plotresults=FALSE, inference="mcmc",
usebics=FALSE, priortype="laplaceinhib", lambda=0.01, B=B,
multicores=TRUE, cores=4)
## get the signal network containing the significant edges
net <- create_signetwork(ret, alpha=0.05, adj.method="none", plot=FALSE,
type="wilcox", alternative="one.sided", paired=FALSE, ord=NULL)
## compare inferred net and prior
par(mfrow=c(1,2))
plotdetailed(net, main="inferred", stimuli=ret$samplings[[1]]$stimuli )
plotdetailed(ret$samplings[[1]]$phi.orig, main="prior",
stimuli=ret$samplings[[1]]$stimuli )
## use the LOO crossvalidation for finding edges
net2 <- create_signetwork_cv(ret, alpha=0.05, adj.method="none",
plot=FALSE, type="wilcox", alternative="one.sided",
paired=FALSE, ord=NULL, sel_policy="strict")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.