<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>

CC BY-SA 4.0
2019-04-10T13:44:51.413Z
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
CC BY-SA 4.0
2019-04-11T08:32:39.287Z
Now is more complete. However what have you tried? Could you give us some example data ?
llrs
<r><rna-seq><networks><clustering>
How to write the subclusters in file?
# 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

