# nacítame kniznicu pre analýzu SELDI-TOF dát library(PROcess) # nacítame základné SELDI dáta dvoch vzoriek fdat <- system.file("Test", package="PROcess") fs <- list.files(fdat, pattern="\\.*csv\\.*", full.names=TRUE) f1 <- read.files(fs[1]) # vyberieme jednu vzorku fcut <- f1[f1[,1]>0,] # odstránenie baseline a vykreslenie bseoff <-bslnoff(fcut,method="loess",plot=TRUE, bw=0.1) title(basename(fs[1])) # identifikácia píkov pkgobj <- isPeak(bseoff,span=81,sm.span=11,plot=TRUE) # zooming na m/z oblast specZoom(pkgobj, xlim=c(5000,10000)) # odstránenie baseline z viac spektier naraz testM <- rmBaseline(fdat) plot(testM[,2], type="l") lines(testM[,1], col=2) # normalizácia pomocou TIC, dáta sú orezané na min 1500 daltonov rtM <- renorm(testM, cutoff=1500) plot(rtM[,2], type="l", las=1, ylab="Intensity", xlab="m/z") lines(rtM[,1], col=2) sel=which(names(rtM[,2])>3800 & names(rtM[,2])<4100) plot(names(rtM[sel,2]),rtM[sel,2], type="l", las=1, ylab="Intensity", xlab="m/z") ## identifikácie píkov peakfile <- paste(tempdir(), "testpeakinfo.csv", sep = "/") getPeaks(rtM, peakfile) # píky boli ulozené do .csv súboru pik = read.csv(peakfile) pik ## kontrola kvality qualRes <- quality(testM, peakfile, cutoff=1500) print(qualRes) #1.Quality< 0.4; #2.Retain< 0.1; #3.peak< 1/2 of the mean peak number in the chip. # Zarovnanie píkov bmkfile <- paste(tempdir(), "alignedpeaks.csv", sep = "/") testBio <- pk2bmkr(peakfile, rtM, bmkfile) mzs <- as.numeric(rownames(rtM)) matplot(mzs, rtM, type = "l", xlim = c(1000, 10000), ylab="intensities", main="aligned peaks") bks <- getMzs(testBio) print(round(bks)) abline(v = bks, col = "green") matplot(mzs, rtM, type = "l", xlim = c(2500, 4000), ylab="intensities", main="aligned peaks")