def _get_unique_barcode_ids(pb_index, isoseq_mode=False):
    """
    Get a list of sorted, unique fw/rev barcode indices from an index object.
    """
    bc_sel = (pb_index.bcForward != -1) & (pb_index.bcReverse != -1)
    bcFw = pb_index.bcForward[bc_sel]
    bcRev = pb_index.bcReverse[bc_sel]
    bc_ids = sorted(list(set(zip(bcFw, bcRev))))
    if isoseq_mode:
        bc_ids = sorted(list(set([tuple(sorted(bc)) for bc in bc_ids])))
    return bc_ids