findMzGroup,proFIAset-method {proFIA} | R Documentation |
Find a group corresponding to the given mass in a proFIAset object, given a tolerance in ppm.The mz considered for a group is the median fo the grouped signals between the various acquisition.
## S4 method for signature 'proFIAset' findMzGroup(object, mz, tol, dmz = 0.005, closest = TRUE)
object |
A proFIAset object. |
mz |
A numeric vector of masses to be looked for. |
tol |
The tolerance in ppm. |
dmz |
The minimum tolerance in absolute mz compared to the tolerance in ppm. |
closest |
Shall only the closest group be returned. |
A vector of integer of the same length than mz giving the row of the found group in the object group slot, or NA if the group is not found.
If closest is FALSE a list giving the index of the found group, if closest is TRUE a vector giving the position. NA indicates that the mass signal have not bene found.
You can visualize the group using plotFlowgrams
function.
if(require("plasFIA")){ #proFIAset object is loaded data(plasSet) #The table of spiked molecule is loaded data(plasMols) #Mass to search and toolerance are defined mass<-plasMols[22,"mass_M+H"] tolppm <- 1 plasSet<- makeDataMatrix(plasSet) index <- findMzGroup(plasSet,mass,tol=tolppm) plasMols[22,] #We extract the corresponding group. groupMatrix(plasSet)[index,] }