You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been following the tutorial on BioConductor: link, but after peak picking, I've noticed that findChromPeaks returns duplicate peaks:
library(xcms)
## Get the full path to the CDF filescdfs<- dir(system.file("cdf", package="faahKO"), full.names=TRUE,
recursive=TRUE)[c(1, 2, 5, 6, 7, 8, 11, 12)]
## Create a phenodata data.framepd<-data.frame(sample_name= sub(basename(cdfs), pattern=".CDF",
replacement="", fixed=TRUE),
sample_group= c(rep("KO", 4), rep("WT", 4)),
stringsAsFactors=FALSE)
# Read the raw dataraw_data<- readMSData(files=cdfs, pdata= new("NAnnotatedDataFrame", pd),
mode="onDisk")
# Filter for a smaller subsetraw_data<- filterRt(raw_data, c(2500, 3500))
# Set parameters for Peak Pickingcwp<- CentWaveParam(peakwidth= c(20, 80), noise=5000,
prefilter= c(6, 5000))
# Perform peak picking and save resultsdata<- findChromPeaks(raw_data, param=cwp)
# Retrieve peak data as a data.framepeaks<- as.data.frame(chromPeaks(data))
# Find unique combinations of mass, retention time and sample numberuniqueComb<- paste(peaks$mz, peaks$rt, peaks$sample)
# Find duplicatesisDuplicated<- duplicated(uniqueComb)
# Get all rows that are duplicatedduplicates<-uniqueComb[isDuplicated]
# Get all peaks that have the unique combination in the duplicatesduplicatePeaks<-peaks[uniqueComb%in%duplicates, ]
# Print the duplicate peaksduplicatePeaks
Here's a sample of the output:
Interestingly, while the m/z, rt and into are equal, the intb is not. I've tested this on the same version as BioConductor: 3.22, but also on the GitHub 3.99.5 version.
Best,
Pascal
The text was updated successfully, but these errors were encountered:
Hi, yes, that is a known issue of centWave - it happens for some data sets. I did however not figure out where in the code this actually happens. What I usually do here is to run the refineChromPeaks with the MergeNeighboringPeaksParam after peak detection. That removes/fuses duplicated peaks. Maybe also have a look into the xcmsTutorials for a description.
Hi,
I've been following the tutorial on BioConductor: link, but after peak picking, I've noticed that
findChromPeaks
returns duplicate peaks:Here's a sample of the output:
Interestingly, while the m/z, rt and into are equal, the
intb
is not. I've tested this on the same version as BioConductor: 3.22, but also on the GitHub 3.99.5 version.Best,
Pascal
The text was updated successfully, but these errors were encountered: