ptrvListSignificantSNRIons: ptrvListSignificantSNRIons

View source: R/ptrvListSignificantSNRIons.r

ptrvListSignificantSNRIonsR Documentation

ptrvListSignificantSNRIons

Description

This function calculates the ratio (max intensity for signal)/(max intensity for noise) after breathing correction and returns an ion as significant if this ratio is higher than 3.

Usage

ptrvListSignificantSNRIons(
  listFiles,
  metaData,
  dec_vec = rep(".", length(listFiles)),
  multiplyNoiseBy = 3,
  noisePeriod = c(0, 25),
  removeNoise = TRUE,
  minimalDuration = 2,
  halfWindowSize = 5,
  smoothMethod = "MovingAverage",
  minExpi = NULL,
  maxInspi = NULL,
  forMinExpiDivideMaxIntBy = 4,
  forMaxInspiDivideMaxIntBy = 5
)

Arguments

listFiles

list of files

metaData

metaData

dec_vec

vector with the same size as listFiles containing the decimal separator used in the files

multiplyNoiseBy

a number such as a ion whose maximal intensity during tasting/maximal intensity during blank period > multiplyNoiseBy is detected as significant (used for method=="max")

noisePeriod

vector with two numbers indicating the period corresponding to a blank period.

removeNoise

if TRUE, the noise is removed in the calculation of intensity by time

minimalDuration

minimalDuration of a breathing cycle (2 by default - as a accelerated breathing frequency corresponds to 20 cycles and more by minut and a low frequency is 12 and less -)

halfWindowSize

parameter used to determine the smooth for the peak-picking used in break detection

smoothMethod

NULL, "SavitzkyGolay" or "MovingAverage"

minExpi

minimal value for an expiry intensity to be detected as an expiry (blue dotted line in the plot).

maxInspi

maximal intensity of the original curve required to be considered as a breathing peak (purple dotted line in the plot)

forMinExpiDivideMaxIntBy

default to 5. When minExpi is null, it is evaluated as the ratio of the maximal intensity and forMinIntensityDivideMaxIntBy

forMaxInspiDivideMaxIntBy

default to 5. When minExpi is null, it is evaluated as the ratio of the maximal intensity and forMinIntensityDivideMaxIntBy

Value

A list containing: resIons: the ration Signal/Noise for all ions; intersection: the ions significant in all files; union: the ions significant in at least one file.

Examples

# DONOTRUN
#sigIons=ptrvListSignificantSNRIons(listFiles=c("file.txt","file2.txt"),
# referenceBreath="isoprene",noisePeriod=c(0,25))

ChemoSens/PTRMSR documentation built on June 15, 2025, 10:40 a.m.