Thermo RAW metadata with msfilereader

1,409 views
Skip to first unread message

Alex_PCB

unread,
Sep 6, 2011, 9:57:12 AM9/6/11
to spctools-discuss
Hi folks
I am interested in extracting some metadata from our Thermo RAW files
such as injection time and spray voltage for each scan in the file. I
learned that deploying a program that interfaces with the msfilereader
would be the easiest way to get the job done.
I was wondering if someone has written such program and is willing to
share the code with my lab. We are an academic institution and wish to
incorporate this script in our pipeline for Quality Control purposes.
I'd greatly appreciate any help.
Best regards,
Alex

Isaiah Norton

unread,
Sep 7, 2011, 1:29:22 PM9/7/11
to spctools...@googlegroups.com
Hi Alex,
You may have the best luck with msconvert from proteowizard, but I don't know what metadata it supports.

MSFilereader provides a COM interface to access the RAW file data/metadata. Here's a simple example script I wrote a while ago to interface msfilereader from python, maybe it will be helpful:
https://gist.github.com/1201113

Accessing COM from within MS products (I tried C# first) is easier because you get better introspection, but I ended up using python because numpy+scipy are much more useful overall for analysis.
-Isaiah

ps:
1) xraw.SetCurrentController(0,1) is a very important call! You will get errors otherwise.
2) xraw
.GetMassListFromScanNum returns the data BY_REF, which can be a bit confusing if you aren't familiar with COM (I wasn't)
3) Also note that the MSFilereader dll is 32 bit so you won't be able to access from a 64-bit process.... I spent some time trying to figure out how to access from 64-bit using a surrogate process but gave up. You CAN run on 64bit Windows in 32bit compatibility mode (WoW) no problem.



--
You received this message because you are subscribed to the Google Groups "spctools-discuss" group.
To post to this group, send email to spctools...@googlegroups.com.
To unsubscribe from this group, send email to spctools-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spctools-discuss?hl=en.


Matthew Chambers

unread,
Sep 7, 2011, 5:02:34 PM9/7/11
to spctools...@googlegroups.com
There is indeed a lot of metadata in RAW files that msconvert will not output. Pwiz's RawFile
wrapper can access it all though, with a more convenient interface for C++ programmers. For .NET or
Python then the COM interface would be easier to access directly. Here's some old C++ code that uses
pwiz's RawFile to dump all the metadata:
http://proteowizard.svn.sourceforge.net/viewvc/proteowizard/trunk/pwiz/pwiz_aux/sfcap/old/rawdump/rawdump.cpp?content-type=text%2Fplain

It may not compile with the latest RawFile version though; it doesn't get automatically tested like
most of pwiz.

Also, the newest MSFileReader (2.2) released a week ago provides 32-bit and 64-bit DLLs.

Hope this helps,
-Matt


On 9/7/2011 12:29 PM, Isaiah Norton wrote:
> Hi Alex,
> You may have the best luck with msconvert from proteowizard, but I don't know what metadata it supports.
>
> MSFilereader provides a COM interface to access the RAW file data/metadata. Here's a simple example
> script I wrote a while ago to interface msfilereader from python, maybe it will be helpful:
> https://gist.github.com/1201113
>
> Accessing COM from within MS products (I tried C# first) is easier because you get better
> introspection, but I ended up using python because numpy+scipy are much more useful overall for
> analysis.
> -Isaiah
>
> ps:
> 1) xraw.SetCurrentController(0,1) is a very important call! You will get errors otherwise.

> 2) xraw.GetMassListFromScanNumreturns the data BY_REF, which can be a bit confusing if you aren't

Alex_PCB

unread,
Sep 8, 2011, 9:40:10 AM9/8/11
to spctools-discuss
Thank you guys!!! it was very helpful!!!!
cheers
alex



