From: Malick H. <heu...@ch...> - 2008-10-20 12:35:19
|
An important set of commands that can be used to see which Peaks are ommited # Assuming that you have created an object xraw with the xcmsRaw function call. #This command filters out all last mz's from your xraw@filterLine slot > bound <- unique(as.numeric( sub("([^@]*).*","\\1", (grep("@", > unlist(strsplit(levels(xraw@filterLine), " ")), value=TRUE))))) # Assuming that you have created an object xfrag with the xcmsFragments #function call. This command compares your column xfrag@peaks[,5] (storing the #xf@peaks mz values ) with all the filterLine mz's and keeps the mz in noise #that are not present in xfrag@peaks[,5]. The second command converts the noise #back to numeric values > noise <- > setdiff(as.character(bound),as.character(round(xfrag@peaks[,5],2))); > noise <- as.numeric(noise) # Now you need to know a priori howmany peaks are returned by xf@peaks and you #can cbind the xfrag@peaks[,5] column to the xfrag@peaks[,6] column while #omitting the ms1 peaks. So that they properly bind to each other. I have for #example 48 peaks in xf@peaks and 5 ms1 peaks, so I start the cbind for #xf@peaks[,6] as follow: > cbind(round( (xfrag@peaks)[xfrag@peaks[,2],5],2) , xfrag@peaks[5:48,6]) #this allows to see if the filterLine mz and xf#peaks mz are the same #noise be called to see which peaks are skipped ;-) Quoting Malick Heuvel <heu...@ch...>: > With this message I ask some attention for a new > xcmsFragments I've added 5 new columns in the xcmsFragments > xf@peaks table the: > * CID, * filterLine, * AquisitionNumber of a FilterLine, * last mz of > a filterLine > > In this way we can compare for a Peak if its corresponding > msnParentPeak's mz value correspond to last mz in FilterLine. Still a > note to be aware of. > > There are cases that an mzxml file has more last mz's in > unique(FilterLines) which are not present in xf@peaks. How to deal > with those missing peaks are they noise peaks when to state that they > are noise. > > The aquisitionNumber in xf@peaks tells for each peak from which scan > it was derived and corresponds with the "Scan num=" in your mzxml file. > The same Scan in mzxml has an filterLine in xf@peaks, which should > correspond with the mz in column "last mz of a filterLine" in > xf@peaks. I verified that this was the case for an FTMS experiment > with unusual settings. Please your attention and comments. I want to > be sure that its failsafe > > > Regards > > Malick A.D Heuvel > Netherlands Metabolomics Centre > Gorlaeus Laboratories > PO Box 9502 > 2300 RA Leiden > The Netherlands Malick A.D Heuvel Netherlands Metabolomics Centre Gorlaeus Laboratories PO Box 9502 2300 RA Leiden The Netherlands |