mquant_bin: MALDIquant binning

View source: R/fct_peakFuzzifier.R

mquant_binR Documentation

MALDIquant binning

Description

MALDIquant binning

Usage

mquant_bin(massStart, massEnd, massList, intensityList, method, tolerance)

Arguments

massStart

beginning of mass range (as of now, must be smaller than smallest mass)

massEnd

end of mass range (as of now, must be smaller than smallest mass)

massList

list of mass vectors (eg list(1:10, 1:10))

intensityList

list of intesity vectors (eg list(1:10, 1:10))

method

bin creation rule. "strict" creates bins never containing two or more peaks of the sampe sample. "relaxed" allows multiple peaks of the same sample in one bin.

tolerance

double, maximal relative deviation of a peak position (mass) to be considered as identical. Must be multiplied by 10^-6 for ppm, e.g. use tolerance=5e-6 for 5 ppm.

Value

matrix where rows are samples and columns are variables (m/z preojections)

Examples

## Not run: 
masses <- list(Sample_A = c(5000,6000,7000), 
Sample_B = c(5000,6010,7005), Sample_C = c(5000,6010,7005))  
intensities <- list(Sample_A = rep(1, 3), 
Sample_B = rep(1, 3),
 Sample_C = rep(1, 3))
zx <- binnR(massStart = 3000,
            massEnd = 15000,
            ppm = 500,
            massList = masses,
            intensityList = intensities)
            
## End(Not run)

chasemc/IDBacApp documentation built on Oct. 22, 2022, 2:52 a.m.