Mercurial > repos > galaxyp > fastg2protlib
comparison application.py @ 0:6b226c5907a1 draft default tip
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/fastg2protlib commit e777bdb1d28b1ffee75cb1a8ad782a50c10a5358"
author | galaxyp |
---|---|
date | Fri, 07 Aug 2020 06:17:31 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6b226c5907a1 |
---|---|
1 import argparse | |
2 | |
3 import fastg2protlib.fastg2protlib as fg | |
4 | |
5 expasy_rules = [ | |
6 "arg-c", | |
7 "asp-n", | |
8 "bnps-skatole", | |
9 "caspase 1", | |
10 "caspase 2", | |
11 "caspase 3", | |
12 "caspase 4", | |
13 "caspase 5", | |
14 "caspase 6", | |
15 "caspase 7", | |
16 "caspase 8", | |
17 "caspase 9", | |
18 "caspase 10", | |
19 "chymotrypsin high specificity", | |
20 "chymotrypsin low specificity", | |
21 "clostripain", | |
22 "cnbr", | |
23 "enterokinase", | |
24 "factor xa", | |
25 "formic acid", | |
26 "glutamyl endopeptidase", | |
27 "granzyme b", | |
28 "hydroxylamine", | |
29 "iodosobenzoic acid", | |
30 "lysc", | |
31 "ntcb", | |
32 "pepsin ph1.3", | |
33 "pepsin ph2.0", | |
34 "proline endopeptidase", | |
35 "proteinase k", | |
36 "staphylococcal peptidase i", | |
37 "thermolysin", | |
38 "thrombin", | |
39 "trypsin", | |
40 "trypsin_exception", | |
41 ] | |
42 | |
43 | |
44 if __name__ == "__main__": | |
45 parser = argparse.ArgumentParser(description="Run peptides for fastg") | |
46 parser.add_argument("fastg", help="Path to Spades formatted FASTG.") | |
47 parser.add_argument( | |
48 "-d", | |
49 "--dbname", | |
50 default="results.db", | |
51 help="Name for the results database. Defaults to results.db", | |
52 ) | |
53 parser.add_argument( | |
54 "-c", | |
55 "--cleavage", | |
56 default="trypsin", | |
57 help="Cleavage rule from ExPASy cleavage rules. Defaults to trypsin.", | |
58 ) | |
59 parser.add_argument( | |
60 "-p", | |
61 "--min_protein_length", | |
62 default=55, | |
63 type=int, | |
64 help="Minimum protein length in number of amino acids. Defaults to 55.", | |
65 ) | |
66 parser.add_argument( | |
67 "-m", | |
68 "--min_peptide_length", | |
69 default=8, | |
70 type=int, | |
71 help="Minimum peptide length in amino acids. Defaults to eight.", | |
72 ) | |
73 parser.add_argument( | |
74 "-l", "--plots", default=True, type=bool, help="Generate diagnostic plots.", | |
75 ) | |
76 | |
77 args = parser.parse_args() | |
78 | |
79 print(args) | |
80 | |
81 fg.peptides_for_fastg( | |
82 fastg_filename=args.fastg, | |
83 db_name=args.dbname, | |
84 cleavage=args.cleavage, | |
85 min_protein_length=(args.min_protein_length * 3), | |
86 min_peptide_length=args.min_peptide_length, | |
87 create_plots=args.plots, | |
88 ) |