int <- c(2,0,0,0,1,5,1,0,0,1,3,1,0,0,1,4,2,1)
sp1 <- new("Spectrum2",
intensity=int,
mz=1:length(int))
sp2 <- removePeaks(sp1) ## no peaks are removed here
## as min intensity is 1 and
## no peak has a max int <= 1
sp3 <- removePeaks(sp1,3)
intensity(sp1)
intensity(sp2)
intensity(sp3)
peaksCount(sp1) == peaksCount(sp2)
peaksCount(sp3) <= peaksCount(sp1)
data(itraqdata)
itraqdata2 <- removePeaks(itraqdata, t = 2.5e5)
table(unlist(intensity(itraqdata)) == 0)
table(unlist(intensity(itraqdata2)) == 0)
processingData(itraqdata2)
## difference between centroided and profile peaks
int <- c(104, 57, 32, 33, 118, 76, 38, 39, 52, 140, 52, 88, 394, 71,
408, 94, 2032)
sp <- new("Spectrum2",
intensity = int,
centroided = FALSE,
mz = seq_len(length(int)))
## unchanged, as ranges of peaks <= 500 considered
intensity(removePeaks(sp, 500))
centroided(sp) <- TRUE
## different!
intensity(removePeaks(sp, 500))
Run the code above in your browser using DataLab