nodeTest: Node score equality test

nodeTestR Documentation

Node score equality test

Description

Nodes scores equality test between network

Usage

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

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)

jardimViniciusC/BioNetStat documentation built on July 3, 2022, 3:32 a.m.