public void setPeptideId(final String pPeptideId) {
    if (m_Peptide != null || m_PeptideId != null)
      throw new IllegalStateException("Cannot reset peptide"); // ToDo change
    m_PeptideId = pPeptideId;
    IMainData main = getMainData();
    if (main != null) {
      //   RawPeptideScan rawScan = main.getRawScan(getId());
      //    pMeasured = rawScan;

      ITaxonomy taxonomy = main.getTaxonomy();
      if (taxonomy != null) {
        String peptideId = getPeptideId();
        m_Peptide = taxonomy.getPeptideById(peptideId);
        if (m_Peptide == null)
          m_Peptide = Polypeptide.fromString(peptideId); // key may be all we need
      }
    } else {
      m_Peptide = Polypeptide.fromString(getPeptideId());
    }
    if (m_Peptide != null) {
      IPeptideDigester digester = PeptideBondDigester.getDefaultDigester();
      int missedCleavages = digester.probableNumberMissedCleavages(m_Peptide);
      ((Polypeptide) m_Peptide).setMissedCleavages(missedCleavages);
    }
  }