PB = GO:0005515 URL = ftp://ftp.ebi.ac.uk/pub/databases/interpro all: iprgo.obo ipr-core.obo merged.obo ParentChildTreeFile.txt: wget $(URL)/ParentChildTreeFile.txt short_names.dat: wget $(URL)/$@ interpro.xml: wget $(URL)/$@ ipr-names.tbl: interpro.xml xmlstarlet sel -t -m "//interpro" -v '@id' -o " " -v '@short_name' -o " " -v @type --nl $< > $@ ipr-names.obo: ipr-names.tbl ./iprtbl2obo.pl $< > $@ ipr-core.obo: ParentChildTreeFile.txt ./ipr-parent-child-to-obo.pl ParentChildTreeFile.txt > $@.tmp && mv $@.tmp $@ iprgo-core.obo: interpro_binding_edited.txt ./mapping2ont.pl $< > $@.tmp && mv $@.tmp $@ go-domain-binding-subset.obo: blip ontol-query -r go -query "subclassT(ID,'GO:0019904')" -to obo > $@ go-binding-subset.obo: blip ontol-query -r go -r go_xp -query "subclassT(ID,'$(PB)'),\+genus(ID,_) " -to obo > $@.tmp && obo-grep.pl -r 'name: .* binding' $@.tmp > $@ # blip ontol-query -r go -query "subclassT(ID,'$(PB)') " -to obo > $@.tmp && obo-grep.pl -r 'name: .* binding' $@.tmp > $@ # blip ontol-query -r go -query "subclassT(ID,'$(PB)'),\+ (( subclassT(ID,X),subclass(X,'GO:0005488'),X\=$(PB))) " -to obo > $@.tmp && obo-grep.pl -r 'name: .* binding' $@.tmp > $@ go-binding-subset-anc.obo: blip ontol-subset -r go -query "subclassT(ID,'$(PB)')" -to obo > $@ # this takes the GO hierarchy and makes a protein hierarchy to reflect it # #iprgo-derived.obo: go-domain-binding-subset.obo iprgo-derived.obo: go-binding-subset.obo ./go2ipr.pl $< > $@ # combine and remove redundant IN = header.obo ipr-core.obo iprgo-core.obo iprgo-derived.obo ipr-names.obo iprgo-stage1.owl: $(IN) owltools $(IN) --merge-support-ontologies --reasoner elk --merge-equivalent-classes -f IPRGO -t IPR --assert-inferred-subclass-axioms --markIsInferred -o $@ iprgo-stage1.obo: iprgo-stage1.owl owltools $< -o -f obo --no-check $@ # only use names and exact syns iprgo-stage1-strict.obo: iprgo-stage1.obo egrep -v '(NARROW|RELATED|BROAD)' $< > $@ matches.txt: iprgo-stage1-strict.obo blip-findall -u metadata_nlp -consult ignore.pro -i $< -goal index_entity_pair_label_match "entity_pair_label_reciprocal_best_intermatch(X,Y,S)" -no_pred | cut -f1,2 | sort -u > $@ matches.owl: matches.txt owltools --create-ontology test --parse-tsv -a EquivalentClasses $< -o $@ iprgo.owl: iprgo-stage1.owl matches.owl owltools $< matches.owl --merge-support-ontologies --reasoner elk --merge-equivalent-classes -f IPRGO -t IPR --assert-inferred-subclass-axioms --markIsInferred -o $@ iprgo.obo: iprgo.owl owltools $< -o -f obo --no-check $@ clean: rm iprgo* #new-domain.txt: # obol qobol-newterms -ontology GO -tag domain -subclass GO:0019904 > $@ x-domain.obo: obol qobol -ontology GO -i iprgo.obo -tag domain -subclass $(PB) -export obo > $@.tmp && obo-grep.pl -r IPR $@.tmp > $@ # obol qobol -ontology GO -i iprgo.obo -tag domain -subclass GO:0019904 -export obo > $@ XIN = go-binding-subset-anc.obo x-domain.obo iprgo.obo merged.owl: $(XIN) owltools $(XIN) --merge-support-ontologies -o $@ merged.obo: merged.owl owltools $< -o -f obo --no-check $@ merged-inf.obo: merged.owl owltools $< --assert-inferred-subclass-axioms --markIsInferred -o -f obo --no-check $@