Show allShow sourceontol_sqlmap_obd.pro --

@author Chris Mungall @version $Revision: 1.10 $ @date $Date: 2005/09/30 16:23:45 $ @license LGPL

Name

% ontol_sqlmap_obd

Synopsis

:- use_module(bio(ontol_db)).
:- use_module(bio(ontol_sqlmap_obd)).

% access biopax OWL model using ontol_db predicates
demo:-
  load_bioresource(rdb(obd)),
  class(ID,rna),
  format('In biopax, rna is a subclass of the following:~n',[]),
  forall(subclass(ID,PID),
         showclass(PID)).

showclass(ID):-
  class(ID,N),
  format('Class ID:~w~nClass name:~w~n',[ID,N]).

Description

command line usage:

blip -u ontol_sqlmap_obd -r rdb/obd2 ontol-subset -n apoptosis
blip-sql -debug sql -r obd/obdp -u ontol_sqlmap_obd sql-map "curation_statement(A,'OMIM:601653.0001',R,P)"

blip-sql -u ontol_db -u ontol_sqlmap_obd -sqlbind inst_rel_type/3-pkb -r obd/pkb findall "inst_rel_type(X,Y,Z)"

(now have to bind to the full term e.g obd(pkb) or just _)

blip -r obd/obdbirn -debug sql -u curation_db -u ontol_db -u blipkit_sql -u ontol_sqlmap_obd sql-map "curation_statementT(_,'PKB:Human_with_Parkinsons_Disease',_,X,Y)"

blip -r obd/obdbirn -debug sql -u curation_db -u ontol_db -u blipkit_sql -u ontol_sqlmap_obd ontol-fmatch PKB:Human_with_Parkinsons_Disease PKB:nlx_organ_20090204_214 -sqlbind "curation_db:curation_statementT/5-_"

Finding the LCA given two classes

In ontol_db.pro, the predicate subclass/2 is used to relate a class to its superclass. E.g. subclass(human,homo). subclassT/2 is the transitive version of this predicate, and subclassRT/2 is the reflexive transitive version (i.e. subclassRT(human,human))

The class_pair_subclass_lca/3 definition looks like this:

class_pair_subclass_lca(X,Y,LCA):-
      subclassRT(X,LCA),
      subclassRT(Y,LCA),
      \+ (( subclassRT(X,CA),
            subclassRT(Y,CA),
            subclassT(CA,LCA))).

i.e. LCA is the lowest common ancestor of X and Y by subclass if: