different results produced by mcode 1.4.0beta2 in cytoscape 3.1 and mcode 1.32 in ctyoscape 2.8

31 views
Skip to first unread message

Andreas Heinzel

unread,
Nov 10, 2014, 4:21:22 AM11/10/14
to cytoscape...@googlegroups.com
We recently noticed that mcode version 1.3 and version 1.4 applied on the same network produce differing results. Unfortunately, the change history in the cytoscape app store (http://apps.cytoscape.org/apps/mcode) is very brief and does not contain anything about changes to the algorithm itself. Could you please point us into the right direction? 

For demonstration purpose we used a random network (watts-strogaz) with 400 nodes and 800 edges and applied both version of mcode (unfortunately using two different version of cytoscape) using default parameters on it. While mcode version 1.3 identified 5 clusters ranging from 3 up to 209 nodes (in total 230 nodes in clusters), version 1.4 identified 15 clusters ranging from 3 up to 108 nodes (in total 173 nodes in clusters). I attach, for completeness, a cytoscape (v2.8) session file holding the random network and a plain text file for each of the clustering results.
random_net.cys
mcode_random_net_2.8.txt
mcode_random_net_3.1.txt

Christian Lopes

unread,
Nov 14, 2014, 4:21:54 PM11/14/14
to cytoscape...@googlegroups.com
Hi Andreas,

MCODE 1.4 fixed these bugs that affected the calculation of network density* in MCODE 1.3:
  • The includeLoops parameter was always being set to false, rather than using the value selected by the user on the "advanced options".
  • Version 1.4 now counts the number of loops and decreases actualEdgeNum by loopCount when includeLoops is false.
  • MCODE 1.3 didn't ignore edge directions when calculating the number of possible edges, but version 1.4 does now.
    • The value for possibleEdgeNum used to be calculated like this:
      • possibleEdgeNum = nodeCount * nodeCount;
    • This is how 1.4 calculates it now:
      • if (includeLoops)
      •     possibleEdgeNum = (nodeCount * (nodeCount + 1)) / 2;
      • else
      •     possibleEdgeNum = (nodeCount * (nodeCount - 1)) / 2;

Note:
 There is still an issue with multiple edges, so always make sure that there are no multiple edges in the input graph, as that would inflate the density score.
----------------
(*) The density is defined as the number of edges divided by the number of possible edges:
density = actualEdgeNum/possibleEdgeNum;
 
     You can see the changes tho the algorithm (MCODEAlgorithm.java) here:


Thanks,
Christian

Andreas Heinzel

unread,
Nov 15, 2014, 3:50:00 AM11/15/14
to cytoscape...@googlegroups.com
Hi Christian,

thank you for your elaborate reply - this explains it all.

Thanks,
Andreas
Reply all
Reply to author
Forward
0 new messages