def sub_dir_algo(d):
    """ build out the algorithm portion of the directory structure.
    :param dict d: A dictionary holding BIDS terms for path-building
    """
    return "_".join([
        '-'.join(['tgt', d['tgt'], ]),
        '-'.join(['algo', d['algo'], ]),
        '-'.join(['shuf', d['shuf'], ]),
    ])