def get_fileroot(perc_file: str) -> str:
    """
    Get the root of the Percolator result file.

    Parameters
    ----------
    perc_file
        The result file to obtain the fileroot from.

    Returns
    -------
    The file root, including the path and "percolator".
    """
    return ".".join(perc_file.split(".")[:-3])