Permalink
Browse files

[FIX] TPP compatibility

  • Loading branch information...
hroest committed Oct 20, 2017
1 parent 91866b9 commit 482a0e79bc8845b246a3b7b9e11642ed3733cc98
Showing with 12 additions and 2 deletions.
  1. +12 −2 src/openms/source/FORMAT/HANDLERS/MzXMLHandler.cpp
@@ -999,8 +999,18 @@ namespace OpenMS
os << ">" << mz << "</precursorMz>\n";
}

// note: line breaks between attributes are required here! (MaxQuants mzXML reader will fail otherwise! -- dont ask..)
String s_peaks("<peaks precision=\"32\"\n byteOrder=\"network\"\n contentType=\"m/z-int\"\n compressionType=\"none\"\n compressedLen=\"0\" ");
// Note: Some parsers require the following line breaks (MaxQuants
// mzXML reader will fail otherwise! -- dont ask..) while others cannot
// deal with them (mostly TPP tools such as SpectraST).
String s_peaks;
if (options_.getForceMQCompatability() )
{
s_peaks = "<peaks precision=\"32\"\n byteOrder=\"network\"\n contentType=\"m/z-int\"\n compressionType=\"none\"\n compressedLen=\"0\" ";
}
else
{
s_peaks = "<peaks precision=\"32\" byteOrder=\"network\" contentType=\"m/z-int\" compressionType=\"none\" compressedLen=\"0\" ";
}
if (options_.getForceMQCompatability() && !s_peaks.has('\n'))
{ // internal check against inadvertedly removing line breaks above!
fatalError(STORE, "Internal error: <peaks> tag does not contain newlines as required by MaxQuant. Please report this as a bug.", __LINE__, 0);

0 comments on commit 482a0e7

Please sign in to comment.