Attempting to convert a Bruker file to standard output using --outdir - results in invalid XML, because the first line output is a log message.
Command being run:
msconvert.exe --32 --zlib --filter "peakPicking true 1-" --outdir - 'C:\Users\Archie Cobbs\Desktop\HL60.d\analysis.baf' >xx.mzML
Resulting content in xx.mzML... note log message on the first line:
2018-04-06 16:54:43.175982 [tid=0x1208] [INFO ] bdal.io.baf2sql: Generating new SQLite cache in analysis directory: C:\Users\Archie Cobbs\Desktop\HL60.d\analysis.sqlite
<?xml version="1.0" encoding="utf-8"?>
<indexedmzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.2_idx.xsd">
<mzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0.xsd" id="HL60" version="1.1.0">
...
Happens in version 3.0.11885.
I suppose it's obvious, but the proper fix is to send all log messages to standard error, not standard output.
Hi Archie,
Thanks for the report. Unfortunately that log message is coming from the
Bruker reader DLL, and we can't readily control that behavior. (MSConvert
already directs informational messages to stderr when stdout is the output
stream.)
You'll have to work out a solution that doesn't involve stdout, or possibly
run the conversion twice to provoke the creation of that sqlite file when
needed.
Brian
On Fri, Apr 6, 2018 at 5:32 PM, Archie Cobbs archiecobbs@users.sourceforge.net wrote:
Related
Bugs: #19
OK. I've worked around it by ignoring all characters prior to the first '<'.
If you have any contacts with the Bruker team (perhaps Daniel Kruegler?), they might be interested to see this issue.
Thanks.