--
Dave White
SpectraChrom Software
www.spectrachrom.com
dave(underscore)wh...@spectrachrom.com replace the (underscore) with _ to
e-mail directly
"David Sparkman" <o...@compuserve.com> wrote in message
news:9lj5ls$auj$1...@news-int.gatech.edu...
snip
} is incorrect. The data stored are mass spectral data of m/z value and
} intensity pairs for each spectrum acquired. Chromatograms are
reconstructed
} from these mass spectral data either by summing all the intensities with
in
} each mass spectrum and plotting this summed intensity as a function of the
} spectrum number, which is also a function of time (the reconstructed total
} ion current chromatogram -- RTICC) or by plotting the intensities of one
are
Pham Tuan Hai wrote:
} I am looking for a way to convert the entire HP Chemstation MSD data file into
} ASCII format. It can be a macro...
Nazdar,
!HP2ASCII.MAC starts here
name HP2ASCII
!***
!*** this macro fully converts a HP Chemstation file to ASCII or JCAMP-DX
!*** (c)TK4ICBINB
!*** if an error occours during macro execution:false line break in macro
!***
!***(1) load a GC-MS file in HP Chemstation
!***(2) Choose Options Dialog Box --> Command line
!***(3) enter "macro" at command line and load HP2ASCII
!***(4) enter HP2ASCII at the command line to start
!***(5) Choose an option TIC+MS, TIC, JCAMP-DX
!***(6) Read in with XCL with ";" separator
!*** (from the actual HP data path)
!***
!*** possible files are : xMSspec.txt, xspecrow.txt,
!*** xTIConly.txt , JCMPGCMS.jdx
!*** BEWARE: XCL can read only a 256x65536 matrix!!! Yes 3x!
LOCAL label, button, choice
SDim label, 4
SDim button, 3
label[1] = "TIC+spectra nice output"
label[2] = "TIC+spectra ín one line"
label[3] = "Only TIC"
label[4] = "JCAMP 4 Lib2NIST"
button[1] = ""
button[2] = "OK"
button[3] = ""
choice = 1
INPUT6 3, 4,"HP2ASCII", label, button, choice
mychoice = choice
POINTS R0 ! Get scan range in NPOINTS
lowscan = 1
highscan = NPOINTS
if (mychoice = 1) then
NiceOutput
endif
if (mychoice = 2) then
LineOutput
endif
if (mychoice = 3) then
TICOutput
endIF
if (mychoice = 4) then
JCAMP4Lib2NIST
endIF
CLOSE #1
Alert "Beware: EXCEL is only 8-bit!",2
return
name NiceOutput
fileName$ = _DATAPATH$+_DATAFILE$ + "\xMSspec.txt"
OPEN fileName$ FOR OUTPUT AS #1
!change for header line output
PRINT USING #1,"%;%;%;%;%;%/","Scan","Time","TIC","MSPeaks","Mass","Abund"
i = 1
while i <= highscan
scan i
points x !get the number of spectra points
!***array starts from 0 , scans start from 1 aarrgghh
PRINT USING #1, "#;#.###;#;#/",i,r0[i-1,0],r0[i-1,1],NPOINTS
!*****************************************
!*** write out the mass pairs
masscount = 0 !array starts from zero
while masscount < NPOINTS
!*** take care !
!*** if you want true mass values use #.###
!*** and remove the round() function
!*** give out mass, abundance
print using #1 ,";;;;#.##;#/",round(x[masscount,0]),x[masscount,1]
masscount = masscount+1
endwhile
!*****************************************
i = i+1
print i
endwhile
return
name LineOutput
fileName$ = _DATAPATH$+_DATAFILE$ + "\xspecrow.txt"
OPEN fileName$ FOR OUTPUT AS #1
!header line output
PRINT USING #1,"%;%;%;%;%;%/","Scan","Time","TIC","MSPeaks","Mass","Abund"
i = 1
while i <= highscan
scan i
points x !get the number of spectra points
!***array starts from 0 , scans start from 1 aarrgghh
PRINT USING #1, "#;#.###;#;#",i,r0[i-1,0],r0[i-1,1],NPOINTS
!*****************************************
!*** write out the mass pairs
masscount = 0 !array starts from zero
while masscount < NPOINTS
! All spectra in one line
print using #1 ,";#.##;#",round(x[masscount,0]),x[masscount,1]
masscount = masscount+1
endwhile
!*****************************************
print using #1, "/"
i = i+1
print i
endwhile
return
name TICOutput
fileName$ = _DATAPATH$+_DATAFILE$ + "\xTIConly.txt"
OPEN fileName$ FOR OUTPUT AS #1
PRINT USING #1, "%;%;%;%;/","Scan","Time","TIC","MSPeaks"
i = 1
while i <= highscan
scan i
points x !get the number of spectra points
!***array starts from 0 , scans start from 1 aarrgghh
PRINT USING #1, "#;#.###;#;#/",i,r0[i-1,0],r0[i-1,1],NPOINTS
i = i+1
print i
endwhile
return
name JCAMP4Lib2NIST
! HP Chemstation GC-MS file to JCAMP-DX (HP2JCAMP)
! my contribution to the IUPAC year :-)
! but anyway, it would be better to use AMDIS32 and Lib2NIST
! and use only pure extracted peaks...
! for JCAMP look at
! http://wwwchem.uwimona.edu.jm:1104/software/jcampdx.html
! http://www.isas-dortmund.de/projects/jcamp/
! no compressed format -> ever built a hashtable in Chemstation ?
fileName$ = _DATAPATH$+_DATAFILE$ + "\JCMPGCMS.jdx"
OPEN fileName$ FOR OUTPUT AS #1
i = 1
while i <= highscan
scan i
points x !get the number of spectra points
!***array starts from 0 , scans start from 1 aarrgghh
PRINT USING #1, "% % %#/","##TITLE=",_DATAFILE$,"Scan ",i
PRINT #1, "##JCAMPDX= Revision 5.0"
PRINT #1, "##DATA TYPE= MASS SPECTRUM"
PRINT #1, "##DATA CLASS= PEAK TABLE"
PRINT #1, "##XUNITS= m/z"
PRINT #1, "##YUNITS= RELATIVE ABUNDANCE"
PRINT USING #1, "% #/", "##NPOINTS=", NPOINTS
PRINT #1, "##PEAK TABLE= (XY..XY)"
!*****************************************
!*** write out the mass pairs
masscount = 0 !array starts from zero
while masscount < NPOINTS
!*** take care !
!*** if you want true mass values use #.###
!*** and remove the round() function
!*** give out mass, abundance
print using #1 ,"# #/",round(x[masscount,0]),x[masscount,1]
masscount = masscount+1
endwhile
!*****************************************
i = i+1
print i
endwhile
return
!*** HP2ASCII.MAC ends here
With kind regards
Tobias Kind
PS:
I still can´t decide wether to take ICBINB
http://www.tasteyoulove.com/product/index.html
or My Three Suns
http://home.nikocity.de/stoesser/Tierrechte/txt/futurama.html
:-)
Good stuff, however Pham requires a macro for the LC/MS CHEMSTATION and it
ain't the same
macro language or at least a lot different !!
Phil
"Tobias Kind" <ki...@rziris.rz.uni-leipzig.de> a écrit dans le message news:
9lm5im$7h1$1...@news-int.gatech.edu...
This and more details were documented in the HP-UX ChemStation
manual, for instance.
Volker Haeupl - v...@quasium.com
"Dave White" <dave_...@spectrachrom.com> wrote in message
} news:9lm5k0$7h4$1...@news-int.gatech.edu...
Yes, sorry that I did not make it clear in the first message (call for help). I
was talking about the LC/MS data and it seems that the macro you've sent me is
not compatible. I tried to load it into the ChemStation and got the syntax
error message.
The HP ChemStation does not have to ability to export data set into net CDF
file, so the option to use MSgraph is also not OK.
I should explain a bit more about the purpose of having data in the ASCII
format. We want to play around with retention time shifting problem, then do
the PCA analysis for a set of data. This will be done by an data science guy in
our group. I am responsible for providing the data, but he will need them in
ASCII format to play around. Data taken on the MassLynx system has no such
problem due to the built in option for conversion. HP does not provide an
explicite function. That why I am asking for help.
Hai
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
} Tobias,
}
} Good stuff, however Pham requires a macro for the LC/MS CHEMSTATION and it
} ain't the same
} macro language or at least a lot different !!
Dear Phil,
yes! But my data system also has a RP18 column in the Agilent picture book. :-)
or :-(
[Maybe Pham Tuan Hai can answer if he has HP G1047A LC/MS Software or G2710AA
system ?
he already answered ]
And I know Lin DeNoyer claims to know how to read HP LC/MS ChemStation data.
And maybe he can send the header format and I will write a converter for a
piece of ICBINB...
PS:
Mmmhh... Philippe I found you in 167 out of my 1400 macros - so I guess
you also know the HP 3D LC/MS Chemstation format ?? :-)
Dear Pham,
For my Chemstation G1047A LC/MS, there is a "tabulate"
menu bar command that allows the clipboard to be
written with a 4-column output of the spectrum in
ASCII. This is awkward to reformat when the
clipboard is pasted to Excel, so I wrote a visual
basic excel macro to do the reformat. To use it
(trans8.xls), just clear the sample data from the
spreadsheets, and paste in your own tabulate output.
Then select run macro from the menu bar. The text file
will be written out to the directory specified in the
macro. Hope this helps,
Larry
Larry Gross obla...@yahoo.com
HHMI - University of California, San Diego
}Dear all,
}I am new to the list and do not know if the problem
}has been voiced an answered before. If yes, pls point
}me to the right direction.
}I am looking for a way to convert the entire HP
}Chemstation MSD data file into
}ASCII format. It can be a macro or an independent
}program. I have found in the
}ChemStation itself only a feature to convert either
}selected chromatogram or
}spectrum to an ASCII file. Does anyone have
}experience with the same problem?
}Thanks a lot for your help,
}Dr. Pham Tuan Hai
} And I know Lin DeNoyer claims to know how to read HP LC/MS ChemStation data.
Is he also on the list or do you know how I can reach him?
} And maybe he can send the header format and I will write a converter for a
} piece of ICBINB...
How can I get the header format out of the HP LC/MS data file? I don't exactly
understand what you mean.
Hi Larry,
} Dear Pham,
} For my Chemstation G1047A LC/MS, there is a "tabulate"
} menu bar command that allows the clipboard to be
} written with a 4-column output of the spectrum in
} ASCII. This is awkward to reformat when the
} clipboard is pasted to Excel, so I wrote a visual
} basic excel macro to do the reformat. To use it
} (trans8.xls), just clear the sample data from the
} spreadsheets, and paste in your own tabulate output.
} Then select run macro from the menu bar. The text file
} will be written out to the directory specified in the
} macro. Hope this helps,
} Larry
No, it is not the average spectra over a time range that I want to get. I would
like to have the every scan from the MS file. I know the tabulate command and
can "export" scan by scan but it will take years before I can convert one
complete MS data file into the ASCII :-) Thanks anyway.
Cheers
}} And I know Lin DeNoyer claims to know how to read HP LC/MS ChemStation data.
I checked my harddrive. I have a fortran source file
with a little program that reads ChemStation files.
Program was developed in Oct 97, so that is the version it reads.
As far as I know, it works for current Chemstation LCMS files also.
Send me an email. I'll ship you the source file.
If you want to know whether this source file will read your particular
data file, send me the file, I will put it into our MOP program, and
see if the data appears on the screen.
Lin