def kegg_get(dbentries, option=None):
 if (isinstance(dbentries, list) and (len(dbentries) <= 10)):
  dbentries = '+'.join(dbentries)
 elif (isinstance(dbentries, list) and (len(dbentries) > 10)):
  raise Exception('Maximum number of dbentries is 10 for kegg get query')
 if (option in ['aaseq', 'ntseq', 'mol', 'kcf', 'image', 'kgml']):
  resp = _q('get', dbentries, option)
 elif option:
  raise Exception('Invalid option arg for kegg get request.')
 else:
  resp = _q('get', dbentries)
 return resp

def kegg_get ( dbentries , option = None ) : if ( isinstance ( dbentries , list ) and ( len ( dbentries ) <= 10 ) ) : dbentries = '+' . join ( dbentries ) elif ( isinstance ( dbentries , list ) and ( len ( dbentries ) > 10 ) ) : raise Exception ( 'Maximum number of dbentries is 10 for kegg get query' ) if ( option in [ 'aaseq' , 'ntseq' , 'mol' , 'kcf' , 'image' , 'kgml' ] ) : resp = _q ( 'get' , dbentries , option ) elif option : raise Exception ( 'Invalid option arg for kegg get request.' ) else : resp = _q ( 'get' , dbentries ) return resp
kegg get - data retrieval .