Hi,
Given a biological network, e.g., protein-protein interactions, genetic interactions, etc., is there a 'relatively easy way to permute such networks such that,
- The Degree distribution is preserved.
- There are no self interacting nodes.
- There is only a single edge between any two nodes.
I have tried using the rewire function in the R igraph library. This preserves the degree distribution but allows for self and multiple loops.
Is there an off the shelf tool that does the above, particularly for undirected graphs?
Thanks, D.
This works, but note that randomizing node IDs will not preserve the degree distribution for the gene/protein/molecule, only for the network as a whole. In other words, if you started with 2 genes
gene a
andgene b
that had 10 neighbors, there will still be 2 genes with 10 neighbors after randomization, but it may be 2 different genes,gene x
andgene y
, say, andgene a
andgene b
may have more or fewer neighbors. The method I posted ensures that ifgene a
starts with 10 neighbors, it will still have 10 neighbors after randomization. Maybe that property isn't important, but sometimes it can be.yes, good point, thanks for clarifying that
I figured that it wouldn't preserve the degree distribution. I decided to use the mfinder package from Uri Alon. It was initially designed to look for over-represented motifs but also does the job of randomising networks.
Just a heads up, some people that I do trust say that the Uri Alon paper (and therefore I assume the software itself) is fundamentally incorrect. This is matters only if you looking for subgraph enrichment. See http://www.biomedcentral.com/1752-0509/2/73