def process_bc_freqs(bc_freqs):
 bcs_list = []
 for curr_key in bc_freqs.keys():
  bcs_list.append((curr_key, int(bc_freqs[curr_key])))
 bcs_list = sorted(bcs_list, key=itemgetter(1), reverse=True)
 sorted_bcs = []
 for curr_bc in bcs_list:
  sorted_bcs.append(('%s DCTB %d' % (curr_bc[0], curr_bc[1])))
 return sorted_bcs

def process_bc_freqs ( bc_freqs ) : bcs_list = [ ] for curr_key in bc_freqs . keys ( ) : bcs_list . append ( ( curr_key , int ( bc_freqs [ curr_key ] ) ) ) bcs_list = sorted ( bcs_list , key = itemgetter ( 1 ) , reverse = True ) sorted_bcs = [ ] for curr_bc in bcs_list : sorted_bcs . append ( ( '%s DCTB %d' % ( curr_bc [ 0 ] , curr_bc [ 1 ] ) ) ) return sorted_bcs
sorts barcode frequencies according to counts .