On Sep 7, 11:02 pm, Matthew Chambers <matt.chamber...@gmail.com>
wrote:
> There is indeed a lot of metadata in RAW files that msconvert will not output. Pwiz's RawFile
> wrapper can access it all though, with a more convenient interface for C++ programmers. For .NET or
> Python then the COM interface would be easier to access directly. Here's some old C++ code that uses
> pwiz's RawFile to dump all the metadata:http://proteowizard.svn.sourceforge.net/viewvc/proteowizard/trunk/pwi...
>
> It may not compile with the latest RawFile version though; it doesn't get automatically tested like
> most of pwiz.
>
> Also, the newest MSFileReader (2.2) released a week ago provides 32-bit and 64-bit DLLs.
>
> Hope this helps,
> -Matt
>
> On 9/7/2011 12:29 PM, Isaiah Norton wrote:
>
>
>
>
>
>
>
> > Hi Alex,
> > You may have the best luck with msconvert from proteowizard, but I don't know what metadata it supports.
>
> > MSFilereader provides a COM interface to access the RAW file data/metadata. Here's a simple example
> > script I wrote a while ago to interface msfilereader from python, maybe it will be helpful:
> >https://gist.github.com/1201113
>
> > Accessing COM from within MS products (I tried C# first) is easier because you get better
> > introspection, but I ended up using python because numpy+scipy are much more useful overall for
> > analysis.
> > -Isaiah
>
> > ps:
> > 1) xraw.SetCurrentController(0,1) is a very important call! You will get errors otherwise.
> > 2) xraw.GetMassListFromScanNumreturns the data BY_REF, which can be a bit confusing if you aren't
> > familiar with COM (I wasn't)
> > 3) Also note that the MSFilereader dll is 32 bit so you won't be able to access from a 64-bit
> > process.... I spent some time trying to figure out how to access from 64-bit using a surrogate
> > process but gave up. You CAN run on 64bit Windows in 32bit compatibility mode (WoW) no problem.
>

Alex_PCB

unread,
Sep 8, 2011, 9:47:24 AM9/8/11
to spctools-discuss
Thank you guys!!! it was very helpful!!!!
cheers
alex



On Sep 7, 11:02 pm, Matthew Chambers <matt.chamber...@gmail.com>
wrote:
> There is indeed a lot of metadata in RAW files that msconvert will not output. Pwiz's RawFile
> wrapper can access it all though, with a more convenient interface for C++ programmers. For .NET or
> Python then the COM interface would be easier to access directly. Here's some old C++ code that uses
> pwiz's RawFile to dump all the metadata:http://proteowizard.svn.sourceforge.net/viewvc/proteowizard/trunk/pwi...
>
> It may not compile with the latest RawFile version though; it doesn't get automatically tested like
> most of pwiz.
>
> Also, the newest MSFileReader (2.2) released a week ago provides 32-bit and 64-bit DLLs.
>
> Hope this helps,
> -Matt
>
> On 9/7/2011 12:29 PM, Isaiah Norton wrote:
>
>
>
>
>
>
>
> > Hi Alex,
> > You may have the best luck with msconvert from proteowizard, but I don't know what metadata it supports.
>
> > MSFilereader provides a COM interface to access the RAW file data/metadata. Here's a simple example
> > script I wrote a while ago to interface msfilereader from python, maybe it will be helpful:
> >https://gist.github.com/1201113
>
> > Accessing COM from within MS products (I tried C# first) is easier because you get better
> > introspection, but I ended up using python because numpy+scipy are much more useful overall for
> > analysis.
> > -Isaiah
>
> > ps:
> > 1) xraw.SetCurrentController(0,1) is a very important call! You will get errors otherwise.
> > 2) xraw.GetMassListFromScanNumreturns the data BY_REF, which can be a bit confusing if you aren't
> > familiar with COM (I wasn't)
> > 3) Also note that the MSFilereader dll is 32 bit so you won't be able to access from a 64-bit
> > process.... I spent some time trying to figure out how to access from 64-bit using a surrogate
> > process but gave up. You CAN run on 64bit Windows in 32bit compatibility mode (WoW) no problem.
>

François ALLAIN

unread,
Oct 23, 2015, 1:30:39 PM10/23/15
to spctools-discuss
Hello,
I finally developed some python bindings to the MSFileReader dll :
https://github.com/frallain/MSFileReader_Python_bindings

Hope it can be helpful.

Cheers

Eric Deutsch

unread,
Oct 28, 2015, 1:51:15 AM10/28/15
to spctools...@googlegroups.com, Eric Deutsch

Hi François, thanks for posting and letting everyone know. Since I just saw this other effort go by a few days ago and it is related to your post, the following tool may also be of interest:

 

http://www.ncbi.nlm.nih.gov/pubmed/26477298?dopt=Abstract

J Proteome Res. 2015 Oct 19. [Epub ahead of print]

An open source, platform-independent library and online scripting environment for accessing Thermo Scientific RAW files.

Kelchtermans P, C Silva AS, Argentini A, Staes A, Vandenbussche J, Laukens K, Valkenborg D, Martens L.

 

I am not involved in either, so don’t know much more than this.

 

Regards,

Eric

--

You received this message because you are subscribed to the Google Groups "spctools-discuss" group.

To unsubscribe from this group and stop receiving emails from it, send an email to spctools-discu...@googlegroups.com.


To post to this group, send email to spctools...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages