owltools.gaf.lego
Class GafToLegoTranslator

java.lang.Object
  extended by owltools.gaf.lego.GafToLegoTranslator

public class GafToLegoTranslator
extends Object

Given a set of gene associations, this procedure will generate LEGO individuals.

The set of associations can be specified by a user query. Includes:

 grepping a GAF and feeding results
 selecting all associations for all genes that are involved with some process

# STEP 0 - map GeneAssociation in GAF model

GeneAssociation(
 bioentity:
 class:
 ext:
 reference:
 evidence: # TODO
)

==>

# STEP 1 - calculate class expression

IF 
 THEN let  = IntersectionOf( )
 ELSE let  = 

# STEP 2 - map to protein ID

IF .IRI startsWith "uniProtKB"
 THEN let  = 
 ELSE let  = SELECT  WHERE  SubClassOf encoded_by some   ### requires Omeo

# STEP 3 - create instance:

IF  SubClassOf MF THEN:

 NamedIndividual( 
   Types: 
     ,
     enabled_by SOME 
   Facts:
     source 

ELSE IF  SubClassOf CC THEN:

 NamedIndividual( 
   Types: 
     'molecular_function', occurs_in some  
     enabled_by SOME 
   Facts:
     source 

ELSE IF  SubClassOf BP THEN:

  # note we create two individuals here

 NamedIndividual( 
   Types: 
     
   Facts:
     source 


 NamedIndividual( 
   Types: 
     'molecular_function'
     enabled_by SOME 
  Facts:
    part_of ,
    source 


# VARIANT OF ABOVE STEP

(optional)

keep a map of Refs -> generated Ids 

when performing , first check map. If an individual Id has already been generated for this , then re-use the existing id from the map.

Note this may result in multiple classification of individuals (MCI). The user can rectify these in Protege.

One variant of this strategy may be to retain the original Id,
generate new Ids for the collapsed aggregate MF individual, and
include evidence links back to the atomic MF individuals.

See Also:
lego-from-gaf.txt

Constructor Summary
GafToLegoTranslator(OWLGraphWrapper graph, Map<String,String> gp2protein)
           
 
Method Summary
 org.semanticweb.owlapi.model.OWLOntology minimizedTranslate(GafDocument gaf)
          Translate the given GafDocument into an OWL representation of the LEGO model.
protected  void reportError(String error, GeneAnnotation annotation)
           
protected  void reportWarn(String warning, GeneAnnotation annotation)
           
 org.semanticweb.owlapi.model.OWLOntology translate(Collection<GeneAnnotation> annotations)
          Translate the given annotations (GeneAnnotation) into an OWL representation of the LEGO model.
 org.semanticweb.owlapi.model.OWLOntology translate(GafDocument gaf)
          Translate the given GafDocument into an OWL representation of the LEGO model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GafToLegoTranslator

public GafToLegoTranslator(OWLGraphWrapper graph,
                           Map<String,String> gp2protein)
Method Detail

reportError

protected void reportError(String error,
                           GeneAnnotation annotation)

reportWarn

protected void reportWarn(String warning,
                          GeneAnnotation annotation)

translate

public org.semanticweb.owlapi.model.OWLOntology translate(GafDocument gaf)
Translate the given GafDocument into an OWL representation of the LEGO model.

Parameters:
gaf -
Returns:
lego ontology

translate

public org.semanticweb.owlapi.model.OWLOntology translate(Collection<GeneAnnotation> annotations)
Translate the given annotations (GeneAnnotation) into an OWL representation of the LEGO model.

Parameters:
annotations -
Returns:
lego ontology

minimizedTranslate

public org.semanticweb.owlapi.model.OWLOntology minimizedTranslate(GafDocument gaf)
Translate the given GafDocument into an OWL representation of the LEGO model. Additionally minimize the lego model and imports into one ontology module.

Parameters:
gaf -
Returns:
minimized lego ontology


Copyright © 2010-2013. All Rights Reserved.