@files( "pipeline.ini", "ensembldb.copy.log" )
def copyEnsemblDb( infile, outfile ):
    '''copy tables from ensembl database to rnaseq database'''
    table_list = P.asList(PARAMS["ensembl_tables"])
    dbhandle = sqlite3.connect( PARAMS["database"] )
    cc = dbhandle.cursor()
    query = PARAMS["ensembl_db"] % """ATTACH "%s" as ensembl;"""
    cc.execute( query )
    for table in table_list:
        cc = dbhandle.cursor()
        query = """CREATE TABLE %s AS SELECT * FROM ensembl.%s;""" % (table, table)
        print query
        cc.execute( query )
    cc.close()
    statement = """touch %(outfile)s;"""
    P.run()
    
############################################################
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_rnaseq_brawand.py/copyEnsemblDb/swapped operands of `%`