dNetPipeline: Function to setup the pipeline for finding maximum-scoring...

Description Usage Arguments Value Note See Also Examples

View source: R/dNetPipeline.r

Description

dNetPipeline is supposed to finish ab inito maximum-scoring subgraph identification for the input graph with the node information on the significance (p-value or fdr). It returns an object of class "igraph" or "graphNEL".

Usage

1
2
3
4
5
6
7
8
9
dNetPipeline(
g,
pval,
method = c("pdf", "cdf", "customised"),
significance.threshold = NULL,
nsize = NULL,
plot = F,
verbose = T
)

Arguments

g

an object of class "igraph" or "graphNEL"

pval

a vector containing input p-values (or fdr). For each element, it must have the name that could be mapped onto the input graph. Also, the names in input "pval" should contain all those in the input graph "g", but the reverse is not necessary

method

the method used for the transformation. It can be either "pdf" for the method based on the probability density function of the fitted model, or "cdf" for the method based on the cumulative distribution function of the fitted model

significance.threshold

the given significance threshold. By default, it is set to NULL, meaning there is no constraint. If given, those p-values below this are considered significant and thus scored positively. Instead, those p-values above this given significance threshold are considered insigificant and thus scored negatively

nsize

the desired number of nodes constrained to the resulting subgraph. It is not nulll, a wide range of significance thresholds will be scanned to find the optimal significance threshold leading to the desired number of nodes in the resulting subgraph. Notably, the given significance threshold will be overwritten by this option.

plot

logical to indicate whether the histogram plot, contour plot and scatter plot should be drawn. By default, it sets to false for no plotting

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to true for display

Value

a subgraph with a maximum score, an object of class "igraph" or "graphNEL". It has node attributes 'score' and 'type' (either 'desired' or 'linker'). Also appended is a graph attribute 'threshold' (that is, 'significance.threshold' used particularly useful when 'nsize' is defined)

Note

The pipeline sequentially consists of:

See Also

dBUMfit, dBUMscore, dFDRscore, dNetFind

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
# 1) generate an vector consisting of random values from beta distribution
x <- rbeta(1000, shape1=0.5, shape2=1)
names(x) <- as.character(1:length(x))

# 2) generate a random graph according to the ER model
g <- erdos.renyi.game(1000, 1/100)

# 3) produce the induced subgraph only based on the nodes in query
subg <- dNetInduce(g, V(g), knn=0)

# 4) find maximum-scoring subgraph based on the given significance threshold
# 4a) assume the input is a list of p-values (controlling fdr=0.1)
subgraph <- dNetPipeline(g=subg, pval=x, significance.threshold=0.1)
# 4b) assume the input is a list of customised significance (eg FDR directly)
subgraph <- dNetPipeline(g=subg, pval=x, method="customised",
significance.threshold=0.1)

# 5) find maximum-scoring subgraph with the desired node number nsize=20
subgraph <- dNetPipeline(g=subg, pval=x, nsize=20)

## End(Not run)

dnet documentation built on Feb. 20, 2020, 3:01 p.m.

Related to dNetPipeline in dnet...