def export_obo(self, path_to_export_file, name_of_ontology="<STR_LIT>", taxids=None):
fd = open(path_to_export_file, '<STR_LIT:w>')<EOL>header = "<STR_LIT>".format(time.strftime("<STR_LIT>"))<EOL>header += "<STR_LIT>".format(name_of_ontology)<EOL>header += '<STR_LIT>'<EOL>fd.write(header)<EOL>query = self.session.query(models.Entry).limit(<NUM_LIT:100>)<EOL>if taxids:<EOL><INDENT>query = query.filter(models.Entry.taxid.in_(taxids))<EOL><DEDENT>for entry in query.all():<EOL><INDENT>fd.write('<STR_LIT>'.format(entry.accessions[<NUM_LIT:0>]))<EOL>if len(entry.accessions) > <NUM_LIT:1>:<EOL><INDENT>for accession in entry.accessions[<NUM_LIT:1>:]:<EOL><INDENT>fd.write('<STR_LIT>'.format(accession))<EOL><DEDENT><DEDENT>fd.write('<STR_LIT>'.format(entry.recommended_full_name))<EOL>for alternative_full_name in entry.alternative_full_names:<EOL><INDENT>fd.write('<STR_LIT>'.format(alternative_full_name.name))<EOL><DEDENT>for alternative_short_name in entry.alternative_short_names:<EOL><INDENT>fd.write('<STR_LIT>'.format(alternative_short_name.name))<EOL><DEDENT>fd.write('<STR_LIT>'.format(entry.gene_name))<EOL>for xref in entry.db_references:<EOL><INDENT>if xref.type_ in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>xref.identifier = '<STR_LIT::>'.join(xref.identifier.split('<STR_LIT::>')[<NUM_LIT:1>:])<EOL><DEDENT>fd.write('<STR_LIT>'.format(xref.type_, xref.identifier.replace('<STR_LIT:\\>', '<STR_LIT>')))<EOL><DEDENT><DEDENT>fd.close()<EOL>
export complete database to OBO (http://www.obofoundry.org/) file

:param path_to_export_file: path to export file
:param taxids: NCBI taxonomy identifiers to export (optional)