Clustering of gene co-expression network by igraph R package I have constructed a gene co-expression network from RNA-seq data. The network has more than 10000 nodes and more than 1 million edges.

The network file as an edge list format of memory around 1gb which was created by calculating Pearson correlation of each gene pairs and gene pairs having correlation greater than 95% we're selected to create the edge list. The file is too large to run in cytoscape due to limitation of computer configuration.

In R, I am able to calculate the topological properties of the network. And to cluster the gene coexperssion network, I tried using different community detection methods and but I am unable to identify which community detection is good for obtaining clusters?.

After clustering how to rank the subclusters and save each subcluster in separate files.
For the first part, do you mean that the file is too large to be run on your computer?

For the second, if I understood correctly, you can use igraph or ggnet2 to color code the nodes based on the conditions you have and see if communities are formed based on condition. This would be a simple way to do this kind of thing. 

I personally prefer using ggnet2 as I found it more user friendly. What you can do if you have an adjacency matrix, say adj_mat is to create a color vector based on the conditions for each node in the network, where length(color_vec) = ncol(adj_mat) = nrow(adj_mat) - since it is a square matrix. Following that, you could do something like this:

library(ggplot2)
library(network)

neto &lt;- network(adj_mat, directed = FALSE, loops = FALSE, hyper = FALSE)
#assuming that it is undirected here and a simple network diagram. 
#run ?network for more details in case your analysis is to be more complex

color_vec &lt;- as.factor(color_vec)

col_pal &lt;- c("blue", "red", "green") #assuming you only have 3 colors..

names(col_pal) &lt;- levels(color_vec)
neto %v% "color" &lt;- as.character(col_vec) 

ggnet2(neto, node.size = .9, color = "color", palette = col_pal,
       edge.size = .05, edge.color = "white", mode = "adj")