| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Bio::DB::NextProt; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '1.05'; |
|
4
|
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
78094
|
use strict; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
69
|
|
|
6
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
67
|
|
|
7
|
2
|
|
|
2
|
|
609
|
use REST::Client; |
|
|
2
|
|
|
|
|
42531
|
|
|
|
2
|
|
|
|
|
46
|
|
|
8
|
2
|
|
|
2
|
|
599
|
use Net::FTP::Tiny qw(ftp_get); |
|
|
2
|
|
|
|
|
5274
|
|
|
|
2
|
|
|
|
|
2932
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
|
12
|
1
|
|
|
1
|
0
|
157
|
my ($class, @args) = @_; |
|
13
|
|
|
|
|
|
|
#my $self = $class->SUPER::new(@args); |
|
14
|
1
|
|
|
|
|
2
|
my $self = {}; |
|
15
|
1
|
|
|
|
|
10
|
$self->{_client} = REST::Client->new({host=> "http://www.nextprot.org", timeout => 10,}); |
|
16
|
1
|
|
|
|
|
3707
|
$self->{_query} = undef; |
|
17
|
1
|
|
|
|
|
2
|
$self->{_filter} = undef; |
|
18
|
1
|
|
|
|
|
2
|
$self->{_chromosome} = undef; |
|
19
|
1
|
|
|
|
|
2
|
$self->{_format} = "json"; |
|
20
|
1
|
|
|
|
|
3
|
bless($self, $class); |
|
21
|
1
|
|
|
|
|
5
|
return $self; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub search_protein() { |
|
25
|
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
0
|
648429
|
my $self = shift; |
|
27
|
1
|
|
|
|
|
4
|
my %param = @_; |
|
28
|
|
|
|
|
|
|
|
|
29
|
1
|
|
|
|
|
2
|
my $path = "/rest/protein/list"; |
|
30
|
|
|
|
|
|
|
|
|
31
|
1
|
50
|
|
|
|
6
|
$self->{_format} = $param{'-format'} if defined $param{'-format'}; |
|
32
|
|
|
|
|
|
|
|
|
33
|
1
|
50
|
33
|
|
|
9
|
if (defined $param{'-query'} && defined $param{'-filter'}) { |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
0
|
$self->{_client}->GET($path."?query=".$param{'-query'}."&filter=".$param{'-filter'}."&format=".$self->{_format}); |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} elsif (defined $param{'-query'}) { |
|
38
|
|
|
|
|
|
|
|
|
39
|
1
|
|
|
|
|
8
|
$self->{_client}->GET($path."?query=".$param{'-query'}."&format=".$self->{_format}); |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
} elsif (defined $param{'-filter'}) { |
|
42
|
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
0
|
$self->{_client}->GET($path."?filter=".$param{'-filter'}."&format=".$self->{_format}); |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
1
|
|
|
|
|
533956
|
&reset_params(); |
|
47
|
|
|
|
|
|
|
|
|
48
|
1
|
|
|
|
|
6
|
return $self->{_client}->responseContent(); |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub search_cv() { |
|
53
|
1
|
|
|
1
|
0
|
184376
|
my $self = shift; |
|
54
|
1
|
|
|
|
|
4
|
my %param = @_; |
|
55
|
|
|
|
|
|
|
|
|
56
|
1
|
|
|
|
|
2
|
my $path = "/rest/cv/list"; |
|
57
|
|
|
|
|
|
|
|
|
58
|
1
|
50
|
|
|
|
8
|
$self->{_format} = $param{'-format'} if defined $param{'-format'}; |
|
59
|
|
|
|
|
|
|
|
|
60
|
1
|
50
|
33
|
|
|
8
|
if (defined $param{'-query'} && defined $param{'-filter'}) { |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
|
62
|
1
|
|
|
|
|
9
|
$self->{_client}->GET($path."?query=".$param{'-query'}."&filter=".$param{'-filter'}."&format=".$self->{_format}); |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
} elsif (defined $param{'-query'}) { |
|
65
|
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
0
|
$self->{_client}->GET($path."?query=".$param{'-query'}."&format=".$self->{_format}); |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
} elsif (defined $param{'-filter'}) { |
|
69
|
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
0
|
$self->{_client}->GET($path."?filter=".$param{'-filter'}."&format=".$self->{_format}); |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
1
|
|
|
|
|
167407
|
&reset_params(); |
|
74
|
|
|
|
|
|
|
|
|
75
|
1
|
|
|
|
|
6
|
return $self->{_client}->responseContent(); |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub get_protein_info() { |
|
80
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
81
|
0
|
|
|
|
|
0
|
my %param = @_; |
|
82
|
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
0
|
my $path = "/rest/entry/"; |
|
84
|
|
|
|
|
|
|
|
|
85
|
0
|
0
|
|
|
|
0
|
$self->{_format} = $param{'-format'} if defined $param{'-format'}; |
|
86
|
|
|
|
|
|
|
|
|
87
|
0
|
0
|
0
|
|
|
0
|
if (defined $param{'-query'} && $param{'-retrieve'}) { |
|
|
|
0
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
|
89
|
0
|
|
|
|
|
0
|
$self->{_client}->GET($path.$param{'-query'}."/".$param{'-retrieve'}."?format=".$self->{_format}); |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
} elsif (defined $param{'-query'}) { |
|
92
|
|
|
|
|
|
|
|
|
93
|
0
|
|
|
|
|
0
|
$self->{_client}->GET($path.$param{'-query'}."?format=".$self->{_format}); |
|
94
|
|
|
|
|
|
|
} |
|
95
|
|
|
|
|
|
|
|
|
96
|
0
|
|
|
|
|
0
|
&reset_params(); |
|
97
|
|
|
|
|
|
|
|
|
98
|
0
|
|
|
|
|
0
|
return $self->{_client}->responseContent(); |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
} |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub get_isoform_info() { |
|
103
|
1
|
|
|
1
|
0
|
63120
|
my $self = shift; |
|
104
|
1
|
|
|
|
|
3
|
my %param = @_; |
|
105
|
|
|
|
|
|
|
|
|
106
|
1
|
|
|
|
|
3
|
my $path = "/rest/isoform/"; |
|
107
|
|
|
|
|
|
|
|
|
108
|
1
|
50
|
|
|
|
5
|
$self->{_format} = $param{'-format'} if defined $param{'-format'}; |
|
109
|
|
|
|
|
|
|
|
|
110
|
1
|
50
|
33
|
|
|
8
|
if (defined $param{'-query'} && $param{'-retrieve'}) { |
|
|
|
50
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
|
112
|
0
|
|
|
|
|
0
|
$self->{_client}->GET($path.$param{'-query'}."/".$param{'-retrieve'}."?format=".$self->{_format}); |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
} elsif (defined $param{'-query'}) { |
|
115
|
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
0
|
$self->{_client}->GET($path.$param{'-query'}."?format=".$self->{_format}); |
|
117
|
|
|
|
|
|
|
} |
|
118
|
|
|
|
|
|
|
|
|
119
|
1
|
|
|
|
|
4
|
&reset_params(); |
|
120
|
|
|
|
|
|
|
|
|
121
|
1
|
|
|
|
|
6
|
return $self->{_client}->responseContent(); |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
} |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
sub get_protein_cv_info() { |
|
126
|
1
|
|
|
1
|
0
|
56153
|
my $self = shift; |
|
127
|
1
|
|
|
|
|
6
|
my %param = @_; |
|
128
|
|
|
|
|
|
|
|
|
129
|
1
|
|
|
|
|
4
|
my $path = "/rest/cv/"; |
|
130
|
|
|
|
|
|
|
|
|
131
|
1
|
50
|
|
|
|
7
|
$self->{_format} = $param{'-format'} if defined $param{'-format'}; |
|
132
|
|
|
|
|
|
|
|
|
133
|
1
|
50
|
33
|
|
|
12
|
if (defined $param{'-query'} && $param{'-retrieve'}) { |
|
|
|
0
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
|
|
135
|
1
|
|
|
|
|
14
|
$self->{_client}->GET($path.$param{'-query'}."/".$param{'-retrieve'}."?format=".$self->{_format}); |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
} elsif (defined $param{'-query'}) { |
|
138
|
|
|
|
|
|
|
|
|
139
|
0
|
|
|
|
|
0
|
$self->{_client}->GET($path.$param{'-query'}."?format=".$self->{_format}); |
|
140
|
|
|
|
|
|
|
} |
|
141
|
|
|
|
|
|
|
|
|
142
|
1
|
|
|
|
|
885524
|
&reset_params(); |
|
143
|
|
|
|
|
|
|
|
|
144
|
1
|
|
|
|
|
9
|
return $self->{_client}->responseContent(); |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
} |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
sub get_accession_list() { |
|
149
|
1
|
|
|
1
|
0
|
304057
|
my $self = shift; |
|
150
|
1
|
|
|
|
|
6
|
my %param = @_; |
|
151
|
|
|
|
|
|
|
|
|
152
|
1
|
|
|
|
|
2
|
my $path = "ftp://ftp.nextprot.org/pub/current_release/ac_lists"; |
|
153
|
1
|
|
|
|
|
3
|
my @file = (); |
|
154
|
|
|
|
|
|
|
|
|
155
|
1
|
50
|
|
|
|
7
|
if ( defined $param{'-chromosome'} ) { |
|
|
|
0
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
|
157
|
1
|
|
|
|
|
4
|
$self->{_chromosome} = $param{'-chromosome'}; |
|
158
|
1
|
|
|
|
|
2
|
my $chrom = $self->{_chromosome}; |
|
159
|
|
|
|
|
|
|
|
|
160
|
1
|
50
|
|
|
|
5
|
if ($chrom eq "all") { |
|
161
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_ac_list_all.txt"); |
|
162
|
|
|
|
|
|
|
} else { |
|
163
|
1
|
|
|
|
|
11
|
@file = ftp_get($path."/"."nextprot_ac_list_chromosome_".$chrom.".txt"); |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
} elsif ( defined $param{'-evidence'} ) { |
|
167
|
|
|
|
|
|
|
|
|
168
|
0
|
0
|
|
|
|
0
|
if ( $param{'-evidence'} eq "protein_level" ) { |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
169
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_ac_list_PE1_at_protein_level.txt"); |
|
170
|
|
|
|
|
|
|
} elsif ( $param{'-evidence'} eq "transcript_level" ) { |
|
171
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_ac_list_PE2_at_transcript_level.txt"); |
|
172
|
|
|
|
|
|
|
} elsif ( $param{'-evidence'} eq "homology" ) { |
|
173
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_ac_list_PE3_homology.txt") |
|
174
|
|
|
|
|
|
|
} elsif ( $param{'-evidence'} eq "predicted" ) { |
|
175
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_ac_list_PE4_predicted.txt") |
|
176
|
|
|
|
|
|
|
} elsif ( $param{'-evidence'} eq "uncertain" ) { |
|
177
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_ac_list_PE5_uncertain.txt") |
|
178
|
|
|
|
|
|
|
} |
|
179
|
|
|
|
|
|
|
} |
|
180
|
|
|
|
|
|
|
|
|
181
|
1
|
|
|
|
|
473293
|
&reset_params(); |
|
182
|
1
|
|
|
|
|
9
|
return @file; |
|
183
|
|
|
|
|
|
|
} |
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
sub get_hpp_report() { |
|
187
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
188
|
0
|
|
|
|
|
0
|
my %param = @_; |
|
189
|
|
|
|
|
|
|
|
|
190
|
0
|
|
|
|
|
0
|
my $path = "ftp://ftp.nextprot.org/pub/current_release/custom/hpp"; |
|
191
|
0
|
|
|
|
|
0
|
my @file = (); |
|
192
|
|
|
|
|
|
|
|
|
193
|
0
|
0
|
|
|
|
0
|
if ( defined $param{'-chromosome'} ) { |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
|
195
|
0
|
|
|
|
|
0
|
my $chrom = $param{'-chromosome'}; |
|
196
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."HPP_chromosome_".$chrom.".txt"); |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
} elsif ( defined $param{'-phospho'} ) { |
|
199
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."HPP_entries_with_phospho_by_chromosome.txt"); |
|
200
|
|
|
|
|
|
|
} elsif ( defined $param{'-nacetyl'} ) { |
|
201
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."HPP_entries_with_nacetyl_by_chromosome.txt"); |
|
202
|
|
|
|
|
|
|
} |
|
203
|
|
|
|
|
|
|
|
|
204
|
0
|
|
|
|
|
0
|
&reset_params(); |
|
205
|
0
|
|
|
|
|
0
|
return @file; |
|
206
|
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
} |
|
208
|
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
sub get_mapping() { |
|
211
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
212
|
0
|
|
|
|
|
0
|
my %param = @_; |
|
213
|
|
|
|
|
|
|
|
|
214
|
0
|
|
|
|
|
0
|
my $path = "ftp://ftp.nextprot.org/pub/current_release/mapping"; |
|
215
|
0
|
|
|
|
|
0
|
my @file = (); |
|
216
|
|
|
|
|
|
|
|
|
217
|
0
|
0
|
|
|
|
0
|
if ( defined $param{'-map'} ) { |
|
218
|
0
|
|
|
|
|
0
|
my $db = $param{'-map'}; |
|
219
|
|
|
|
|
|
|
|
|
220
|
0
|
0
|
|
|
|
0
|
if ( $db eq 'ensembl_gene' ) { |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
221
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_ensg.txt"); |
|
222
|
|
|
|
|
|
|
} elsif ( $db eq 'ensembl_protein' ) { |
|
223
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_ensp.txt"); |
|
224
|
|
|
|
|
|
|
} elsif ( $db eq 'ensembl_unmapped' ) { |
|
225
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_ensp_unmapped.txt"); |
|
226
|
|
|
|
|
|
|
} elsif ( $db eq 'ensembl_transcript' ) { |
|
227
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_enst.txt"); |
|
228
|
|
|
|
|
|
|
} elsif ( $db eq 'ensembl_transcript_unmapped' ) { |
|
229
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_enst_unmapped.txt"); |
|
230
|
|
|
|
|
|
|
} elsif ( $db eq 'geneid' ) { |
|
231
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_geneid.txt"); |
|
232
|
|
|
|
|
|
|
} elsif ( $db eq 'hgnc' ) { |
|
233
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_hgnc.txt"); |
|
234
|
|
|
|
|
|
|
} elsif ( $db eq 'mgi' ) { |
|
235
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_mgi.txt"); |
|
236
|
|
|
|
|
|
|
} elsif ( $db eq 'refseq' ) { |
|
237
|
0
|
|
|
|
|
0
|
@file = ftp_get($path."/"."nextprot_refseq.txt"); |
|
238
|
|
|
|
|
|
|
} |
|
239
|
|
|
|
|
|
|
} |
|
240
|
|
|
|
|
|
|
|
|
241
|
0
|
|
|
|
|
0
|
&reset_params(); |
|
242
|
0
|
|
|
|
|
0
|
return @file; |
|
243
|
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
} |
|
245
|
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
sub get_chromosome() { |
|
247
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
248
|
0
|
|
|
|
|
0
|
my %param = @_; |
|
249
|
|
|
|
|
|
|
|
|
250
|
0
|
|
|
|
|
0
|
my @data = (); |
|
251
|
0
|
|
|
|
|
0
|
my %table = (); |
|
252
|
|
|
|
|
|
|
|
|
253
|
0
|
|
|
|
|
0
|
my $path = "ftp://ftp.nextprot.org/pub/current_release/chr_reports"; |
|
254
|
|
|
|
|
|
|
|
|
255
|
0
|
0
|
|
|
|
0
|
if ( defined $param{'-chromosome'} ) { |
|
256
|
|
|
|
|
|
|
|
|
257
|
0
|
|
|
|
|
0
|
$self->{_chromosome} = $param{'-chromosome'}; |
|
258
|
0
|
|
|
|
|
0
|
my $chrom = $self->{_chromosome}; |
|
259
|
0
|
|
|
|
|
0
|
my $file = ftp_get($path."/"."nextprot_"."chromosome_".$chrom.".txt"); |
|
260
|
0
|
|
|
|
|
0
|
my @data = split /^/m, $file; |
|
261
|
|
|
|
|
|
|
|
|
262
|
0
|
|
|
|
|
0
|
for my $prot (@data) { |
|
263
|
0
|
|
|
|
|
0
|
chomp $prot; |
|
264
|
|
|
|
|
|
|
|
|
265
|
0
|
0
|
|
|
|
0
|
if ($prot =~ m/^[A-Za-z|0-9\-]+\s+NX/) { |
|
266
|
|
|
|
|
|
|
|
|
267
|
0
|
|
|
|
|
0
|
$prot =~ s/\s{2,}/\t/g; |
|
268
|
0
|
|
|
|
|
0
|
my @temp = split(/\t/, $prot); |
|
269
|
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
#if (exists $table{$temp[1]}) { |
|
271
|
|
|
|
|
|
|
# print "redundancy detected: $temp[1]\n"; |
|
272
|
|
|
|
|
|
|
#} |
|
273
|
|
|
|
|
|
|
|
|
274
|
0
|
|
|
|
|
0
|
$table{$temp[1]} = { |
|
275
|
|
|
|
|
|
|
gene_name => $temp[0], |
|
276
|
|
|
|
|
|
|
position => $temp[2], |
|
277
|
|
|
|
|
|
|
start_position => $temp[3], |
|
278
|
|
|
|
|
|
|
stop_position => $temp[4], |
|
279
|
|
|
|
|
|
|
existence => $temp[5], |
|
280
|
|
|
|
|
|
|
proteomics => $temp[6], |
|
281
|
|
|
|
|
|
|
antibody => $temp[7], |
|
282
|
|
|
|
|
|
|
has_3d => $temp[8], |
|
283
|
|
|
|
|
|
|
disease => $temp[9], |
|
284
|
|
|
|
|
|
|
isoforms => $temp[10], |
|
285
|
|
|
|
|
|
|
variants => $temp[11], |
|
286
|
|
|
|
|
|
|
ptms => $temp[12], |
|
287
|
|
|
|
|
|
|
description => $temp[13], |
|
288
|
|
|
|
|
|
|
} |
|
289
|
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
} |
|
291
|
|
|
|
|
|
|
} |
|
292
|
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
} |
|
294
|
|
|
|
|
|
|
|
|
295
|
0
|
|
|
|
|
0
|
&reset_params(); |
|
296
|
|
|
|
|
|
|
|
|
297
|
0
|
|
|
|
|
0
|
return %table; |
|
298
|
|
|
|
|
|
|
} |
|
299
|
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
sub mapping { |
|
301
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
302
|
0
|
|
|
|
|
0
|
my $target = shift; |
|
303
|
|
|
|
|
|
|
|
|
304
|
0
|
|
|
|
|
0
|
my $path = 'ftp://ftp.nextprot.org/pub/current_release/mapping/nextprot_'; |
|
305
|
0
|
|
|
|
|
0
|
my $file = ftp_get($path.$target.".txt"); |
|
306
|
0
|
|
|
|
|
0
|
my @data = split(/\n/, $file); |
|
307
|
|
|
|
|
|
|
|
|
308
|
0
|
|
|
|
|
0
|
my %map; |
|
309
|
|
|
|
|
|
|
|
|
310
|
0
|
|
|
|
|
0
|
for my $pair ( @data ) { |
|
311
|
|
|
|
|
|
|
|
|
312
|
0
|
|
|
|
|
0
|
chomp $pair; |
|
313
|
0
|
|
|
|
|
0
|
my ($key, $value) = split(/\t/, $pair); |
|
314
|
0
|
|
|
|
|
0
|
$map{$key} = $value; |
|
315
|
|
|
|
|
|
|
} |
|
316
|
|
|
|
|
|
|
|
|
317
|
0
|
|
|
|
|
0
|
return %map; |
|
318
|
|
|
|
|
|
|
} |
|
319
|
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
sub reset_params() { |
|
321
|
5
|
|
|
5
|
0
|
13
|
my $self = shift; |
|
322
|
|
|
|
|
|
|
|
|
323
|
5
|
|
|
|
|
16
|
$self->{_query} = undef; |
|
324
|
5
|
|
|
|
|
16
|
$self->{_filter} = undef; |
|
325
|
|
|
|
|
|
|
} |
|
326
|
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
1; |