owltools.gaf
Class EcoTools

java.lang.Object
  extended by owltools.gaf.EcoTools

public class EcoTools
extends Object

Methods to simplify the work with the evidence code ontology (ECO).


Field Summary
static String ECO_PURL
           
 
Constructor Summary
EcoTools(OWLGraphWrapper eco)
          Create a new instance using the ECO graph wrapper.
EcoTools(OWLGraphWrapper graph, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, boolean disposeReasoner)
          Create an instance for the given graph and reasoner.
EcoTools(ParserWrapper pw)
          Create a new instance using the given ParserWrapper to load the ECO.
 
Method Summary
 void dispose()
          Clean up the internal data structures, usually done as last operation.
 Set<org.semanticweb.owlapi.model.OWLClass> getAncestors(Set<org.semanticweb.owlapi.model.OWLClass> sources, boolean reflexive)
          Wrapper method for the reasoner.
 Set<org.semanticweb.owlapi.model.OWLClass> getClassesForGoCode(String goCode)
          Retrieve the ECO classes for the given GO annotation codes.
static Set<org.semanticweb.owlapi.model.OWLClass> getClassesForGoCodes(OWLGraphWrapper eco, Set<String> goCodes)
          Retrieve the ECO classes for the given GO annotation codes.
static Set<org.semanticweb.owlapi.model.OWLClass> getClassesForGoCodes(OWLGraphWrapper eco, String... goCodes)
          Retrieve the ECO classes for the given GO annotation codes.
static Set<String> getCodes(Set<org.semanticweb.owlapi.model.OWLClass> classes, OWLGraphWrapper eco)
           
static Set<String> getCodes(Set<org.semanticweb.owlapi.model.OWLClass> classes, OWLGraphWrapper eco, boolean includeDescendants)
          Retrieve the set of codes for a given set of ECO classes.
 Set<org.semanticweb.owlapi.model.OWLClass> getDescendents(Set<org.semanticweb.owlapi.model.OWLClass> sources, boolean reflexive)
          Wrapper method for the reasoner
static OWLGraphWrapper loadECO(ParserWrapper pw)
          Load the evidence code ontology (ECO) from its default PURL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ECO_PURL

public static final String ECO_PURL
See Also:
Constant Field Values
Constructor Detail

EcoTools

public EcoTools(OWLGraphWrapper graph,
                org.semanticweb.owlapi.reasoner.OWLReasoner reasoner,
                boolean disposeReasoner)
         throws org.semanticweb.owlapi.model.UnknownOWLOntologyException,
                org.semanticweb.owlapi.model.OWLOntologyCreationException
Create an instance for the given graph and reasoner.

Parameters:
graph -
reasoner -
disposeReasoner - set to true, if the reasoner should also be disposed
Throws:
org.semanticweb.owlapi.model.UnknownOWLOntologyException
org.semanticweb.owlapi.model.OWLOntologyCreationException
See Also:
dispose()

EcoTools

public EcoTools(ParserWrapper pw)
         throws org.semanticweb.owlapi.model.OWLOntologyCreationException,
                IOException,
                org.obolibrary.oboformat.parser.OBOFormatParserException
Create a new instance using the given ParserWrapper to load the ECO.

Parameters:
pw -
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
IOException
org.obolibrary.oboformat.parser.OBOFormatParserException

EcoTools

public EcoTools(OWLGraphWrapper eco)
Create a new instance using the ECO graph wrapper.

Parameters:
eco -
Method Detail

getClassesForGoCode

public Set<org.semanticweb.owlapi.model.OWLClass> getClassesForGoCode(String goCode)
Retrieve the ECO classes for the given GO annotation codes.

Parameters:
goCode -
Returns:
set of ECO classes

getAncestors

public Set<org.semanticweb.owlapi.model.OWLClass> getAncestors(Set<org.semanticweb.owlapi.model.OWLClass> sources,
                                                               boolean reflexive)
Wrapper method for the reasoner.

Parameters:
sources -
reflexive -
Returns:
set of super classes

getDescendents

public Set<org.semanticweb.owlapi.model.OWLClass> getDescendents(Set<org.semanticweb.owlapi.model.OWLClass> sources,
                                                                 boolean reflexive)
Wrapper method for the reasoner

Parameters:
sources -
reflexive -
Returns:
set of sub classes

dispose

public void dispose()
Clean up the internal data structures, usually done as last operation.


loadECO

public static OWLGraphWrapper loadECO(ParserWrapper pw)
                               throws IOException,
                                      org.semanticweb.owlapi.model.OWLOntologyCreationException,
                                      org.obolibrary.oboformat.parser.OBOFormatParserException
Load the evidence code ontology (ECO) from its default PURL.

Parameters:
pw -
Returns:
eco ontology graph
Throws:
IOException
org.semanticweb.owlapi.model.OWLOntologyCreationException
org.obolibrary.oboformat.parser.OBOFormatParserException

getClassesForGoCodes

public static Set<org.semanticweb.owlapi.model.OWLClass> getClassesForGoCodes(OWLGraphWrapper eco,
                                                                              String... goCodes)
Retrieve the ECO classes for the given GO annotation codes.

Parameters:
eco -
goCodes -
Returns:
set of ECO classes

getClassesForGoCodes

public static Set<org.semanticweb.owlapi.model.OWLClass> getClassesForGoCodes(OWLGraphWrapper eco,
                                                                              Set<String> goCodes)
Retrieve the ECO classes for the given GO annotation codes.

Parameters:
eco -
goCodes -
Returns:
set of ECO classes

getCodes

public static Set<String> getCodes(Set<org.semanticweb.owlapi.model.OWLClass> classes,
                                   OWLGraphWrapper eco)

getCodes

public static Set<String> getCodes(Set<org.semanticweb.owlapi.model.OWLClass> classes,
                                   OWLGraphWrapper eco,
                                   boolean includeDescendants)
Retrieve the set of codes for a given set of ECO classes. Option: include sub classes of all the classes. Uses a reasoner to infer the sub classes.

Parameters:
classes -
eco -
includeDescendants - set to true if sub classes should be included
Returns:
set of codes potentially used for the given ECO classes


Copyright © 2010-2013. All Rights Reserved.