graph_algorithms
Class MetaModuleFinder
java.lang.Object
graph_algorithms.MetaModuleFinder
public class MetaModuleFinder
- extends java.lang.Object
Constructor Summary |
MetaModuleFinder(double[][] c,
double[][] dc,
java.util.ArrayList<java.lang.String> ids)
Constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
MetaModuleFinder
public MetaModuleFinder(double[][] c,
double[][] dc,
java.util.ArrayList<java.lang.String> ids)
- Constructor
- Parameters:
c
- - the consistent correlations graphdc
- - the DC analysis resultsids
- - the gene names
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)