def read_barcodes_file(filename):
    """Read a barcodes.tsv filename, output set of unique barcodes
    They should already be unique.. the "frozenset" datastructure is just for
    quick checking of set membership
    """
    with open(filename) as f:
        barcodes = frozenset(x.strip().replace("_", "") for x in f.readlines())
    return barcodes