This function packs the entire DC analysis pipeline using the z-score method. It simplifies the implementation of the analysis and increases the flexibility of the analysis (not just limited to all pairwise comparisons).

dcZscore(
  emat,
  condition,
  from = NULL,
  to = NULL,
  fdrthresh = 0.1,
  cor.method = c("spearman", "pearson")
)

Arguments

emat

a matrix, Matrix, data.frame, ExpressionSet, SummarizedExperiment or DGEList

condition

a numeric, (with 1's and 2's representing a binary condition), a factor with 2 levels or a character representing 2 conditions

from

a character vector, with the names of nodes from which comparisons need to be performed.

to

a character vector, with the names of nodes to which comparisons need to be performed.

fdrthresh

a numeric, specifying the FDR cutoff to apply to the inferred network.

cor.method

a character, either 'spearman' (default) or 'pearson' specifying the correlation computation method to use.

Value

an igraph object, containing the differential coexpression network.

Examples

x <- matrix(rnorm(60), 10, 30)
rownames(x) = 1:10
cond <- rep(1:2, 15)
dcZscore(x, cond)
#> IGRAPH d65685b UN-- 10 34 -- 
#> + attr: name (v/c), size (v/n), color (v/c), fdr (e/n), z.score (e/n),
#> | cor.1 (e/n), cor.2 (e/n), color (e/c)
#> + edges from d65685b (vertex names):
#>  [1] 1 --2  1 --3  1 --4  1 --5  1 --7  1 --10 2 --3  2 --5  2 --6  2 --7 
#> [11] 2 --8  2 --9  2 --10 3 --4  3 --5  3 --6  3 --8  3 --9  10--3  4 --5 
#> [21] 4 --6  4 --7  4 --8  4 --9  10--4  5 --7  5 --8  6 --7  6 --8  7 --8 
#> [31] 7 --9  10--7  8 --9  10--8 
dcZscore(x, cond, to = 1:2)
#> IGRAPH 0711382 UN-- 10 13 -- 
#> + attr: name (v/c), size (v/n), color (v/c), fdr (e/n), z.score (e/n),
#> | cor.1 (e/n), cor.2 (e/n), color (e/c)
#> + edges from 0711382 (vertex names):
#>  [1] 1--2  1--3  1--4  1--5  1--7  1--10 2--3  2--5  2--6  2--7  2--8  2--9 
#> [13] 2--10