nct.search
Class NewComplexSearch<NodeType extends java.lang.Comparable<? super NodeType>>
java.lang.Object
nct.search.NewComplexSearch<NodeType>
- All Implemented Interfaces:
- SearchGraph<NodeType,java.lang.Double>, Monitorable
public class NewComplexSearch<NodeType extends java.lang.Comparable<? super NodeType>>
- extends java.lang.Object
- implements SearchGraph<NodeType,java.lang.Double>, Monitorable
This class implements the SearchGraph interface. It implements the
greedy search algorithm described in the supplemental material of
Sharan, et al. 2005. "Conserved patterns of protein interaction in
mulitple species." PNAS, 102(6),1974-1979.
Complexes are defined as branched or unbranched pathways invovling
minSeedSize or more nodes.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NewComplexSearch
public NewComplexSearch(int minSize,
int maxSize)
- Sets the max and min sizes for complexes.
- Parameters:
minSize
- Minimum complex size, also the size of the secondary seeds.maxSize
- Maximum allowed complex size.
NewComplexSearch
public NewComplexSearch(int minSize,
int maxSize,
boolean create,
java.util.List<Graph<NodeType,java.lang.Double>> seeds)
searchGraph
public java.util.List<Graph<NodeType,java.lang.Double>> searchGraph(Graph<NodeType,java.lang.Double> graph,
ScoreModel<NodeType,java.lang.Double> scoreObj)
- Search the graph for a complex between minSeedSize and maxComplexSize
nodes in size.
The algorithm uses two sets of seeds. First it utilizes the list of
paths (if any) already found in the path search.
Second, it iterates over all nodes in the input graph and builds
seeds of size minSeedSize around each node by adding the node's
best neighbors to the seed. "Best" is defined as the sum of the scores
returned from the scoreObj. Once the seed is constructed, it is
appened to the overall list of seeds.
Now begin the greedy construction of complexes.
Given each seed, see if adding or removing 1 *new* node (seed
nodes are invariant and can't be removed) will increase the score,
and then do the corresponding action. Continue until the network cannot
add/delete any nodes that increase the score or the complex grows until
maxComplexSize.
- Specified by:
searchGraph
in interface SearchGraph<NodeType extends java.lang.Comparable<? super NodeType>,java.lang.Double>
- Parameters:
graph
- The Graph object to search for complexes.scoreObj
- The score algorithm to use.
- Returns:
- The list of complexes found.
setMonitor
public void setMonitor(Monitor monitor)
- Specified by:
setMonitor
in interface Monitorable
getMonitor
public Monitor getMonitor()
- Specified by:
getMonitor
in interface Monitorable
setSeeds
public void setSeeds(java.util.List<Graph<NodeType,java.lang.Double>> seeds)