owltools.panther
Class PANTHERTree

java.lang.Object
  extended by owltools.panther.PANTHERTree

public class PANTHERTree
extends Object

Methods to simplify the work with the Newick-ish output we get from PANTHER.


Constructor Summary
PANTHERTree(File pFile)
          Create an instance for the given path
 
Method Summary
 void addAssociatedGeneProduct(String bid, String blabel)
          Add an associated id/label for a term in this tree.
 Set<String> associatedIdentifierSet()
          Return a set of all identifiers associated with this family.
 Set<String> getAncestorAnnotations(String baseGpID)
          Return all annotations to ancestor nodes.
 Set<String> getAncestors(String nodeID)
          Return the ancestors of this node as an ID set.
 List<String> getAssociatedGeneProductIDs()
          Return the associated gene/product ids for this tree.
 String getAssociatedGeneProductJSONMap()
          Return the mapping of associated gene/product ids to labels for this tree.
 List<String> getAssociatedGeneProductLabels()
          Return the associated gene/product labels for this tree.
 Set<String> getDescendantAnnotations(String baseGpID)
          Return all annotations to descendant nodes.
 Set<String> getDescendants(String nodeID)
          Return the descendants of this node as an ID set.
 String getNHXString()
          Return the raw Newick-type input string.
 OWLShuntGraph getOWLShuntGraph()
          Return the complete OWL shunt graph representation of the phylogenic tree.
 String getPANTHERID()
          Return the tree public (PANTHER) identifier.
 String getTreeID()
          Return the tree internal identifier.
 String getTreeLabel()
          Return the tree label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PANTHERTree

public PANTHERTree(File pFile)
            throws IOException
Create an instance for the given path

Parameters:
pFile - path
Throws:
IOException
Method Detail

addAssociatedGeneProduct

public void addAssociatedGeneProduct(String bid,
                                     String blabel)
Add an associated id/label for a term in this tree.

Parameters:
bid - the id
blabel - the label

getAssociatedGeneProductIDs

public List<String> getAssociatedGeneProductIDs()
Return the associated gene/product ids for this tree.

Returns:
list of IDs

getAssociatedGeneProductLabels

public List<String> getAssociatedGeneProductLabels()
Return the associated gene/product labels for this tree.

Returns:
list of labels

getAssociatedGeneProductJSONMap

public String getAssociatedGeneProductJSONMap()
Return the mapping of associated gene/product ids to labels for this tree.

Returns:
JSON string map

getNHXString

public String getNHXString()
Return the raw Newick-type input string.

Returns:
string

getTreeLabel

public String getTreeLabel()
Return the tree label. The tree label has the ID appended to prevent conflation of upstream IDs.

Returns:
label

getTreeID

public String getTreeID()
Return the tree internal identifier.

Returns:
tree id

getPANTHERID

public String getPANTHERID()
Return the tree public (PANTHER) identifier.

Returns:
panther id

getOWLShuntGraph

public OWLShuntGraph getOWLShuntGraph()
Return the complete OWL shunt graph representation of the phylogenic tree.

Returns:
graph

getAncestors

public Set<String> getAncestors(String nodeID)
Return the ancestors of this node as an ID set. Includes this node. null if nothing is in the graph.

Parameters:
nodeID - node id
Returns:
all ancestors (inclusive)

getDescendants

public Set<String> getDescendants(String nodeID)
Return the descendants of this node as an ID set. Includes this node. null if nothing is in the graph.

Parameters:
nodeID - node id
Returns:
all ancestors (inclusive)

getAncestorAnnotations

public Set<String> getAncestorAnnotations(String baseGpID)
Return all annotations to ancestor nodes.

Parameters:
baseGpID - gene product id
Returns:
all ancestor annotations (inclusive)

getDescendantAnnotations

public Set<String> getDescendantAnnotations(String baseGpID)
Return all annotations to descendant nodes.

Parameters:
baseGpID - gene product id
Returns:
all descendant annotations (inclusive)

associatedIdentifierSet

public Set<String> associatedIdentifierSet()
Return a set of all identifiers associated with this family.

Returns:
set of ids


Copyright © 2010-2013. All Rights Reserved.