OBO= http://purl.obolibrary.org/obo all: mf-merged.owl ######################################### # # Downloads # tsv: rhea-tsv.tar.gz tar -zxvf $< rhea-tsv.tar.gz: wget ftp://ftp.ebi.ac.uk/pub/databases/rhea/tsv/rhea-tsv.tar.gz # rhea 'basic' - just names subsets and xrefs, some isas rhea.obo: tsv/rhea2xrefs.tsv ./util/tsv2obo.pl $< > $@ rhea-biopax_lite.owl: rhea-biopax_lite.owl.gz gzip -dc $< > $@ rhea-biopax_lite.owl.gz: wget ftp://ftp.ebi.ac.uk/pub/databases/rhea/biopax/$@ .PRECIOUS: rhea-biopax_lite.owl.gz ######################################### # # Basic Reports # reports: go-rhea-align-via-xref.rpt go-rhea-align-via-xref.rpt go-rhea-xref-cardinality-all.rpt go-rhea-xref-summary-2.rpt go-rhea-xref-summary.rpt go-rhea-align-via-xref.rpt: rhea.obo blip-findall -r go -consult util/check_go.pro -i $< xref_check/4 -label -no_pred -use_tabs > $@ go-rhea-xref-cardinality.rpt: rhea.obo blip-findall -r go -consult util/card_report.pro card/3 -no_pred -label -use_tabs > $@.tmp && cut -f1,3-8 $@.tmp | mysort -k2 > $@ go-rhea-xref-cardinality-all.rpt: rhea-pathway_db.pro rhea.obo blip-findall -r go -i $< -consult util/card_report.pro card/3 -no_pred -label -use_tabs > $@.tmp && cut -f1,3-8 $@.tmp | mysort -k2 > $@ go-rhea-xref-summary.rpt: rhea.obo blip-findall -r go -consult util/card_report.pro summary/4 -no_pred -label -use_tabs > $@ go-rhea-xref-summary-2.rpt: rhea.obo blip-findall -r go -consult util/card_report.pro summary_level_2/4 -no_pred -label -use_tabs > $@ rhea-chebi.tbl: blip-findall -i rhea-pathway_db.pro -r chebi -consult util/xpgen.pro rhea_chebi/4 -label > $@ ######################################### # # Reactions # # convert Rhea BioPAX to blipkit pathway model # sometimes fails? rhea-pathway_db.pro: rhea-biopax_lite.owl blip -i $< -f rdf -u biopax2_bridge_to_pathway io-convert -to pathway_db:pro > $@.tmp && ./util/fix-bp-uris.pl $@.tmp > $@ # ** rheax = RHEA, aXiomatized ** # translate pathway model to blipkit obo model rheax-ontol_db.pro: blip-findall -r chebi -i rhea-pathway_db.pro -consult util/xpgen.pro wfacts > $@ # logical definitions. E.g: # [Term] # id: RHEA:28425 # comment: RHEA:IUBMB=false # intersection_of: GO:0003824 # intersection_of: has_substance_bag CHEBIX:15377-2.0-58349-1.0-60954-1.0 ! water-2.0 + NADP(3-)-1.0 + 2-hydroxy-2-methylbutanenitrile-1.0 # intersection_of: has_substance_bag CHEBIX:15378-1.0-15379-1.0-57783-1.0-61136-1.0 ! hydron-1.0 + dioxygen-1.0 + NADPH(4-)-1.0 + (Z)-2-methylbutanal oxime-1.0 rheax.obo: rheax-ontol_db.pro blip -i $< io-convert -to obo -o $@ rheax.owl: rheax.obo owltools $< -o -f manchester $@ # chebi without relationships chebi_lite.obo: owltools $(OBO)/chebi.owl --make-subset-by-properties // -o -f obo $@ # subset of chebi_lite required to axiomatize rheax chebi_import.owl: rheax.owl chebi_lite.obo owltools $< chebi_lite.obo --add-imports-from-supports --extract-module -s $(OBO)/chebi.owl -c --extract-mingraph --set-ontology-id $(OBO)/go/extensions/$@ -o file://`pwd`/$@ # MERGED rhea-plus.owl: rhea.obo rheax.owl owltools --create-ontology $(OBO)/rhea.owl $< rheax.owl chebi_import.owl --merge-support-ontologies -o -f functional $@ # transformed version of MF ontology, with xrefs to RHEA turned into equivalence axioms mf.obo: blip ontol-query -r go -query "belongs(ID,molecular_function)" -to obo > $@.tmp && perl -npe 's@xref: RHEA@equivalent_to: RHEA@' $@.tmp >$@ #mf.owl: mf.obo # owltools $< --remove-dangling -o mf.owl mf-rhea-equiv.obo: mf.obo obo-grep.pl -r equivalent_to mf.obo | obo-filter-tags.pl -t equivalent_to -t id - | perl -npe 's@ontology: go@ontology: go/extensions/mf-rhea-equiv@' > $@ mf-rhea-equiv.owl: mf-rhea-equiv.obo owltools $< -o -f functional $@.tmp && grep -v ^Declaration $@.tmp | grep -v ^AnnotationAssertion > $@ rhea_import.owl: mf.obo rhea-plus.owl owltools $< rhea-plus.owl --add-imports-from-supports --extract-module -s $(OBO)/rhea.owl -c --set-ontology-id $(OBO)/go/extensions/$@ -o file://`pwd`/$@ mf-plus.owl: mf.obo rhea_import.owl owltools $< rhea_import.owl --merge-support-ontologies -o -f functional $@ #mf-inf.obo: mf-plus.owl # owltools $< --assert-inferred-subclass-axioms --allowEquivalencies --markIsInferred -o -f obo --no-check $@ # todo - fix owltools - merged sets should not have 1 member - causes problems for functional writer mf-merged.owl: mf-plus.owl owltools $< --merge-equivalent-classes -f RHEA -t GO --remove-dangling -o $@ mf-inf.obo: mf-merged.owl owltools $< --assert-inferred-subclass-axioms --allowEquivalencies --markIsInferred -o -f obo --no-check $@ ######################################### # # Derived Reports # mf-connections.rpt: rheax.obo blip-findall -consult util/connections.pro -i $< -r go mfconnected/3 -label -no_pred > $@ mf-connections.obo: mf-connections.rpt cut -f1,2 $< | tbl2obolinks.pl -k --rel connected_to $< > $@