diffNetAnalysis {BioNetStat} | R Documentation

## Differential network analysis method

### Description

Differential network analysis method

### Usage

    diffNetAnalysis(method, options, varFile, labels, varSets = NULL,
      adjacencyMatrix, numPermutations = 1000, print = TRUE,
      resultsFile = NULL, seed = NULL, min.vert = 5,
      BPPARAM = MulticoreParam())

### Arguments

`method` | a function that receives two adjacency matrices and returns a list containing a statistic theta that measures the difference between them, and a p-value for the test H0: theta = 0 against H1: theta > 0.
`options` | a list contaning paremeters used by 'method'.
`varFile` | a numeric matrix contaning variables values data.
`labels` | a vector of -1s, 0s, and 1s associating each sample with a phenotype. The value 0 corresponds to the first phenotype class of interest, 1 to the second phenotype class of interest, and -1 to the other classes, if there are more than two classes in the gene expression data.
`varSets` | a list of gene sets. Each element of the list is a character vector v, where v[1] contains the gene set name, v[2] descriptions about the set, v[3..length(v)] the genes that belong to the set.
`adjacencyMatrix` | a function that receives a numeric matrix containing gene expression data and returns the adjacency matrix of the inferred co-expression graph.
`numPermutations` | the number of permutations for the permutation test.
`print` | a logical. If true, it prints execution messages on the screen. resultsFile: path to a file where the partial results of the analysis will be saved. If NULL, then no partial results are saved.
`resultsFile` | a ".RData" file name to be saved in tha work directory.
`seed` | the seed for the random number generators. If it is not null then the sample permutations are the same for all the gene sets.
`min.vert` | lower number of nodes (variables) that has to be to compare the networks.
`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.

### Value

a data frame containing the name, size, test statistic, nominal p-value and adjusted p-value (q-value) associated with each gene set.

### Examples

    # Glioma data
    data("varFile")
    data("labels")
    adjacencyMatrix1 <- adjacencyMatrix(method="spearman", association="pvalue", threshold="fdr",
     thr.value=0.05, weighted=FALSE)
    diffNetAnalysis(method=degreeCentralityTest, varFile=varFile, labels=labels, varSets=NULL,
     adjacencyMatrix=adjacencyMatrix1, numPermutations=1, print=TRUE, resultsFile=NULL,
      seed=NULL, min.vert=5, option=NULL)
    # The numPermutations number is 1 to do a faster example, but we advise to use unless 1000 permutations in real analysis

    # Random data
    set.seed(1)
    varFile <- 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)
    diffNetAnalysis(method=degreeCentralityTest, varFile=varFile, labels=labels, varSets=NULL,
     adjacencyMatrix=adjacencyMatrix1, numPermutations=10, print=TRUE, resultsFile=NULL,
      seed=NULL, min.vert=5, option=NULL)

[Package BioNetStat version 1.0.4 Index]