def ParsePeptideFile(peptidefile):
    """Parse a tab-delimited file with peptide scores. Requires that peptide
    ids are in the first column.
    
    Returns: a tuple of the header row, the remaining rows, and the peptide
    ids.
    """
    with open(peptidefile) as pep_f:
        pep_lines = pep_f.readlines()
    pep_header = pep_lines[0]
    pep_data = pep_lines[1:]
    pep_peptides = [line.split("\t")[0] for line in pep_data]
    return (pep_header, pep_data, pep_peptides)