diff --git a/src/input/xtandemsaxhandler.cpp b/src/input/xtandemsaxhandler.cpp index 41757804d29b102b56bb7fad8153deca0301d2a0..cd3bc25c08b5565982e50db651a9ef4577a1c24a 100644 --- a/src/input/xtandemsaxhandler.cpp +++ b/src/input/xtandemsaxhandler.cpp @@ -174,6 +174,7 @@ bool XtandemSaxHandler::startElement_file(QXmlAttributes attributes) { } bool XtandemSaxHandler::startElement_domain(QXmlAttributes attributes) { + //mh="1120.529471" //<domain id="1976.1.1" start="620" end="629" expect="9.7e-04" mh="1120.5307" delta="-0.0012" hyperscore="29.9" //nextscore="10.2" y_score="10.4" y_ions="7" b_score="11.2" b_ions="3" pre="QLYR" post="RYGV" //seq="AQEEMAQVAK" missed_cleavages="0"> @@ -276,10 +277,14 @@ bool XtandemSaxHandler::startElement_domain(QXmlAttributes attributes) { _p_peptide_evidence->setEvalue(attributes.value("expect").simplified().toDouble()); //qDebug() << "XtandemSaxHandler::startElement_domain evalue " << _p_peptide_match->getEvalue() << " scan " << _p_peptide_match->getScan(); - pappso::pappso_double xtandem_mhtheo = attributes.value("mh").simplified().toDouble(); + pappso::pappso_double xtandem_mhtheoretical = attributes.value("mh").simplified().toDouble(); pappso::pappso_double xtandem_delta = attributes.value("delta").simplified().toDouble(); - pappso::pappso_double exp_mass = xtandem_mhtheo + xtandem_delta - pappso::MHPLUS; + //delta – the spectrum mh minus the calculated mh + + //exp mass computed from X!Tandem mh : + pappso::pappso_double exp_mass = _mhplus_obser - pappso::MHPLUS; + _p_peptide_evidence->setExperimentalMass(exp_mass); _current_peptide_match.setStart(attributes.value("start").simplified().toUInt()-1);