Learn R Programming

readBrukerFlexData (version 1.9.3)

readBrukerFlexFile: Reads mass spectrometry data in Bruker Daltonics XMASS format.

Description

This function reads mass spectrometry data in Bruker Daltonics XMASS format used by Bruker Daltonics mass spectrometer of *flex series (autoflex, microflex, ultraflex).

Usage

readBrukerFlexFile(
  fidFile,
  removeMetaData = FALSE,
  useHpc = TRUE,
  filterZeroIntensities = FALSE,
  keepNegativeIntensities = FALSE,
  verbose = FALSE
)

Value

A list of spectra and metadata.

  • spectrum$mass: A vector of calculated mass.

  • spectrum$tof: A vector of time-of-flight data.

  • spectrum$intensity: A vector of intensity values.

  • metaData: A list of metaData depending on read spectrum.

Arguments

fidFile

character, path to fid file which should be read.

removeMetaData,

logical, to calculate mass data a lot of meta data are needed. To save memory they could be deleted after calculation.

useHpc

logical, should Bruker Daltonics' High Precision Calibration be used if available? (see also: .hpc)

filterZeroIntensities

logical, don't change it. If TRUE all intensities equal 0.0 are removed. (see also: ‘Details’ section)

keepNegativeIntensities

logical, don't change it. If FALSE all intensities less than zero are replaced by zero. (see also: ‘Details’ section)

verbose

logical, print verbose messages?

Details

readBrukerFlexFile has to import the following data to calculating mass from acqu file:

acqu-valuebecomes metaDatadescription
$BYTORDAmetaData$byteOrderendianness of fid file
$TDmetaData$numbertotal number of measured time periods
$DELAYmetaData$timeDelayfirst measured intensity after metaData$timeDelay ns
$DWmetaData$timeDeltans between measured time periods
$ML1metaData$calibrationConstants[1]mass calibration constant
$ML2metaData$calibrationConstants[2]mass calibration constant
$ML3metaData$calibrationConstants[3]mass calibration constant

If High Precision Calibration (HPC) is used, readBrukerFlexFile needs:

acqu-valuebecomes metaDatadescription
$HPClBHimetaData$hpc$limits[“maxMass”]upper mass threshold
$HPClBLometaData$hpc$limits[“minMass”]lower mass threshold
$HPClOrdmetaData$hpc$orderpolynomial order
$HPClUsemetaData$hpc$usemaybe using of HPC? (seems to be always “yes” in our test data)
$HPCStrmetaData$hpc$coefficientspolynomial coefficients in a string

readBrukerFlexFile tries also to import [optional]:

acqu-valuebecomes metaDatadescription
DATATYPEmetaData$dataTypee.g CONTINUOUS MASS SPECTRUM
SPECTROMETER/DATASYSTEMmetaData$dataSysteme.g. Bruker Flex Series
.SPECTROMETER TYPEmetaData$spectrometerTypee.g. TOF
.INLETmetaData$inletDIRECT
.IONIZATION MODEmetaData$ionizationModee.g. LD+
$DATEmetaData$datesame as $AQ_DATE but often only "0"
$ACQMETHmetaData$acquisitionMethodpath to method file
$AQ_DATEmetaData$acquisitionDateacquisition date
$AQ_modmetaData$acquisitionModeacquisition mode
$AQOP_mmetaData$acquisitionOperatorMode, metaData$tofModeLINEAR / REFLECTOR
$ATTENmetaData$laserAttenuationlaser beam attenuation
$CMT[1:4]metaData$commentscomments
$DEFLONmetaData$deflectiondeflection ON/OFF
$DIGTYPmetaData$digitizerTypetype of digitizer
$DPCAL1metaData$deflectionPulserCal1deflection pulser cal 1
$DPMASSmetaData$deflectionPulserMassdeflection pulser mass
$FCVermetaData$flexControlVersionVersion of Bruker Daltonics FlexControl software
$ID_rawmetaData$idspectrum id
$INSTRUMmetaData$instrumente.g. AUTOFLEX
$InstrIDmetaData$instrumentIdID of mass spectrometer
$InstTypmetaData$instrumentTypeinstrument type
$Lift1metaData$lift[1]LIFT constant?
$Lift2metaData$lift[2]LIFT constant?
$MasserrmetaData$massErrorinitial mass error in ppm
$NoSHOTSmetaData$laserShotsnumber of applied laser shots
$PATCHNOmetaData$patchsample postion on target
$PATHmetaData$pathoriginal file path (on Bruker *flex series controller PC)
$REPHZmetaData$laserRepetitionlaser repetition rate in Hz
$SPOTNOmetaData$spotsame as $PATCHNO (in older files often empty, that's why readBrukerFlexFile uses $PATHNO instead)
$SPTypemetaData$spectrumTypee.g. TOF
$TgIDSmetaData$target$idtarget ids
$TgCountmetaData$target$countnumber of measurements with this target
$TgSermetaData$target$serialNumbertarget serial number
$TgTypmetaData$target$typeNumbertarget type number
$TLiftmetaData$tliftLIFT constant?

import from file path:

valuebecomes metaDatadescription
full current path to fid filemetaData$filepath on local machine
sample namemetaData$sampleName-

filterZeroIntensities: Change default value is not recommended! If TRUE all intensities equal zero are removed. This parameter exists only to be compatible to Bruker Daltonics CompassXport's mzXML export function. For details see: ‘Release Notes for CompassXport 3.0.3’, cap. 6 ‘Filtering of Zero Intensities’: “Bruker Daltonics' Acquisition Software will compress Analysis raw data. To save on operation time and to keep export file sizes small, CompassXport 3.0.3 will filter out zero (0.0) intensities when exporting to mzXML or mzData ...”

keepNegativeIntensities: Change default value is not recommended! If TRUE negative intensity values are not replaced by zero. This parameter exists only to be compatible to Bruker Daltonics CompassXport.

See Also

https://github.com/sgibb/readBrukerFlexData/wiki, importBrukerFlex, readBrukerFlexDir, .hpc

Examples

Run this code
## load library
library("readBrukerFlexData")

## get examples directory
exampleDirectory <- system.file("Examples", package="readBrukerFlexData")

## read example spectrum
spec <- readBrukerFlexFile(file.path(exampleDirectory,
  "2010_05_19_Gibb_C8_A1/0_A1/1/1SLin/fid"))

## print metaData
print(spec$metaData)

## plot spectrum
plot(spec$spectrum$mass, spec$spectrum$intensity, type="l", col="red")

Run the code above in your browser using DataLab