graph_algorithms
Class MetaModuleFinder

java.lang.Object
  extended by graph_algorithms.MetaModuleFinder

public class MetaModuleFinder
extends java.lang.Object


Field Summary
 boolean[][] areModulesFriends
           
 double[][] DC_graph
           
 java.util.ArrayList<java.lang.String> geneNames
           
 java.util.LinkedList<MetaModule> meta_modules
           
 java.util.LinkedList<java.util.HashSet<java.lang.Integer>> modules
           
 
Constructor Summary
MetaModuleFinder(double[][] c, double[][] dc, java.util.ArrayList<java.lang.String> ids)
          Constructor
 
Method Summary
 java.util.LinkedList<java.util.LinkedList<java.lang.Integer>> addSingletonsToModules()
           
 void calculateMetaGraph()
           
 java.util.Hashtable<java.lang.Integer,java.util.HashSet<java.lang.Integer>> createNeighborsListsInGraph()
           
 void findSeedPairs()
           
 java.util.LinkedList<ComparableEdge> getEdgesForAlgo(double likelihoodThresholdForDCA)
           
 void getFinalSolution(int maxNumClusters, int minSize)
           
 java.util.Hashtable<java.lang.Integer,java.lang.Double> getWithinSetScores(java.util.Collection<java.lang.Integer> T)
           
 boolean greedyRemoveNodesFromTwoSides(java.util.Collection<java.lang.Integer> T, java.util.Collection<java.lang.Integer> S)
          This methods receives as input two distinct sets.
static void removeCurrentListFromGraph(java.util.Hashtable<java.lang.Integer,java.util.HashSet<java.lang.Integer>> neighborsListsInDCAGraph, java.util.HashSet<java.lang.Integer> set)
           
static void removeIntersection(java.util.HashSet<java.lang.Integer> neighborsOfU, java.util.HashSet<java.lang.Integer> neighborsOfV)
           
 void removeZeroDegreesMetaNodes()
           
 void setLikelihoodThresholdForDC(float likelihoodThresholdForDCA)
           
static void sortEdgesByScores(java.util.LinkedList<ComparableEdge> edges, java.util.Hashtable<java.lang.Integer,java.util.HashSet<java.lang.Integer>> neighborsListsInDCAGraph)
          Static auxiliary methods
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DC_graph

public double[][] DC_graph

geneNames

public java.util.ArrayList<java.lang.String> geneNames

modules

public java.util.LinkedList<java.util.HashSet<java.lang.Integer>> modules

areModulesFriends

public boolean[][] areModulesFriends

meta_modules

public java.util.LinkedList<MetaModule> meta_modules
Constructor Detail

MetaModuleFinder

public MetaModuleFinder(double[][] c,
                        double[][] dc,
                        java.util.ArrayList<java.lang.String> ids)
Constructor

Parameters:
c - - the consistent correlations graph
dc - - the DC analysis results
ids - - the gene names
Method Detail

greedyRemoveNodesFromTwoSides

public boolean greedyRemoveNodesFromTwoSides(java.util.Collection<java.lang.Integer> T,
                                             java.util.Collection<java.lang.Integer> S)
This methods receives as input two distinct sets. The set elements represent the index of a gene in the matrices. The algorithm greedily tries to remove a gene from T or S until the remaining sets satisfy the meta-module definition.

Parameters:
T -
S -
Returns:

getWithinSetScores

public java.util.Hashtable<java.lang.Integer,java.lang.Double> getWithinSetScores(java.util.Collection<java.lang.Integer> T)

findSeedPairs

public void findSeedPairs()

createNeighborsListsInGraph

public java.util.Hashtable<java.lang.Integer,java.util.HashSet<java.lang.Integer>> createNeighborsListsInGraph()

getEdgesForAlgo

public java.util.LinkedList<ComparableEdge> getEdgesForAlgo(double likelihoodThresholdForDCA)

calculateMetaGraph

public void calculateMetaGraph()

addSingletonsToModules

public java.util.LinkedList<java.util.LinkedList<java.lang.Integer>> addSingletonsToModules()

getFinalSolution

public void getFinalSolution(int maxNumClusters,
                             int minSize)

removeZeroDegreesMetaNodes

public void removeZeroDegreesMetaNodes()

setLikelihoodThresholdForDC

public void setLikelihoodThresholdForDC(float likelihoodThresholdForDCA)

sortEdgesByScores

public static void sortEdgesByScores(java.util.LinkedList<ComparableEdge> edges,
                                     java.util.Hashtable<java.lang.Integer,java.util.HashSet<java.lang.Integer>> neighborsListsInDCAGraph)
Static auxiliary methods


removeCurrentListFromGraph

public static void removeCurrentListFromGraph(java.util.Hashtable<java.lang.Integer,java.util.HashSet<java.lang.Integer>> neighborsListsInDCAGraph,
                                              java.util.HashSet<java.lang.Integer> set)

removeIntersection

public static void removeIntersection(java.util.HashSet<java.lang.Integer> neighborsOfU,
                                      java.util.HashSet<java.lang.Integer> neighborsOfV)