Page 1 of 1

Macro to export extracted ion profiles to CSV

Posted: Wed Jun 20, 2012 6:48 pm
by Piet
Can anyone please help me with a rather simple macro that I am struggling with.
I have a list of ions in a text file and want to extract each one in turn and write the resulting extracted ion profile (retention times and responses) to a .csv file for further processing. It is probably simple but I am not a programmer so it is a daunting task for me.
Any help would be much appreciated.

Re: Macro to export extracted ion profiles to CSV

Posted: Thu Jun 21, 2012 3:26 pm
by tlahren
Try using the "Export-3D" function/macro under "Tools." I assume you are using some version of MSDChemstation correct?

It will export a range of target ions in columns with their abundance at each scan in the rows to an excel file. You could do each ion one-at-a-time or just delete the columns you don't want to include.

Or you can find the "export3d.mac" and edit it to your liking and rename it. It will essentially do what you are asking.

Re: Macro to export extracted ion profiles to CSV

Posted: Thu Jun 21, 2012 7:20 pm
by Piet
Thanks for the advice and sorry about not being clear in the original post. Yes, I am using MSD Chemstation.
I have tried Export 3D function but that exports a single mass spectrum which is not what I am trying to do. What I do manually is plot an extracted ion chromatogram of the first mass in my list, then use file export to CSV to export the time and response data. Then repeat the same steps for the next mass in the list and that gets pretty tedious as there are 64 masses in the list. When the list is done, I have 64 csv files which are then combined and I then use the relative retention time distribution of the extracted ions for further processing in Excel.
I have downloaded the "export3d.mac", looked at it but found it quite intimidating.
What I did find so far is that the 'Chromatogr Rt1:Rt2, mass' will do the extracted ion and place it in the X register and that the 'Draw' command will display it. Getting from X to csv is where I am stuck as there does not seem to be an 'Export' function among the macro commands.

Re: Macro to export extracted ion profiles to CSV

Posted: Thu Jun 21, 2012 8:56 pm
by tlahren
Are you trying to plot multiple chromatograms(files) at once or just multiple masses from one chromatogram as an EIC overlay?

Re: Macro to export extracted ion profiles to CSV

Posted: Sat Jun 23, 2012 6:13 pm
by Piet
Thanks again for your reply.
To answer your question - Neither, I just do a single mass at a time from a single file. No overlaid EIC's. Then I do the next mass in the same file until all 64 mass chromatograms have been exported.
I will try to explain a bit more. The chromatograms do not consist of peaks but are 'humps' similar to the data one obtains from direct introduction solids probes. I extract the profiles for the compounds I am interested in from the bundle or 'hump' and then use excel to split the result for each extracted ion into sections. These are then used in statistical analysis.

Re: Macro to export extracted ion profiles to CSV

Posted: Mon Oct 08, 2012 2:08 pm
by eselmeister
Hi Piet,

maybe OpenChrom can help to solve your problems. It is capable to export chromatograms to CSV format:
http://www.openchrom.net
http://www.openchrom.net/dokuwiki/doku.php?id=csv_.csv

The CSV plug-in can be installed from the marketplace:
http://www.openchrom.net/dokuwiki/doku. ... arketplace

Furthermore, there's a view to display selected ions in separated or in overlay mode.
http://www.openchrom.net/dokuwiki/doku. ... show_views

Select "Excluded Ion Chromtogram" to subtract the selected ions from the TIC, "Combinded Ion Chromatogram" to show the selected ions as EIC or "Selected Ion Chromatogram" to show the selected ions separately.

If you've further questions, feel free to contact me:
http://www.openchrom.net/main/content/contact.php


Cheers,
eselmeister