nct.networkblast
Class InteractionGraph

java.lang.Object
  extended by nct.graph.BasicGraph<NodeType,WeightType>
      extended by nct.graph.BasicDistanceGraph<java.lang.String,java.lang.Double>
          extended by nct.networkblast.InteractionGraph
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<Graph<java.lang.String,java.lang.Double>>, DistanceGraph<java.lang.String,java.lang.Double>, Graph<java.lang.String,java.lang.Double>, SequenceGraph<java.lang.String,java.lang.Double>

public class InteractionGraph
extends BasicDistanceGraph<java.lang.String,java.lang.Double>
implements SequenceGraph<java.lang.String,java.lang.Double>

An implementation of a SequenceGraph that is specified by a SIF file.


Field Summary
 
Fields inherited from class nct.graph.BasicDistanceGraph
distMap
 
Fields inherited from class nct.graph.BasicGraph
assumeGraphFinished, descMap, id, numEdges, score, weightMap
 
Fields inherited from interface nct.graph.SequenceGraph
BLAST, DUMMY, FASTA
 
Constructor Summary
InteractionGraph()
          Constructor.
InteractionGraph(java.lang.String fileName)
           
 
Method Summary
 java.lang.String getDBLocation()
          Dummy method needed to implement the SequenceGraph interface.
 java.lang.String getDBName()
          Dummy method needed to implement the SequenceGraph interface.
 int getDBType()
          Dummy method needed to implement the SequenceGraph interface.
 java.lang.Double getEdgeWeight(java.lang.String nodeA, java.lang.String nodeB)
          Instead of returning null when an edge doesn't exist, it returns -1.
 void setDBLocation(java.lang.String loc)
          Dummy method needed to implement the SequenceGraph interface.
 void setDBName(java.lang.String name)
          Dummy method needed to implement the SequenceGraph interface.
 void setDBType(int type)
          Dummy method needed to implement the SequenceGraph interface.
 
Methods inherited from class nct.graph.BasicDistanceGraph
getDistance
 
Methods inherited from class nct.graph.BasicGraph
addEdge, addEdge, addNode, clone, compareTo, degreeOfNode, getEdge, getEdgeDescription, getEdgeList, getEdges, getId, getNeighbors, getNodes, getScore, isEdge, isNode, numberOfEdges, numberOfNodes, removeEdge, removeNode, setEdgeDescription, setEdgeWeight, setScore, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface nct.graph.DistanceGraph
getDistance
 
Methods inherited from interface nct.graph.Graph
addEdge, addEdge, addNode, clone, compareTo, degreeOfNode, getEdge, getEdgeDescription, getEdgeList, getEdges, getId, getNeighbors, getNodes, getScore, isEdge, isNode, numberOfEdges, numberOfNodes, removeEdge, removeNode, setEdgeDescription, setEdgeWeight, setScore, toString
 

Constructor Detail

InteractionGraph

public InteractionGraph()
Constructor.


InteractionGraph

public InteractionGraph(java.lang.String fileName)
                 throws java.io.FileNotFoundException,
                        java.io.IOException
Parameters:
fileName - The SIF input file containing the graph specification.
Throws:
java.io.FileNotFoundException
java.io.IOException
Method Detail

getEdgeWeight

public java.lang.Double getEdgeWeight(java.lang.String nodeA,
                                      java.lang.String nodeB)
Instead of returning null when an edge doesn't exist, it returns -1.

Specified by:
getEdgeWeight in interface Graph<java.lang.String,java.lang.Double>
Overrides:
getEdgeWeight in class BasicGraph<java.lang.String,java.lang.Double>
Parameters:
nodeA - The source node of the edge.
nodeB - The target node of the edge.
Returns:
The edge weight if the edge exists, -1 otherwise.

getDBName

public java.lang.String getDBName()
Dummy method needed to implement the SequenceGraph interface. TODO Can we get rid of this somehow?

Specified by:
getDBName in interface SequenceGraph<java.lang.String,java.lang.Double>
Returns:
The name of the database used.

getDBLocation

public java.lang.String getDBLocation()
Dummy method needed to implement the SequenceGraph interface. TODO Can we get rid of this somehow?

Specified by:
getDBLocation in interface SequenceGraph<java.lang.String,java.lang.Double>
Returns:
The location of the database used.

getDBType

public int getDBType()
Dummy method needed to implement the SequenceGraph interface. TODO Can we get rid of this somehow?

Specified by:
getDBType in interface SequenceGraph<java.lang.String,java.lang.Double>
Returns:
An integer identifying the type of database used.

setDBType

public void setDBType(int type)
Dummy method needed to implement the SequenceGraph interface. TODO Can we get rid of this somehow?

Specified by:
setDBType in interface SequenceGraph<java.lang.String,java.lang.Double>
Parameters:
type - The new type of the sequence database.

setDBLocation

public void setDBLocation(java.lang.String loc)
Dummy method needed to implement the SequenceGraph interface. TODO Can we get rid of this somehow?

Specified by:
setDBLocation in interface SequenceGraph<java.lang.String,java.lang.Double>
Parameters:
loc - The new location of the sequence database.

setDBName

public void setDBName(java.lang.String name)
Dummy method needed to implement the SequenceGraph interface. TODO Can we get rid of this somehow?

Specified by:
setDBName in interface SequenceGraph<java.lang.String,java.lang.Double>
Parameters:
name - The new name of the sequence database.