createPtrSet {ptairMS}R Documentation

Creates a ptrSet object form a directory

Description

This function creates a ptrSet-class S4 object. It opens each file and:

Usage

createPtrSet(
  dir,
  setName,
  mzCalibRef = c(21.022, 29.013424, 41.03858, 60.0525, 203.943, 330.8495),
  calibrationPeriod = 60,
  fracMaxTIC = 0.8,
  mzBreathTracer = NULL,
  knotsPeriod = 3,
  mzPrimaryIon = 21.022,
  saveDir = NULL
)

Arguments

dir

character. a directory path which contains several h5 files, possibly organized in subfolder

setName

character. name of the ptrSet object. If 'saveDir' is not null, the object will be saved with this name.

mzCalibRef

vector of the reference mass values; those masses should be accurate, and the corresponding peaks should be of high intensity and 'unique' in a nominal mass interval (without overlapping peaks) to performs calibration. See ?calibration.

calibrationPeriod

in second, coefficient calibration are estimated for each sum spectrum of calibrationPeriod seconds

fracMaxTIC

Fraction (between 0 and 1) of the maximum of the Total Ion Current (TIC) amplitude after baseline removal. Only the part of the spectrum where the TIC intensity is higher than 'fracMaxTIC * max(TIC) ' will be analyzed. If you want to analyze the entire spectrum, set this parameter to 0.

mzBreathTracer

integer: nominal mass of the Extracted Ion Current (EIC) used to compute the expiration time limits. If NULL, the limits will be computed on the Total Ion Current (TIC).

knotsPeriod

period in second (time scale) between two knots for the two dimensional modeling

mzPrimaryIon

Exact mass of the primary ion isotope

saveDir

Directory where the ptrSet object will be saved as .RData. If NULL, nothing will be saved.

Value

a ptrSet object with slots :

Examples

library(ptairData)
directory <- system.file('extdata/mycobacteria',  package = 'ptairData')
ptrSet<-createPtrSet(dir=directory,setName='ptrSet'
,mzCalibRef=c(21.022,59.049),
fracMaxTIC=0.9,saveDir= NULL)

[Package ptairMS version 1.2.0 Index]