From 66cdda0f4550f19c362c5c33ee320e890a6ed530 Mon Sep 17 00:00:00 2001 From: Marc Sturm Date: Wed, 22 Apr 2009 09:51:21 +0000 Subject: [PATCH] Fixed bug 2778461 git-svn-id: https://open-ms.svn.sourceforge.net/svnroot/open-ms/branches/Release1.4@5157 6adb6e08-d915-0410-941f-83917bcadc18 --- .../OpenMS/FORMAT/HANDLERS/MzDataHandler.h | 32 ++++++++++++++++--- include/OpenMS/VISUAL/SpectrumCanvas.h | 4 ++- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/include/OpenMS/FORMAT/HANDLERS/MzDataHandler.h b/include/OpenMS/FORMAT/HANDLERS/MzDataHandler.h index 6fda88ef396..ce1eee092c7 100644 --- a/include/OpenMS/FORMAT/HANDLERS/MzDataHandler.h +++ b/include/OpenMS/FORMAT/HANDLERS/MzDataHandler.h @@ -48,6 +48,8 @@ namespace OpenMS MapType has to be a MSExperiment or have the same interface. Do not use this class. It is only needed in MzDataFile. + + @improvement Add implementation and tests of 'supDataArray' (Hiwi) */ template class MzDataHandler @@ -103,7 +105,7 @@ namespace OpenMS // ScanMode // is no longer used cv_terms_[16] is empty now // Polarity - String(";Positive;Negative").split(';',cv_terms_[17]); + // is no longer used cv_terms_[17] is empty now // ActivationMethod String(";CID;PSD;PD;SID").split(';',cv_terms_[18]); } @@ -155,7 +157,7 @@ namespace OpenMS // ScanMode // is no longer used cv_terms_[16] is empty now // Polarity - String(";Positive;Negative").split(';',cv_terms_[17]); + // is no longer used cv_terms_[17] is empty now // ActivationMethod String(";CID;PSD;PD;SID").split(';',cv_terms_[18]); } @@ -685,7 +687,7 @@ namespace OpenMS { data_to_decode_.resize(data_to_decode_.size()+1); } - else if (tag=="arrayName") + else if (tag=="arrayName" && parent_tag=="supDataArrayBinary") { // Note: name is set in closing tag as it is CDATA data_to_decode_.resize(data_to_decode_.size()+1); @@ -1170,7 +1172,16 @@ namespace OpenMS warning(STORE, String("Scan mode '") + InstrumentSettings::NamesOfScanMode[iset.getScanMode()] + "' not supported by mzData. Using 'MassScan' scan mode!"); } - writeCVS_(os, spec.getInstrumentSettings().getPolarity(), 17, "1000037", "Polarity",6); + //scan polarity + if (spec.getInstrumentSettings().getPolarity()==IonSource::POSITIVE) + { + os << String(6,'\t') << "\n"; + } + else if (spec.getInstrumentSettings().getPolarity()==IonSource::NEGATIVE) + { + os << String(6,'\t') << "\n"; + } + //Retiontion time already in TimeInSeconds writeCVS_(os, spec.getRT(), "1000039", "TimeInSeconds",6); writeUserParam_(os, spec.getInstrumentSettings(), 6); @@ -1393,7 +1404,18 @@ namespace OpenMS } else if (accession=="PSI:1000037") //Polarity { - spec_.getInstrumentSettings().setPolarity((IonSource::Polarity)cvStringToEnum_(17, value,"polarity") ); + if (value=="Positive" || value=="positive" || value=="+") //be flexible here, actually only the first one is correct + { + spec_.getInstrumentSettings().setPolarity(IonSource::POSITIVE); + } + else if (value=="Negative" || value=="negative" || value=="-") //be flexible here, actually only the first one is correct + { + spec_.getInstrumentSettings().setPolarity(IonSource::NEGATIVE); + } + else + { + warning(LOAD, String("Invalid scan polarity (PSI:1000037) detected: \"") + value + "\". Valid are 'Positive' or 'Negative'."); + } } else { diff --git a/include/OpenMS/VISUAL/SpectrumCanvas.h b/include/OpenMS/VISUAL/SpectrumCanvas.h index 1ca205b503b..2eef8b7f824 100644 --- a/include/OpenMS/VISUAL/SpectrumCanvas.h +++ b/include/OpenMS/VISUAL/SpectrumCanvas.h @@ -77,7 +77,9 @@ namespace OpenMS - Activated using the SHIFT key @improvement Add log mode (Hiwi) - + + @improvement Make layer container a list and allow reordering by drag-and-drop in layer bar (Hiwi) + @ingroup SpectrumWidgets */ class OPENMS_DLLAPI SpectrumCanvas