-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.py
More file actions
24 lines (19 loc) · 762 Bytes
/
test.py
File metadata and controls
24 lines (19 loc) · 762 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
import argparse
import numpy as np
import pickle
import GPTime
def parse_commandline():
parser = argparse.ArgumentParser(description="GPTime Train")
parser.add_argument('-p','--peptides', help="Path to the file containing their peptides and retention time", required=True)
parser.add_argument('-m','--model', help="""Path to the model file."""
, required=True)
args = parser.parse_args()
return args
if __name__=="__main__" :
args = parse_commandline()
peptides = GPTime.peptides.load(args.peptides, check_duplicates=False)
model = GPTime.model.load( args.model )
for p in peptides :
m,v = model.eval(p)
s = np.sqrt(v)
print(p.sequence, p.rt,m,v,s)