
cc_part_whole_disjoint.obo: foo.pro
	blip -i $< io-convert -f ontol_db:pro -to obo -o $@
.PRECIOUS: cc_part_whole_disjoint.obo


foo.pro:
#	blip -i cellular_component_xp_self.obo -u manifest_disj_in_cc io-convert -to ontol_db:pro | grep disj > $@.tmp && mv $@.tmp $@
	blip -i cellular_component_xp_self.obo -u manifest_disj_in_cc findall t/0 > $@.tmp && mv $@.tmp $@

%-reasoned.pro: %.obo
	blip-reasoner -r obo/cellular_component -i $< -to ontol_db:pro > $@.tmp && mv $@.tmp $@ 
.PRECIOUS: %-reasoned.pro

%-violations: %.obo
	blip -r obo/cellular_component -i $< -u query_obo findall disjointness_violationNR/3 > $@.tmp && sort -u $@.tmp > $@

%-v2: %.obo
	blip-reasoner -r obo/cellular_component -i $< -explain disjointness > $@.tmp && mv $@.tmp $@

%-r.pro: %.obo
	blip-reasoner -r obo/cellular_component -i $< -to ontol_db:pro > $@.tmp && mv $@.tmp $@

%-show: %-reasoned.pro
	blip -f ontol_db:pro -i $< -u ontol_db findall "(is_unsatisfiable(X),\+((subclass(X,Y),X\=Y,is_unsatisfiable(Y))),class(X,N))"

reas:
	blip-reasoner -r obo/cellular_component -i cc_part_whole_disjoint.obo cellular_component_disj.obo -to ontol_db:pro > $@.tmp && mv $@.tmp $@
