-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseqlassify.R
More file actions
42 lines (28 loc) · 992 Bytes
/
seqlassify.R
File metadata and controls
42 lines (28 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
library("q2e")
library("bioarch")
#Specify the `margins' of the sample
moff = 1
#load the cow sample
cow <- isodists("../q2e/q2e/testdata/cowPeptides")
lbl <- min(cow$mass) - moff
ubl <- max(cow$mass) + moff
#load the test data
if(!exists("testdata"))
testdata <- loadBrukerXML("/home/sjh/Desktop/sjh/bioarch/SF/SFData/20140307_SF_UPenn164-181/")
#below we pick a spot with good data:
tdi <- 24
#not sure which of these we'll need:
t1<-testdata[[tdi]]
t1l<-list(t1)
#get the subset of the data
testi <- t1l[[1]]@intensity[lbl <= t1l[[1]]@mass & t1l[[1]]@mass < ubl ]
testm <- t1l[[1]]@mass[lbl <= t1l[[1]]@mass & t1l[[1]]@mass < ubl ]
#Plot the raw data
plot(x=testm,y=testi)
#create an interpolation
xout = seq(from = lbl, to = ubl, by = 0.02)
#message("bang!")
#testint <- approx(x=xi,y=yi,xout=xout, method="linear", rule = 2)
yri <- approx(x=testm,y=testi,xout=xout, method="linear", rule = 2)
#plot the interpolated data
lines(x=yri[[1]],y=yri[[2]])