From: <hen...@us...> - 2009-05-29 06:19:58
|
Revision: 4366 http://sashimi.svn.sourceforge.net/sashimi/?rev=4366&view=rev Author: henrylam Date: 2009-05-29 06:19:46 +0000 (Fri, 29 May 2009) Log Message: ----------- [SpectraST] Add MRM table format SHOWINFO which prints additional info about each transition (including the score) Modified Paths: -------------- trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTLibEntry.cpp trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTPeakList.cpp trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTPeakList.hpp Modified: trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTLibEntry.cpp =================================================================== --- trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTLibEntry.cpp 2009-05-28 19:25:19 UTC (rev 4365) +++ trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTLibEntry.cpp 2009-05-29 06:19:46 UTC (rev 4366) @@ -619,7 +619,7 @@ cess.precision(2); cess << fixed << showpoint << collisionEnergy; - if (format == "DEFAULT") { + if (format == "DEFAULT" || format == "SHOWINFO") { stringstream press; press << bestSamp << '\t' << maxNumUsed << '/' << totNumUsed << '\t'; press.precision(2); Modified: trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTPeakList.cpp =================================================================== --- trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTPeakList.cpp 2009-05-28 19:25:19 UTC (rev 4365) +++ trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTPeakList.cpp 2009-05-29 06:19:46 UTC (rev 4366) @@ -674,7 +674,13 @@ for (vector<Peak*>::iterator i = m_intensityRanked->begin(); i != m_intensityRanked->end(); i++) { fout << pre << '\t' << (*i)->mz << '\t' << (*i)->intensity << '\t' << (*i)->annotation << '\t' << post << endl; } - } + } else if (format == "SHOWINFO") { + rankByIntensity(); + for (vector<Peak*>::iterator i = m_intensityRanked->begin(); i != m_intensityRanked->end(); i++) { + fout << pre << '\t' << (*i)->mz << '\t' << (*i)->intensity << '\t' << (*i)->annotation << '\t' << post << '\t' << (*i)->info << endl; + } + } + } @@ -1035,7 +1041,7 @@ // consider all 'a' ions rare if (annotation[0] != 'y' && annotation[0] != 'b') return (false); - string::size_type minusPos = annotation.find('-'); + string::size_type minusPos = annotation.find_first_of("+-"); if (minusPos != string::npos) { return (false); } @@ -2927,3 +2933,20 @@ } } + +void SpectraSTPeakList::flattenAllPeaks() { + + for (vector<Peak>::iterator j = m_peaks.begin(); j != m_peaks.end(); j++) { + j->intensity = 10000.0; + } + +} + +void SpectraSTPeakList::removeNoncanonicalPeaks() { + + for (vector<Peak>::iterator j = m_peaks.begin(); j != m_peaks.end(); j++) { + if (!(isBorY(j->annotation))) { + j->intensity = 0.0; + } + } +} Modified: trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTPeakList.hpp =================================================================== --- trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTPeakList.hpp 2009-05-28 19:25:19 UTC (rev 4365) +++ trunk/trans_proteomic_pipeline/src/Search/SpectraST/SpectraSTPeakList.hpp 2009-05-29 06:19:46 UTC (rev 4366) @@ -146,6 +146,10 @@ void repositionPeaks(); void shiftAllPeaks(double mzShift); + + void removeNoncanonicalPeaks(); + void flattenAllPeaks(); + private: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |