applyKMeans: Apply K-means algoritm on a GCN

Description Usage Arguments Value

Description

This function takes a hopefully correctly created WGCN network and, based on gene expression it modifies the module color assignment by using k-means heuristic. The description of the parameters show how the function works.

Usage

1
2
applyKMeans(net, expr.data, beta = 6, n.iterations = 20,
  net.type = "signed")

Arguments

net

must be a RDS object storing the network. Networks can be created using createGCN function.

expr.data

can be a full path file name or a data frame with genes in columns and samples in rows, giving the expression data used to construct the WGCNA network. The function expects genes in the column order to correspond to the order of nameColors of net.file param.

beta

The soft threshold parameter as it was used with WGCNA

n.iterations

A max number of iterations to run the k-means

net.type

it is used in the same sense as WGCNA

Value

The network, post-processed with a k-means heuristic including two additional properties

  1. iterations The number of iterations that the algorithm actually made.

  2. exchanged.genes The number of exchanged genes in the last iteration of the algorithm.

#'


drlaguna/GPCNA documentation built on Sept. 22, 2020, 11:47 p.m.