def run_dependent_peptides(allPeptides_file, rawFilesTable_file, outfile):
    """ transform a allPeptides.txt and experimentalDesign.txt table
    into the dependentPeptides.txt table written in outfile.
    :param allPeptides_file: MaxQuant 'allPeptides.txt' output table.
    :param rawFilesTable_file: MaxQuant 'Raw files'-tab table.
    :param outfile: Path to the output file.
    """
    __dep, localization = read_dependent_peptides(allPeptides_file)
    exp = read_rawFilesTable(rawFilesTable_file)
    _dep = _set_column_names(__dep, exp)
    main_columns = list(_dep.columns)
    dep = _dep.join(localization).reset_index()
    dep.to_perseus(outfile, main_columns=main_columns)