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

View source: R/readBrukerFlexFile-functions.R

readBrukerFlexFileR Documentation

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
)

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-value becomes metaData description
$BYTORDA metaData$byteOrder endianness of fid file
$TD metaData$number total number of measured time periods
$DELAY metaData$timeDelay first measured intensity after metaData$timeDelay ns
$DW metaData$timeDelta ns between measured time periods
$ML1 metaData$calibrationConstants[1] mass calibration constant
$ML2 metaData$calibrationConstants[2] mass calibration constant
$ML3 metaData$calibrationConstants[3] mass calibration constant

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

acqu-value becomes metaData description
$HPClBHi metaData$hpc$limits[“maxMass”] upper mass threshold
$HPClBLo metaData$hpc$limits[“minMass”] lower mass threshold
$HPClOrd metaData$hpc$order polynomial order
$HPClUse metaData$hpc$use maybe using of HPC? (seems to be always “yes” in our test data)
$HPCStr metaData$hpc$coefficients polynomial coefficients in a string

readBrukerFlexFile tries also to import [optional]:

acqu-value becomes metaData description
DATATYPE metaData$dataType e.g CONTINUOUS MASS SPECTRUM
SPECTROMETER/DATASYSTEM metaData$dataSystem e.g. Bruker Flex Series
.SPECTROMETER TYPE metaData$spectrometerType e.g. TOF
.INLET metaData$inlet DIRECT
.IONIZATION MODE metaData$ionizationMode e.g. LD+
$DATE metaData$date same as $AQ_DATE but often only "0"
$ACQMETH metaData$acquisitionMethod path to method file
$AQ_DATE metaData$acquisitionDate acquisition date
$AQ_mod metaData$acquisitionMode acquisition mode
$AQOP_m metaData$acquisitionOperatorMode, metaData$tofMode LINEAR / REFLECTOR
$ATTEN metaData$laserAttenuation laser beam attenuation
$CMT[1:4] metaData$comments comments
$DEFLON metaData$deflection deflection ON/OFF
$DIGTYP metaData$digitizerType type of digitizer
$DPCAL1 metaData$deflectionPulserCal1 deflection pulser cal 1
$DPMASS metaData$deflectionPulserMass deflection pulser mass
$FCVer metaData$flexControlVersion Version of Bruker Daltonics FlexControl software
$ID_raw metaData$id spectrum id
$INSTRUM metaData$instrument e.g. AUTOFLEX
$InstrID metaData$instrumentId ID of mass spectrometer
$InstTyp metaData$instrumentType instrument type
$Lift1 metaData$lift[1] LIFT constant?
$Lift2 metaData$lift[2] LIFT constant?
$Masserr metaData$massError initial mass error in ppm
$NoSHOTS metaData$laserShots number of applied laser shots
$PATCHNO metaData$patch sample postion on target
$PATH metaData$path original file path (on Bruker *flex series controller PC)
$REPHZ metaData$laserRepetition laser repetition rate in Hz
$SPOTNO metaData$spot same as $PATCHNO (in older files often empty, that's why readBrukerFlexFile uses $PATHNO instead)
$SPType metaData$spectrumType e.g. TOF
$TgIDS metaData$target$id target ids
$TgCount metaData$target$count number of measurements with this target
$TgSer metaData$target$serialNumber target serial number
$TgTyp metaData$target$typeNumber target type number
$TLift metaData$tlift LIFT constant?

import from file path:

value becomes metaData description
full current path to fid file metaData$file path on local machine
sample name metaData$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.

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.

See Also

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

Examples

## 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")


readBrukerFlexData documentation built on Oct. 3, 2024, 1:06 a.m.