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 = (note this may require further transformation, if EXT contains references to gene products) # STEP 2 - map to protein ID IF .IRI startsWith "uniProtKB" THEN let = ELSE let = SELECT WHERE SubClassOf encoded_by some ### requires Omeo This could also be done via a gp2protein file. # 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.