Creates a sub-network with perturbed edges obtained from the
output of SEMace
, comparable to the procedure in
Jablonski et al (2022), or of SEMrun
with two-group
and CGGM solver, comparable to the algorithm 2 in Belyaeva et al (2021).
To increase the efficiency of computations for large graphs, users can
select to break the network structure into clusters, and select the
topological clustering method (see clusterGraph
).
The function SEMrun
is applied iteratively on
each cluster (with size min > 10 and max < 500) to obtain the graph
with the full list of perturbed edges.
SEMdci(graph, data, group, type = "ace", method = "BH", alpha = 0.05, ...)
Input network as an igraph object.
A matrix or data.frame. Rows correspond to subjects, and columns to graph nodes (variables).
A binary vector. This vector must be as long as the number of subjects. Each vector element must be 1 for cases and 0 for control subjects.
Average Causal Effect (ACE) with two-group, "parents"
(back-door) adjustement set, and "direct" effects (type = "ace"
,
default), or CGGM solver with two-group using a clustering method.
If type = "tahc"
, network modules are generated using the tree
agglomerative hierarchical clustering method, or non-tree clustering
methods from igraph package, i.e., type = "wtc"
(walktrap community
structure with short random walks), type ="ebc"
(edge betweeness
clustering), type = "fgc"
(fast greedy method), type = "lbc"
(label propagation method), type = "lec"
(leading eigenvector method),
type = "loc"
(multi-level optimization), type = "opc"
(optimal
community structure), type = "sgc"
(spinglass statistical mechanics),
type = "none"
(no breaking network structure into clusters).
Multiple testing correction method. One of the values
available in p.adjust
. By default, method is set
to "BH" (i.e., FDR multiple test correction).
Significance level (default = 0.05) for edge set selection.
Currently ignored.
An igraph object.
Belyaeva A, Squires C, Uhler C (2021). DCI: learning causal differences between gene regulatory networks. Bioinformatics, 37(18): 3067–3069. <https://doi: 10.1093/bioinformatics/btab167>
Jablonski K, Pirkl M, Ćevid D, Bühlmann P, Beerenwinkel N (2022). Identifying cancer pathway dysregulations using differential causal effects. Bioinformatics, 38(6):1550–1559. <https://doi.org/10.1093/bioinformatics/btab847>
# \dontrun{
#load SEMdata package for ALS data with 17K genes:
#devtools::install_github("fernandoPalluzzi/SEMdata")
#library(SEMdata)
# Nonparanormal(npn) transformation
library(huge)
data.npn<- huge.npn(alsData$exprs)
#> Conducting the nonparanormal (npn) transformation via shrunkun ECDF....done.
dim(data.npn) #160 17695
#> [1] 160 318
# Extract KEGG interactome (max component)
KEGG<- properties(kegg)[[1]]
#> Frequency distribution of graph components
#>
#> n.nodes n.graphs
#> 1 5147 1
#>
#> Percent of vertices in the giant component: 100 %
#>
#> is.simple is.dag is.directed is.weighted
#> TRUE FALSE TRUE FALSE
#>
#> which.mutual.FALSE which.mutual.TRUE
#> 40424 3310
summary(KEGG)
#> IGRAPH 7f7dc7f DN-- 5147 43734 --
#> + attr: name (v/c)
# KEGG modules with ALS perturbed edges using fast gready clustering
gD<- SEMdci(KEGG, data.npn, alsData$group, type="fgc")
#> modularity = 0.5917516
#>
#> Community sizes
#> 43 44 45 46 37 41 42 31 34 36 38 39 40 17 22 23
#> 2 2 2 2 3 3 3 4 4 4 4 4 4 6 6 6
#> 24 30 35 28 32 20 21 25 29 15 33 13 19 18 16 26
#> 6 6 7 8 8 9 9 9 10 11 11 12 12 16 21 22
#> 14 27 12 11 8 10 9 4 2 1 7 6 3 5
#> 24 27 31 65 70 85 109 223 232 386 455 802 1184 1218
#>
#> fit cluster = 1
#> fit cluster = 2
#> fit cluster = 3
#> fit cluster = 4
#> fit cluster = 5
#> fit cluster = 6
#> fit cluster = 7
#> fit cluster = 8
#> fit cluster = 9
#> fit cluster = 10
#> fit cluster = 11
#> fit cluster = 12
#> fit cluster = 13
#> fit cluster = 14
#> fit cluster = 15
#> fit cluster = 16
#> fit cluster = 18
#> fit cluster = 19
#> fit cluster = 26
#> fit cluster = 27
#> fit cluster = 29
#> fit cluster = 33
#> Done.
summary(gD)
#> IGRAPH 812c70e DN-- 11 7 --
#> + attr: name (v/c)
gcD<- properties(gD)
#> Frequency distribution of graph components
#>
#> n.nodes n.graphs
#> 1 2 3
#> 2 5 1
#>
#> Percent of vertices in the giant component: 45.5 %
#>
#> is.simple is.dag is.directed is.weighted
#> TRUE TRUE TRUE FALSE
#>
#> which.mutual.FALSE
#> 4
old.par <- par(no.readonly = TRUE)
par(mfrow=c(2,2), mar=rep(2,4))
gplot(gcD[[1]], l="fdp", main="max component")
gplot(gcD[[2]], l="fdp", main="2nd component")
gplot(gcD[[3]], l="fdp", main="3rd component")
gplot(gcD[[4]], l="fdp", main="4th component")
par(old.par)
# }