coExp {cogena} | R Documentation

## co-expressed gene-set enrichment analysis

### Description

Co-expressed gene-set enrichment analysis. Gene sets could be Pathway, Gene ontology. The gene co-expression is obtained by various clustering methods.

### Usage

    coExp(
      obj,
      nClust,
      clMethods = "hierarchical",
      metric = "correlation",
      method = "complete",
      ncore = 2,
      verbose = FALSE,
      ...
    )

### Arguments

`obj` | Differentially expressed gene (DEG) expression profilings. Either a numeric matrix, a data.frame, or an ExpressionSet object. Data frames must contain all numeric columns. In all cases, the rows are the items to be clustered (e.g., genes), and the columns are the samples.
`nClust` | A numeric vector giving the numbers of clusters to be evaluated. e.g., 2:6 would evaluate the number of clusters ranging from 2 to 6.
`clMethods` | A character vector giving the clustering methods. The default is "hierarchical". Available options are "hierarchical", "kmeans", "diana", "fanny", "som", "model", "sota", "pam", "clara", "apcluster", and "agnes", with multiple choices allowed.
`metric` | the distance measure to be used. This should be one of "euclidean", "maximum", "manhattan", "canberra", "binary", "pearson", "abspearson", "correlation", "abscorrelation", "NMI", "biwt", "spearman" or "kendall". Any unambiguous substring can be given. In detail, please reference the parameter method in amap::Dist. Some of the cluster methods could use only part of the metric. See Detail.
`method` | For hierarchical clustering (hierarchical and agnes), the agglomeration method used. The default is "complete". Available choices are "ward", "single", "complete", and "average".
`ncore` | Number of core used. The default is 2.
`verbose` | verbose.
`...` | to interal function vClusters.

### Details

For metric parameter, "hierarchical","kmeans","diana","fanny","pam" and "agnes" can use all the metrics. "clara" uses "manhattan" or "euclidean", other metric will be changed as "euclidean". "sota" uses "correlation" or "euclidean", other metric will be changed as "euclidean". "model" uses its own metric and "som" and "ap" uses euclidean only, which is irrelative with metric.

method: Available distance measures are (written for two vectors x and y):

- euclidean Usual square distance between the two vectors (2 norm).

- maximum Maximum distance between two components of x and y (supremum norm).

- manhattan Absolute distance between the two vectors (1 norm).

- canberra sum(|x_i - y_i| / |x_i + y_i|) Terms with zero numerator and denominator are omitted from the sum and treated as if the values were missing.

- binary (aka asymmetric binary): The vectors are regarded as binary bits, so non-zero elements are 'on' and zero elements are 'off'. The distance is the proportion of bits in which only one is on amongst those in which at least one is on.

- pearson Also named "not centered Pearson" 1 - sum(x_i y_i) / sqrt [sum(x_i^2) sum(y_i^2)].

- abspearson Absolute Pearson 1 - |sum(x_i y_i) / sqrt [sum(x_i^2) sum(y_i^2)] |.

- correlation Also named "Centered Pearson" 1 - corr(x,y).

- abscorrelation Absolute correlation 1 - | corr(x,y) |.

- spearman Compute a distance based on rank.

- kendall Compute a distance based on rank. ∑_{i,j} K_{i,j}(x,y) with K_{i,j}(x,y) is 0 if x_i, x_j in same order as y_i, y_j, 1 if not.

- NMI normalised mutual information. (use correlation instead so far!)

- biwt a weighted correlation based on Tukey's biweight

### Value

a genecl object

### See Also

`clEnrich`

### Examples

    data(Psoriasis)

    #cogena parameters
    # the number of clusters. A vector.
    nClust <- 2:6
    # the number of cores.
    ncore <- 2
    # the clustering methods
    clMethods <- c("hierarchical","kmeans")
    # the distance metric
    metric <- "correlation"
    # the agglomeration method used for hierarchical clustering (hierarchical
    #and agnes)
    method <- "complete"

    # See examples of clEnrich function
    # the co-expression analysis
    ## Not run:
    genecl_result <- coExp(DEexprs, nClust=nClust, clMethods=clMethods,
    metric=metric, method=method, ncore=ncore, verbose=TRUE)

    ## End(Not run)

[Package cogena version 1.24.0 Index]