Body: <p>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. </p>
  
  <p>I have clustered this gene network (edge list) using igraph R package "cluster_louvian" community detection algorithm and obtained 534 subclusters. </p>
  
  <pre><code>c &lt;- cluster_louvian(g)
  c$membership
  </code></pre>
  
  <p>to get largest subcluster</p>
  
  <pre><code>sub1 &lt;- induced.subgraph(g, membership(cl) ==order(-sizes(cl))[1])
  </code></pre>
  
  <p>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?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-10T13:44:51.413Z
Comments.Text: 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?
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-11T08:32:39.287Z
Comments.Text: Now is more complete. However what have you tried? Could you give us some example data ?
Comments.UserDisplayName: llrs
Tags: <r><rna-seq><networks><clustering>
Title: How to write the subclusters in file?
ThreadText: # How to write the subclusters in file?
  
  (Asked by: username_0 on 2019-04-10)
  
  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?
  
  **Tags:** r, rna-seq, networks, clustering
  
  > **Comments:**
  > **username_1**: 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?  
  > **username_1**: Now is more complete. However what have you tried? Could you give us some example data ?  
  
  ---
  
  ## 0 answers
  
  