findSOI: findSOI

findSOIR Documentation

findSOI

Description

Generates a list of SOI (Scans of Interest) given a peaklist and appends it to the RHermesExp object.

Usage

findSOI(struct, params, fileID, blankID = numeric(0))

## S4 method for signature 'RHermesExp'
findSOI(struct, params, fileID, blankID = numeric(0))

Arguments

struct

The RHermesExp object to which the SOI list will be saved.

params

A SOIParam object or a list of SOIParam, contains all the parameters necessary to generate the SOI. See getSOIpar for more info on how to set it. If params is a list, findSOI will use each object for each SOI list it generates until it has used them all. When that happens, the function will keep using the same SOIparam object for the rest of SOIs.

fileID

Numeric vector of the indexes of the peaklists you want to process into a SOI.

blankID

Optional. Numeric vector of the indexes of peaklists to use as a 'blank' against the correspoding fileID PL. If you enter 0 (or don't input anything at all), no blank substraction will be performed. In case you want to process multiple SOIs and only some of them have blank substraction, you must space the 0s so that the indexes match. (See examples)

Value

An updated RHermesExp object with the resulting SOI lists appended.

Examples

if(FALSE){
p <- getSOIpar('double') #Set SOI parameters
myHermes <- findSOI(myHermes, p, 1) #Basic usage, no blank substraction

#Blank substraction usage, 1 without blank and 2 using 1 as blank
myHermes <- findSOI(myHermes, p, c(1, 2), c(0, 1))

#Even more advanced usage, with multiple parameters and blank substraction
#Here the first SOI is calculated using p and without blank sub.
#The second uses p2 and 1 as a blank
#And the same goes for the third. p2 would be reused and 1 as blank
p2 <- getSOIpar('triple')
myHermes <- findSOI(myHermes, c(p,p2), c(1, 2, 3), c(0, 1, 1))
}


RogerGinBer/RHermes documentation built on Nov. 6, 2022, 11:34 a.m.