I have written for NCI Thesaurus a command-line tool to generate an inferred owl file (the Protégé export feature never worked quite right for us). The Protégé source for displaying these inferences in the GUI was very helpful during
The save method could probably be changed to the format you’d want. It’s just an owlapi driver, and specific to our publication. YMMV.