def load_multi_database(gb_filename_or_handle, gb_filename_or_handle2):
 TESTDB = create_database()
 db_name = 'biosql-test'
 db_name2 = 'biosql-test2'
 server = BioSeqDatabase.open_database(driver=DBDRIVER, user=DBUSER, passwd=DBPASSWD, host=DBHOST, db=TESTDB)
 db = server.new_database(db_name)
 iterator = SeqIO.parse(gb_filename_or_handle, 'gb')
 count = db.load(iterator)
 db = server.new_database(db_name2)
 iterator = SeqIO.parse(gb_filename_or_handle2, 'gb')
 count2 = db.load(iterator)
 server.commit()
 server.close()
 return (count + count2)

def load_multi_database ( gb_filename_or_handle , gb_filename_or_handle2 ) : TESTDB = create_database ( ) db_name = 'biosql-test' db_name2 = 'biosql-test2' server = BioSeqDatabase . open_database ( driver = DBDRIVER , user = DBUSER , passwd = DBPASSWD , host = DBHOST , db = TESTDB ) db = server . new_database ( db_name ) iterator = SeqIO . parse ( gb_filename_or_handle , 'gb' ) count = db . load ( iterator ) db = server . new_database ( db_name2 ) iterator = SeqIO . parse ( gb_filename_or_handle2 , 'gb' ) count2 = db . load ( iterator ) server . commit ( ) server . close ( ) return ( count + count2 )
load two genbank files into a new biosql database as different subdatabases .