<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _addPeptide(self, sequence, proteinId, digestInfo):
 """Add a peptide to the protein database. :param sequence: str, amino acid sequence :param proteinId: str, proteinId :param digestInfo: dict, contains information about the in silico digest must contain the keys 'missedCleavage', 'startPos' and 'endPos' """

        stdSequence = self.getStdSequence(sequence)

        if stdSequence not in self.peptides:
            self.peptides[stdSequence] = PeptideEntry(
                stdSequence, mc=digestInfo['missedCleavage']
            )
        if sequence not in self.peptides:
            self.peptides[sequence] = self.peptides[stdSequence]

        if proteinId not in self.peptides[stdSequence].proteins:
            #FUTURE: peptide can appear at multiple positions per protein.
            #peptideEntry.addSource(proteinId, startPos, endPos)
            self.peptides[stdSequence].proteins.add(proteinId)
            self.peptides[stdSequence].proteinPositions[proteinId] = (
                                    digestInfo['startPos'], digestInfo['endPos']
                                    )
            self.proteins[proteinId].peptides.add(sequence)