# ======================================== # Regulation XP test # ======================================== # Anyone with oboedit2.29 or higher can generate these files # Just change to this directory and type # # make #GO=../../ontology/gene_ontology_edit.obo GO=../../ontology/editors/gene_ontology_write.obo SOURCES= go_reglive_withPosNeg_withPF go_reglive_withPosNeg_noPF go_reglive_noPosNeg_withPF go_reglive_noPosNeg_noPF TARGETS= $(patsubst %,%.obo,$(SOURCES)) NU_RPT_UNFILTERED = new-terms-report-unfiltered.txt RPT_UNFILTERED = report-unfiltered.txt RPT_FILTERED = report-filtered.txt # these two files are combined to make the full new set NU = new-term-queue.obo new-terms-full.obo all: $(TARGETS) $(RPT_FILTERED) go_reglive_withPosNeg_withPF-newlinks.txt go_reglive_withPosNeg_withPF-abduced-links.txt go_reglive_withPosNeg_withPF-reasoned-filtered.obo go_reglive_withNew-reasoned-filtered.obo go_reglive_withPosNeg_withPF-bpgenus.obo #all: $(TARGETS) go_reglive_withPosNeg_noPF-newlinks.txt go_reglive_withPosNeg_withPF-newlinks.txt update: cd ../../ontology/editors && cvs update gene_ontology_write.obo all_latest: update all test: all $(patsubst %,%-test,$(TARGETS)) all_owl: all $(patsubst %,%.owl,$(SOURCES)) all_owlx: all $(patsubst %,%.owl-xml,$(SOURCES)) # ALL intersection_of tags present # withPosNeg: Includes relationship: tags for regulates, positively_regulates and negatively_regulates # withPF: Regulation of MF terms (in MP) have links to the corresponding terms (in MF) go_reglive_withPosNeg_withPF.obo: $(GO) obo2obo -semanticparse -o $@ $< > $(RPT_UNFILTERED) .PRECIOUS: go_reglive_withPosNeg_with_PF.obo # run the reasoner over an .obo file and save both implied and asserted links %-reasoned.obo: %.obo obo2obo -o -saveimpliedlinks $@ $< > $@.log 2>&1 .PRECIOUS: %-reasoned.obo # run obol reasoner - oe reasoner seems to have some issues %-newlinks.txt: %.obo blip-reasoner -i $< -explain genus_differentia > $@.tmp && mv $@.tmp $@ %-abduced-links.txt: %.obo blip -i $< -u query_go findall abduce_link/4 > $@.tmp && mv $@.tmp $@ # ALL intersection_of tags present # withPosNeg: Includes relationship: tags for regulates, positively_regulates and negatively_regulates # noPF: Regulation of MF terms (in MP) DO NOT HAVE relationship tags to the corresponding terms (in MF) # (but the intersection_of tags do reference the MF term) # *** this is the combination we will probably go with *** %_withPosNeg_noPF.obo: %_withPosNeg_withPF.obo ./obol-remove-inter-ontology-link.pl $< > $@.tmp && mv $@.tmp $@ .PRECIOUS: %_withPosNeg_noPF.obo # ALL intersection_of tags present # noPosNeg: Includes relationship: tags for regulates, BUT NOT positively_regulates and negatively_regulates # withPF: Regulation of MF terms (in MP) have links to the corresponding terms (in MF) %_noPosNeg_withPF.obo: %_withPosNeg_withPF.obo egrep -v '^relationship: .*_regulates' $< > $@.tmp && mv $@.tmp $@ .PRECIOUS: %_noPosNeg_withPF.obo # ALL intersection_of tags present # noPosNeg: Includes relationship: tags for regulates, BUT NOT positively_regulates and negatively_regulates # noPF: Regulation of MF terms (in MP) DO NOT HAVE relationship tags to the corresponding terms (in MF) # (but the intersection_of tags do reference the MF term) %_noPosNeg_noPF.obo: %_noPosNeg_withPF.obo ./obol-remove-inter-ontology-link.pl $< > $@.tmp && mv $@.tmp $@ .PRECIOUS: %_noPosNeg_noPF.obo %_noXP.obo: %.obo ./obol-remove-or-replace-regulation-xps.pl $< > $@.tmp && mv $@.tmp $@ biological_process_xp_regulation.obo: go_reglive_withPosNeg_withPF.obo obo-grep.pl -r intersection_of $< | obo-filter-tags.pl -t id -t intersection_of > $@.tmp && mv $@.tmp $@ # this ontology includes terms in the term queue %_withNew.obo: %_withPosNeg_noPF.obo $(NU) obo2obo -semanticparse -addsynonyms -o $@ $< $(NU) > $(NU_RPT_UNFILTERED) 2>&1 .PRECIOUS: %_withNew.obo # experimental: new terms added here new-term-queue.txt: $(GO) cvs update new-term-queue.txt .PRECIOUS: new-term-queue.txt new-term-queue.obo: new-term-queue.txt (./tq2obo.pl $< > $@.tmp) > $@.err && mv $@.tmp $@ # grep regulation $< | (tbl2obo.pl > $@.tmp && mv $@.tmp $@) > $@.err 2>&1 %.owl: %.obo obo2owl -o file://`pwd`/$@ $< %.owl-xml: %.obo obo2owl -owlformat owlxml -o file://`pwd`/$@ $< # this is just an extra-paranoid test to see if the generated files can be parsed %-test: % obo2obo -o $@.tmp $< && diff $@.tmp $< > $@ ; echo done %-bpgenus.obo: %.obo perl -npe 's/intersection_of: GO:0065007.*/intersection_of: GO:0008150/' $< > $@.tmp && mv $@.tmp $@ %-filtered.obo: %.obo ./filter.pl $< > $@ # grep -v ^intersection_of: $< | egrep -v '^relationship:.*implied' > $@ $(RPT_FILTERED): $(RPT_UNFILTERED) ./filter-report.pl ../xps/biological_process_xp_self.obo ../xps/biological_process_xp_multi_organism_process.obo ../xps/biological_process_xp_cell.obo ../xps/biological_process_xp_uber_anatomy.obo regulates_QC_report_to_skip.txt $(RPT_UNFILTERED) | sort > $@ %-rx.obo: %.obo blip -i $< -debug rx -u go_transform_regulates io-convert -to obo -o $@