edu.iastate.biocyc.io
Class BiocycImporter

java.lang.Object
  extended by edu.iastate.biocyc.io.BiocycImporter

public class BiocycImporter
extends java.lang.Object

read the Biocyc flat files

Author:
Jie Li

Field Summary
(package private) static org.apache.log4j.Logger logger
          log4j facility
 
Constructor Summary
BiocycImporter()
          initialize the class data
 
Method Summary
 edu.uci.ics.jung.graph.DirectedGraph convertGraph(org._3pq.jgrapht.DirectedGraph network, java.util.Map dataMap)
          convert to the JUNG graph
 java.util.Map createBigMap()
          create a big map containing all instances.
 org._3pq.jgrapht.DirectedGraph createClassNetwork(java.util.Map bigMap)
          create the class network
 org._3pq.jgrapht.DirectedGraph createClassPathway(java.util.Map bigMap)
          get the pathway and class relation
 org._3pq.jgrapht.DirectedGraph createNestedNetwork(java.util.Map bigMap)
          create the super pathway network
 java.lang.Object[] createReactionNetwork(java.util.Map bigMap)
          create a big network of all Biocyc information
 org._3pq.jgrapht.DirectedGraph decomposePathway(org._3pq.jgrapht.DirectedGraph network, java.util.Map dataMap, java.util.Collection pbidList)
          get the graph model containing specified pathways
 java.lang.String getClassFilename()
           
 java.lang.String getCompoundFilename()
           
 java.lang.String getDirectory()
           
 java.lang.String getEnzrxnFilename()
           
 java.lang.String getGeneFilename()
           
 java.lang.String getPathwayFilename()
           
 java.lang.String getProteinFilename()
           
 java.lang.String getReactionFilename()
           
 java.lang.Object[] rewriteGraph(java.util.Map bigMap, org._3pq.jgrapht.DirectedGraph reactionNet, org.apache.commons.collections.map.MultiKeyMap coeffMap, org._3pq.jgrapht.DirectedGraph classNet, java.lang.String organism, java.lang.String username, java.lang.String source)
          the most important function in this conversion.
 java.util.Map rewritePathway(org._3pq.jgrapht.DirectedGraph pathwayNet, java.util.Map bigMap, org._3pq.jgrapht.DirectedGraph network, java.util.Map dataMap, java.lang.String organism, java.lang.String username, java.lang.String source)
          construct pathway blockunit
 void setDirectory(java.lang.String directory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
log4j facility

Constructor Detail

BiocycImporter

public BiocycImporter()
initialize the class data

Method Detail

getDirectory

public java.lang.String getDirectory()
Returns:
the directory

setDirectory

public void setDirectory(java.lang.String directory)
Parameters:
directory - the directory to set

getEnzrxnFilename

public java.lang.String getEnzrxnFilename()
Returns:
the enzrxnFilename

getGeneFilename

public java.lang.String getGeneFilename()
Returns:
the geneFilename

getPathwayFilename

public java.lang.String getPathwayFilename()
Returns:
the pathwayFilename

getProteinFilename

public java.lang.String getProteinFilename()
Returns:
the proteinFilename

getReactionFilename

public java.lang.String getReactionFilename()
Returns:
the reactionFilename

getClassFilename

public java.lang.String getClassFilename()
Returns:
the classFilename

getCompoundFilename

public java.lang.String getCompoundFilename()
Returns:
the compoundFilename

createBigMap

public java.util.Map createBigMap()
create a big map containing all instances. Before this is called, setDirectory() must be called

Returns:
the big map of all instances. The key is the unique id, and the value is BiocycElement

createReactionNetwork

public java.lang.Object[] createReactionNetwork(java.util.Map bigMap)
create a big network of all Biocyc information

Parameters:
bigMap - the big map of the instance
Returns:
the big network only containing the unique id

createClassPathway

public org._3pq.jgrapht.DirectedGraph createClassPathway(java.util.Map bigMap)
get the pathway and class relation

Parameters:
bigMap -
Returns:
the class to pathway graph

createClassNetwork

public org._3pq.jgrapht.DirectedGraph createClassNetwork(java.util.Map bigMap)
create the class network

Parameters:
bigMap - the big map of the instance
Returns:
the class network containing the unique id

createNestedNetwork

public org._3pq.jgrapht.DirectedGraph createNestedNetwork(java.util.Map bigMap)
create the super pathway network

Parameters:
Map - the big map of the instance
Returns:
the super pathway containing the unique id

decomposePathway

public org._3pq.jgrapht.DirectedGraph decomposePathway(org._3pq.jgrapht.DirectedGraph network,
                                                       java.util.Map dataMap,
                                                       java.util.Collection pbidList)
get the graph model containing specified pathways

Parameters:
network - the network after rewrite
dataMap - the blockunit map
pbidList - the pathway blockid list
Returns:
the subgraph

rewritePathway

public java.util.Map rewritePathway(org._3pq.jgrapht.DirectedGraph pathwayNet,
                                    java.util.Map bigMap,
                                    org._3pq.jgrapht.DirectedGraph network,
                                    java.util.Map dataMap,
                                    java.lang.String organism,
                                    java.lang.String username,
                                    java.lang.String source)
construct pathway blockunit

Parameters:
pathwayNet - the nested net
bigMap - the big map of biocyc
network - the reaction network
dataMap - the datamap
Returns:
the pathway blockid and blockunit map

rewriteGraph

public java.lang.Object[] rewriteGraph(java.util.Map bigMap,
                                       org._3pq.jgrapht.DirectedGraph reactionNet,
                                       org.apache.commons.collections.map.MultiKeyMap coeffMap,
                                       org._3pq.jgrapht.DirectedGraph classNet,
                                       java.lang.String organism,
                                       java.lang.String username,
                                       java.lang.String source)
the most important function in this conversion. It rewrites the reaction network from BioCyc to a labeled graph model for MetNet.

Parameters:
bigMap - the big map of all information with unique ID
reactionNet - the reaction network from BioCyc
classNet - the class network from BioCyc
Returns:
the labeled graph model and data mapping from the id to the object.

convertGraph

public edu.uci.ics.jung.graph.DirectedGraph convertGraph(org._3pq.jgrapht.DirectedGraph network,
                                                         java.util.Map dataMap)
convert to the JUNG graph

Parameters:
network - the reaction network
dataMap - the blockid and blockunit map
Returns:
the JUNG graph