def get_resources(genome_build, fasta_ref, data):
    """Add genome resources defined in configuration file to data object.
    """
    aconfig = tz.get_in(["config", "arvados"], data)
    resources_file = "%s-resources.yaml" % (os.path.splitext(fasta_ref)[0])
    base_dir = os.path.dirname(resources_file)
    with open_remote(resources_file, aconfig) as in_handle:
        resources = yaml.safe_load(in_handle)
    cfiles = [os.path.normpath(os.path.join("keep:%s" % aconfig["reference"], x))
              for x in collection_files(aconfig["reference"], aconfig)]
    for k1, v1 in resources.items():
        if isinstance(v1, dict):
            for k2, v2 in v1.items():
                if isinstance(v2, basestring) and v2.startswith("../") and os.path.splitext(v2)[-1]:
                    test_v2 = os.path.normpath(os.path.join(base_dir, v2))
                    if test_v2 in cfiles:
                        resources[k1][k2] = test_v2
                    else:
                        del resources[k1][k2]
    data["genome_resources"] = resources
    return _add_configured_indices(base_dir, cfiles, data)
dataset/ETHPy150Open chapmanb/bcbio-nextgen-vm/bcbiovm/arvados/retriever.py/get_resources/original