This repository has been archived by the owner on Jul 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
petrinettest.pl
executable file
·120 lines (93 loc) · 2.41 KB
/
petrinettest.pl
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/local/bin/perl
# Copyright SRA International
#
# Distributed under the OSI-approved BSD 3-Clause License.
# See http://ncip.github.com/pathway-interaction-database/LICENSE.txt for details.
##
## More options to consider:
## - save the input config file and allow retrieval
## - allow uploading a config file
## - limit to atoms of a given data source (maybe also with NOT)
## - allow retrieval by template
## - allow retrieval by degree (on incoming and/or outgoing edge) of
## separation (but don't follow pruned mols)
##
BEGIN {
my @path_elems = split("/", $0);
pop @path_elems;
push @INC, join("/", @path_elems);
}
use strict;
use Blocks;
use PWAppConfig;
use PWApp;
use Pathway;
use PathwayDB;
use PathParams;
use PWLabel;
use FileHandle;
use ServerSupport;
use URI::Escape;
######################################################################
sub InitializeDatabase {
InitializeLV();
}
######################################################################
sub GetPwImage {
my ($base, $id) = @_;
return GetPwImage_1 ($base, $id);
}
######################################################################
sub PrPath {
my ($base, $graphic_type, $parm_string) = @_;
$parm_string = uri_unescape($parm_string);
return PrPath_1 ($base, $graphic_type, $parm_string);
}
######################################################################
sub MoleculePage {
my ($base, $molid) = @_;
return MoleculePage_1($base, $molid);
}
######################################################################
sub ListAllPathways {
my ($base) = @_;
return ListAllPathways_1($base);
}
######################################################################
sub AtomPage {
my ($base, $atomid) = @_;
return AtomPage_1($base, $atomid);
}
######################################################################
######################################################################
#
# main
#
SetProgramName($0);
SetSafe(
"PrPath",
"GetPwImage",
"MoleculePage",
"ListAllPathways",
"AtomPage"
);
SetForkable(
"PrPath",
"GetPwImage",
"MoleculePage",
"ListAllPathways",
"AtomPage"
);
InitializeDatabase();
my $value = PrPath_1("", "text", join("\n",
"db_inst cgprod",
"db_user web",
"db_pass readonly",
"db_schema cgap",
"print petrinet",
"pathway_name g1/s check point",
"value 9 mol_name tgfb1",
""
));
my @tmp = split /\001/, $value;
print $tmp[2];