# How to write the subclusters in file?

I have constructed a gene co-expression network from RNA-seq data. The network file is in edge list format of memory around 1gb which was created by calculating Pearson correlation of each gene pairs and the gene pairs which having correlation >95% were selected to create the edge list.

I have clustered this gene network (edge list) using igraph R package "cluster_louvian" community detection algorithm and obtained 534 subclusters.

c <- cluster_louvian(g)
c\$membership


to get largest subcluster

sub1 <- induced.subgraph(g, membership(cl) ==order(-sizes(cl))[1])


I am finding difficulty to write the subcluster into a text file as an edge list How can I save each subcluster in separate files (text files) as edge list?

• Hi, could you explain better what software are you using? (Where is that cluster_louvian community detection?) Also in which format do you have these data? What have you tried to separate the subclusters? In what format do you want that edge list? – llrs Apr 10 '19 at 13:44
• Now is more complete. However what have you tried? Could you give us some example data ? – llrs Apr 11 '19 at 8:32