networkTest {BioNetStat} | R Documentation |
Test of equality between network properties
degreeCentralityTest(expr, labels, adjacencyMatrix, numPermutations = 1000, options = NULL, BPPARAM = MulticoreParam()) betweennessCentralityTest(expr, labels, adjacencyMatrix, numPermutations = 1000, options = NULL, BPPARAM = MulticoreParam()) closenessCentralityTest(expr, labels, adjacencyMatrix, numPermutations = 1000, options = NULL, BPPARAM = MulticoreParam()) eigenvectorCentralityTest(expr, labels, adjacencyMatrix, numPermutations = 1000, options = NULL, BPPARAM = MulticoreParam()) clusteringCoefficientTest(expr, labels, adjacencyMatrix, numPermutations = 1000, options = NULL, BPPARAM = MulticoreParam()) degreeDistributionTest(expr, labels, adjacencyMatrix, numPermutations = 1000, options = list(bandwidth = "Silverman"), BPPARAM = MulticoreParam()) spectralEntropyTest(expr, labels, adjacencyMatrix, numPermutations = 1000, options = list(bandwidth = "Sturges"), BPPARAM = MulticoreParam()) spectralDistributionTest(expr, labels, adjacencyMatrix, numPermutations = 1000, options = list(bandwidth = "Sturges"), BPPARAM = MulticoreParam())
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 |
a list containing parameters. Used only in degreeDistributionTest, spectralEntropyTest and spectralDistributionTest functions. It can be set to either |
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. |
A list containing: "measure" - difference among two or more networks associated with each phenotype. To compare networks by centralities and clustering coefficient, one uses euclidian distance. In spectral entropy comparison, one uses the absolute difference. In distributions (spectral and degree) comparison, one uses Kulback-Liebler divergence. "p.value" - the Nominal p-value of the test. "Partial" - a vector with the weigths of each network in a measure value.
set.seed(1) expr <- as.data.frame(matrix(rnorm(120),40,30)) labels<-rep(0:3,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 degreeCentralityTest(expr, labels, adjacencyMatrix1,numPermutations=1) # Betweenness centrality test betweennessCentralityTest(expr, labels, adjacencyMatrix1,numPermutations=1) # Closeness centrality test closenessCentralityTest(expr, labels, adjacencyMatrix1,numPermutations=1) # Eigenvector centrality test eigenvectorCentralityTest(expr, labels, adjacencyMatrix1,numPermutations=1) # Clustering coefficient test clusteringCoefficientTest(expr, labels, adjacencyMatrix1,numPermutations=1) # Degree distribution test degreeDistributionTest(expr, labels, adjacencyMatrix1,numPermutations=1) # Spectral entropy test spectralEntropyTest(expr, labels, adjacencyMatrix1,numPermutations=1, options=list(bandwidth="Sturges")) # Spectral distribution test spectralDistributionTest(expr, labels, adjacencyMatrix1,numPermutations=1, options=list(bandwidth="Sturges"))