def map_to_properties(map):
    """ Turn a dictionary of properties into a BAM propery string.
    """
    res = []
    for k, v in map.items():
        res.append(k + '=' + v)
    return '|'.join(res)