From: <spa...@us...> - 2009-05-08 17:38:27
|
Revision: 4358 http://sashimi.svn.sourceforge.net/sashimi/?rev=4358&view=rev Author: spacepod Date: 2009-05-08 17:38:27 +0000 (Fri, 08 May 2009) Log Message: ----------- [xtandem] fix for multiple charges, for ETD data, etc (tested) Modified Paths: -------------- trunk/trans_proteomic_pipeline/extern/xtandem/src/saxmzxmlhandler.cpp Modified: trunk/trans_proteomic_pipeline/extern/xtandem/src/saxmzxmlhandler.cpp =================================================================== --- trunk/trans_proteomic_pipeline/extern/xtandem/src/saxmzxmlhandler.cpp 2009-05-08 17:37:16 UTC (rev 4357) +++ trunk/trans_proteomic_pipeline/extern/xtandem/src/saxmzxmlhandler.cpp 2009-05-08 17:38:27 UTC (rev 4358) @@ -139,25 +139,30 @@ // add spectrum, with precursorMz charge pushSpectrum(); } + + else { - - // are there any multiple precursor charges from mzXML 3.1's - // possibleCharges? - if (m_viPossiblePrecursorCharges.size() > 0) { - size_t originalId = m_tId; - for (vector<int>::iterator i = m_viPossiblePrecursorCharges.begin(); - i != m_viPossiblePrecursorCharges.end(); - ++i) { - int z = *i; - if (z != m_precursorCharge) { // no need to duplicate if already added - m_tId += 100000000; - pushSpectrum(z); + // add the spectrum with the m_precursorCharge value + int originalPrecursorMZ = m_precursorCharge; // do other pushSpectrum calls change this? + pushSpectrum(m_precursorCharge); + + // are there any multiple precursor charges from mzXML 3.1's + // possibleCharges? + if (m_viPossiblePrecursorCharges.size() > 0) { + size_t originalId = m_tId; + for (vector<int>::iterator i = m_viPossiblePrecursorCharges.begin(); + i != m_viPossiblePrecursorCharges.end(); + ++i) { + int z = *i; + if (z != originalPrecursorMZ) { // no need to duplicate if already added + m_tId += 100000000; + pushSpectrum(z); + } } + m_tId = originalId; } - m_tId = originalId; } - m_bInMsLevel2 = false; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |