nodeTest: Node score equality test

Description Usage Arguments Value Examples

Description

Nodes scores equality test between network

Usage

 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
44
degreeCentralityVertexTest(
  expr,
  labels,
  adjacencyMatrix,
  numPermutations = 1000,
  options = NULL,
  BPPARAM = NULL
)

betweennessCentralityVertexTest(
  expr,
  labels,
  adjacencyMatrix,
  numPermutations = 1000,
  options = NULL,
  BPPARAM = NULL
)

closenessCentralityVertexTest(
  expr,
  labels,
  adjacencyMatrix,
  numPermutations = 1000,
  options = NULL,
  BPPARAM = NULL
)

eigenvectorCentralityVertexTest(
  expr,
  labels,
  adjacencyMatrix,
  numPermutations = 1000,
  options = NULL,
  BPPARAM = NULL
)

clusteringCoefficientVertexTest(
  expr,
  labels,
  adjacencyMatrix,
  numPermutations = 1000,
  options = NULL,
  BPPARAM = NULL
)

Arguments

expr

Matrix of variables (columns) vs samples (rows)

labels

a vector in which a position indicates the phenotype of the corresponding sample or state

adjacencyMatrix

a function that returns the adjacency matrix for a given variables values matrix

numPermutations

number of permutations that will be carried out in the permutation test

options

argument non used in this function

BPPARAM

An optional BiocParallelParam instance determining the parallel back-end to be used during evaluation, or a list of BiocParallelParam instances, to be applied in sequence for nested calls to BiocParallel functions. MulticoreParam()

Value

A table, containing on the columns, the following informations for each variable (rows): "Test Statistic" - difference among the degree centrality of a node in two or more networks associated with each phenotype "Nominal p-value" - the Nominal p-value of the test "Q-value" - the q-value of the test, correction of p-value by FDR to many tests "Factor n" - the node degree centrality in each network compared

Examples

 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
set.seed(1)
expr <- as.data.frame(matrix(rnorm(120),40,30))
labels<-data.frame(code=rep(0:3,10),names=rep(c("A","B","C","D"),10))
adjacencyMatrix1 <- adjacencyMatrix(method="spearman", association="pvalue",
 threshold="fdr", thr.value=0.05, weighted=FALSE)
# The numPermutations number is 1 to do a faster example, but we advise to use unless 1000 permutations in real analysis

# Degree centrality test
diffNetAnalysis(method=degreeCentralityVertexTest, varFile=expr, labels=labels, varSets=NULL,
 adjacencyMatrix=adjacencyMatrix1, numPermutations=1, print=TRUE, resultsFile=NULL,
  seed=NULL, min.vert=5, option=NULL)

# Betweenness centrality test
diffNetAnalysis(method=betweennessCentralityVertexTest, varFile=expr, labels=labels, varSets=NULL,
 adjacencyMatrix=adjacencyMatrix1, numPermutations=1, print=TRUE, resultsFile=NULL,
  seed=NULL, min.vert=5, option=NULL)

# Closeness centrality test
diffNetAnalysis(method=closenessCentralityVertexTest, varFile=expr, labels=labels, varSets=NULL,
 adjacencyMatrix=adjacencyMatrix1, numPermutations=1, print=TRUE, resultsFile=NULL,
  seed=NULL, min.vert=5, option=NULL)

# Eigenvector centrality test
diffNetAnalysis(method=eigenvectorCentralityVertexTest, varFile=expr, labels=labels, varSets=NULL,
 adjacencyMatrix=adjacencyMatrix1, numPermutations=1, print=TRUE, resultsFile=NULL,
  seed=NULL, min.vert=5, option=NULL)

# Clustering coefficient test
diffNetAnalysis(method=clusteringCoefficientVertexTest, varFile=expr, labels=labels, varSets=NULL,
 adjacencyMatrix=adjacencyMatrix1, numPermutations=1, print=TRUE, resultsFile=NULL,
  seed=NULL, min.vert=5, option=NULL)

BioNetStat documentation built on Feb. 3, 2021, 2:01 a.m.