diff --git a/src/input/mascot/mascotdatparser.cpp b/src/input/mascot/mascotdatparser.cpp index 99254b55925b3e6a640476c0d6a8f9a4074099b3..21ed9da843a59f276967ea7f5cb06f2b71576493 100644 --- a/src/input/mascot/mascotdatparser.cpp +++ b/src/input/mascot/mascotdatparser.cpp @@ -152,7 +152,16 @@ void MascotDatParser::saveAndClearPeptide() { if (_current_peptide.query_index > 0) { //parse and save - pappso::Peptide peptide(_current_peptide.peptide_string_list.at(4)); + QString peptide_str =_current_peptide.peptide_string_list.at(4); + if (!_current_peptide.subst.isEmpty()) { + //q856_p9_subst=1,X,W + //q24379_p2_subst=1,B,D,8,B,D + QStringList subst_list = _current_peptide.subst.split(","); + for (unsigned int i=0; i < subst_list.size(); i+=3) { + peptide_str = peptide_str.replace(subst_list.at(0+i).toInt()-1,1,subst_list.at(2+i)); + } + } + pappso::Peptide peptide(peptide_str); if (_current_peptide.protein_string_list.size() != _current_peptide.fasta_file_list.size()) { throw pappso::PappsoException(QObject::tr("ERROR (_current_peptide.protein_string_list.size() != _current_peptide.fasta_file_list.size()) %1").arg(_current_peptide.protein_string_list.join(",\"")));