readRaw {ptairMS} | R Documentation

## Read a h5 file of PTR-TOF-MS data

### Description

`readRaw` reads a h5 file with rhdf5 library, and calibrates the mass axis with `mzCalibRef` masses each `calibrationPeriod` seconds. It returns a `ptrRaw-class` S4 object, that contains raw data.

### Usage

    readRaw(
      filePath,
      calib = TRUE,
      mzCalibRef = c(21.022, 29.013424, 41.03858, 60.0525, 203.943, 330.8495),
      calibrationPeriod = 60,
      tolCalibPpm = 70,
      maxTimePoint = 900
    )

### Arguments

`filePath` | h5 absolute file path full name.
`calib` | boolean. If true, an external calibration is performed on the `calibrationPeriod` sum spectrum with mzCalibRef reference masses.
`mzCalibRef` | calibration parameter. Vector of exact theoretical masses values of an intensive peak without overlapping.
`calibrationPeriod` | in second, coefficient calibration are estimated for each sum spectrum of `calibrationPeriod` seconds
`tolCalibPpm` | calibration parameter. The maximum error tolerated in ppm. A warning appears for error greater than `tolCalibPpm`.
`maxTimePoint` | number maximal of time point to read

### Value

a ptrRaw object, including slot

- rawM the data raw matrix, in count of ions

- mz the mz axis

- time time acquisition in second

### Examples

    library(ptairData)
    filePathRaw <- system.file('extdata/exhaledAir/ind1', 'ind1-1.h5',
    package = 'ptairData')
    raw <- readRaw(filePath=filePathRaw, mzCalibRef=c(21.022, 60.0525), calib=FALSE)

[Package ptairMS version 1.2.0 Index]