baseCode.bio.geneset
Class GONames

java.lang.Object
  extended bybaseCode.bio.geneset.GONames

public class GONames
extends java.lang.Object

Rea data from GO XML file, store in easy-to-use data structure.

Copyright (c) 2004 Columbia University

Version:
$Id: GONames.java,v 1.3 2004/12/28 22:07:27 pavlidis Exp $
Author:
Paul Pavlidis, Homin Lee

Constructor Summary
GONames(java.io.InputStream inputStream)
           
GONames(java.lang.String filename)
           
 
Method Summary
 void addClass(java.lang.String id, java.lang.String name)
           
 java.lang.String getAspectForId(java.lang.String go_ID)
          Get the aspect (molecular_function etc) for an id.
 java.util.Set getChildren(java.lang.String id)
           
 DirectedGraph getGraph()
          Get the graph representation of the GO hierarchy.
 java.util.Map getMap()
          Get the Map representation of the GO id - name associations.
 java.lang.String getNameForId(java.lang.String go_ID)
           
 java.util.Set getNewGeneSets()
          Return the Set of all new gene sets (ones which were added after loading the file)
 java.util.Set getParents(java.lang.String id)
           
 void modifyClass(java.lang.String id, java.lang.String name)
           
 boolean newSet(java.lang.String id)
          Check if a gene set is already defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GONames

public GONames(java.lang.String filename)
        throws org.xml.sax.SAXException,
               java.io.IOException
Parameters:
filename - String The XML file containing class to name mappings. First column is the class id, second is a description that will be used int program output.
Throws:
java.io.IOException
org.xml.sax.SAXException

GONames

public GONames(java.io.InputStream inputStream)
        throws java.io.IOException,
               org.xml.sax.SAXException
Parameters:
inputStream -
Throws:
java.io.IOException
org.xml.sax.SAXException
Method Detail

getGraph

public DirectedGraph getGraph()
Get the graph representation of the GO hierarchy. This can be used to support JTree representations.

Returns:

getChildren

public java.util.Set getChildren(java.lang.String id)
Parameters:
id -
Returns:
a Set containing the ids of geneSets which are immediately below the selected one in the hierarchy.

getParents

public java.util.Set getParents(java.lang.String id)
Parameters:
id -
Returns:
a Set containing the ids of geneSets which are immediately above the selected one in the hierarchy.

getMap

public java.util.Map getMap()
Get the Map representation of the GO id - name associations.

Returns:
Map

getNameForId

public java.lang.String getNameForId(java.lang.String go_ID)
Parameters:
go_ID - String
Returns:
String

getAspectForId

public java.lang.String getAspectForId(java.lang.String go_ID)
Get the aspect (molecular_function etc) for an id.

Parameters:
go_ID -
Returns:

addClass

public void addClass(java.lang.String id,
                     java.lang.String name)
Parameters:
id - String
name - String

modifyClass

public void modifyClass(java.lang.String id,
                        java.lang.String name)
Parameters:
id - String
name - String

newSet

public boolean newSet(java.lang.String id)
Check if a gene set is already defined.

Parameters:
id -
Returns:

getNewGeneSets

public java.util.Set getNewGeneSets()
Return the Set of all new gene sets (ones which were added after loading the file)

Returns:


Copyright © 2003-2005 Columbia University. All Rights Reserved.