Closed ghost closed 2 years ago
Indeed, there can be files and combinations of files that can result in unexpected behaviour like this.
I would suggest the following
raw_data <- filterEmptySpectra(raw_data)
before calling chromatogram
on it to extract the BPC.rts <- split(rtime(raw_data), fromFile(raw_data))
lapply(rts, range)
you could then select a (rounded maybe) retention time range that is within all files and filter the raw_data
accordingly.
bpis <- chromatogram(filterRt(raw_data, c(1, 2000)), aggregationFun = "max")
You would obviously exchange the values 1
and 2000
above with the values that match your files (i.e. the minimum and maximum retention time to which you would filter your data set).
Thank you! It worked.
I coped and pasted codes from
https://bioconductor.org/packages/devel/bioc/vignettes/xcms/inst/doc/xcms.html
. I changed files to mine. I executed the following code,I got the following error
I knew my files. There are 601 scans in some files, 602 scans in others. I wonder if different scans created such a problem.