def METHOD_NAME(self, dep_roots, cfg_files):
    """Replace hardcoded paths in config files."""
    abra2_jar = os.path.join(dep_roots['ABRA2'], 'abra2-%s.jar' % os.getenv('EBVERSIONABRA2'))
    pysamstats_bin = os.path.join(dep_roots['pysamstats'], 'bin', 'pysamstats')
    regex_subs = [
        (r'^abra\s*=.*/abra.*.jar', 'abra = ' + abra2_jar),
        (r'^bedtools\s*=.*/bin/bedtools', 'bedtools = ' + os.path.join(dep_roots['BEDTools'], 'bin', 'bedtools')),
        (r'^flash\s*=.*/bin/flash2', 'flash = ' + os.path.join(dep_roots['FLASH'], 'bin', 'flash2')),
        (r'^java\s*=.*/bin/java', 'java = ' + os.path.join(dep_roots['Java'], 'bin', 'java')),
        (r'^prinseq\s*=.*/prinseq-lite.pl', 'prinseq = ' + os.path.join(dep_roots['PRINSEQ'], 'prinseq-lite.pl')),
        (r'^pysamstats\s*=.*/bin/pysamstats', 'pysamstats = ' + pysamstats_bin),
        (r'^rscript\s*=.*/bin/Rscript', 'rscript = ' + os.path.join(dep_roots['R'], 'bin', 'Rscript')),
        (r'^samtools\s*=.*/bin/samtools', 'samtools = ' + os.path.join(dep_roots['SAMtools'], 'bin', 'samtools')),
    ]
    for cfg_file in cfg_files:
        dirname = os.path.dirname(cfg_file)
        if os.path.basename(dirname).startswith('example'):
            example_dir = dirname
        else:
            example_dir = os.path.join(self.installdir, 'Examples', 'example1')
        genome_dir = os.path.join(example_dir, 'genome')
        genomex_fa = os.path.join(genome_dir, 'genomex.fa')
        regex_subs.extend([
            (r'^ref_fasta\s*=.*genome/genomex.fa', 'ref_fasta = ' + genomex_fa),
            (r'^bwa_idx\s*=.*genome/genomex.fa', 'bwa_idx = ' + genomex_fa),
            (r'^refGene\s*=.*genome/refgenex.txt', 'refGene = ' + os.path.join(genome_dir, 'refgenex.txt')),
        ])
        apply_regex_substitutions(cfg_file, regex_subs, on_missing_match='error')