comparison application.py @ 0:ddcab0f11473 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/psm_validation commit 896365c9d6b9fcdcbb9c36e0c81db78c8a4e8dab"
author galaxyp
date Thu, 15 Oct 2020 07:45:17 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ddcab0f11473
1 import argparse
2
3 import psmfragmentation.psmfragmentation as pf
4
5
6 if __name__ == "__main__":
7 parser = argparse.ArgumentParser(description="Run PSM Validator")
8 parser.add_argument(
9 "-d",
10 "--dbname",
11 help="Path to mzsqlite db",
12 )
13 parser.add_argument(
14 "-p",
15 "--peptides",
16 help="Path to peptide sequence file",
17 )
18 parser.add_argument(
19 "-n",
20 "--neutral",
21 action="store_true",
22 default=False,
23 help="Calculate netutral loss",
24 )
25 parser.add_argument(
26 "-i",
27 "--internal",
28 action="store_true",
29 default=False,
30 help="Calculate internals",
31 )
32 parser.add_argument(
33 "-e", "--epsilon", type=float
34 )
35 parser.add_argument(
36 "-b",
37 "--b_run",
38 type=int,
39 default=2,
40 help="Number of consecutive b-ions"
41 )
42 parser.add_argument(
43 "-y",
44 "--y_run",
45 type=int,
46 default=2,
47 help="Number of consecutive y-ions"
48 )
49
50 parser.add_argument(
51 "-t",
52 "--test",
53 action="store_true",
54 default=False
55 )
56
57 args = parser.parse_args()
58
59 itypes = ['b', 'y']
60 if args.neutral:
61 itypes.extend(['b-H2O', 'b-NH3', 'y-H2O', 'y-NH3'])
62
63 if args.internal:
64 itypes.append('M')
65
66 pf.score_psms(args.dbname, args.peptides, ion_types=itypes, epsilon=args.epsilon, maxcharge=1, b_run=args.b_run, y_run=args.y_run, a_test=args.test)