def _add_configured_indices(base_dir, cfiles, data):
    """Add additional resource indices defined in genome_resources: snpeff
    """
    snpeff_db = tz.get_in(["genome_resources", "aliases", "snpeff"], data)
    if snpeff_db:
        index_dir = os.path.normpath(os.path.join(os.path.dirname(base_dir), "snpeff", snpeff_db))
        snpeff_files = [x for x in cfiles if x.startswith(index_dir)]
        if len(snpeff_files) > 0:
            base_files = [x for x in snpeff_files if x.endswith("/snpEffectPredictor.bin")]
            assert len(base_files) == 1, base_files
            del snpeff_files[snpeff_files.index(base_files[0])]
            data["reference"]["snpeff"] = {"base": base_files[0], "indexes": snpeff_files}
    return data
dataset/ETHPy150Open chapmanb/bcbio-nextgen-vm/bcbiovm/arvados/retriever.py/_add_configured_indices/original