#NEWLINE# def cgi_search_DBRawChIP( dbfile , query ) : #NEWLINE# #INDENT# db = dbRawChIP . DBRawChIP ( file = dbfile ) #NEWLINE# where_clause = '' #NEWLINE# if query : #NEWLINE# #INDENT# terms = parse_query_text ( query ) #NEWLINE# where_clause = ( 'where ' + ' and ' . join ( map ( ( lambda x : ( ( ( str ( x [ 0 ] ) + ' like "%%' ) + str ( x [ 1 ] ) ) + '%%"' ) ) , terms ) ) ) #NEWLINE# #UNINDENT# c = db . execute ( ( 'select id,factor,organism,cell,condition,platform,lab,pmid from chips %s order by id' % where_clause ) ) #NEWLINE# return c