applyKMeans: Title K-means refinement process after getting TOM and...

Description Usage Arguments

View source: R/main.R

Description

Title K-means refinement process after getting TOM and clusters from 'WGCNA' This method applies 'n.iterations' k-means iterations to the hierarchical clustering generated partition from 'WGCNA'. It uses the eigengenes as centroids and the distance between gene pairs is calculated on the basis of whether the network is signed or not. For details on the approach see paper <https://bmcsystbiol.biomedcentral.com/articles/10.1186/s12918-017-0420-6> #Step 1. Let D be the expression data in which dij in D represents the expression value for sample i and gene j, being s samples and g genes in total. Step 2. Construct the partition by the WGCNA process, let P_D=m_1, m_2, ..., m_n be that partition where m_k is the k-th module. Step 3. Get the eigengenes for each module within the partition, E=e_1, e_2, ..., e_n Step 4. Set up the k-means clustering Step 4.1. Set k to n Step 4.2. Set the centroids C to the eigengenes E, thus C to E Step 5. Run the algorithm and monitor its evolution Step 5.1 Set iterations to 0 Step 5.2 Create a new partition P', given C with n modules such that, for each gene, 1 <= j <= g, g_j belongs to the module c_t in C such that a distance meassure d(g_j,c_t) is minimum. Step 5.3 Calculate eigengenes of P', giving a new E' Step 5.4 Evaluate the progress. If progress done, set iterations to iterations + 1 and C to E' and go to step 5.2 Step 5.5 Finish

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
applyKMeans(
  tissue,
  net.file,
  expr.data,
  n.iterations = 20,
  debug = F,
  n.debug = 500,
  net.type = "signed",
  min.exchanged.genes = 20,
  excludeGrey = F,
  silent = T
)

Arguments

tissue

A tissue name

cor.type

juanbot/CoExpNets documentation built on May 15, 2021, 12:20 p.m.