line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::Das::Request::Sequences; |
2
|
|
|
|
|
|
|
# $Id: Sequences.pm,v 1.2 2005/08/24 16:04:47 lstein Exp $ |
3
|
|
|
|
|
|
|
# this module issues and parses the types command, with arguments -dsn, -segment, -categories, -enumerate |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Bio::Das::Request::Sequences - The DAS "sequence" request |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my @sequences = $request->results; |
12
|
|
|
|
|
|
|
my $sequences = $request->results; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $dsn = $request->dsn; |
15
|
|
|
|
|
|
|
my $das_command = $request->command; |
16
|
|
|
|
|
|
|
my $successful = $request->is_success; |
17
|
|
|
|
|
|
|
my $error_msg = $request->error; |
18
|
|
|
|
|
|
|
my ($username,$password) = $request->auth; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
This is a subclass of L<Bio::Das::Request::Dnas> specialized for |
23
|
|
|
|
|
|
|
the "sequence" command. It is used to retrieve the sequence |
24
|
|
|
|
|
|
|
corresponding to a set of segments on a set of DAS servers. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=over 4 |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=cut |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
34
|
|
31
|
1
|
|
|
1
|
|
510
|
use Bio::Das::Segment; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
38
|
|
32
|
1
|
|
|
1
|
|
663
|
use Bio::Das::Request::Dnas; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
33
|
1
|
|
|
1
|
|
6
|
use Bio::Das::Util 'rearrange'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
43
|
|
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
1
|
|
4
|
use vars '@ISA'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
240
|
|
36
|
|
|
|
|
|
|
@ISA = 'Bio::Das::Request::Dnas'; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
1
|
|
sub command { 'sequence' } |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub t_DASSEQUENCE { |
41
|
0
|
|
|
0
|
0
|
|
my ($self, $attrs) = @_; |
42
|
0
|
0
|
|
|
|
|
if ($attrs) { |
43
|
0
|
|
|
|
|
|
$self->clear_results; |
44
|
0
|
|
|
|
|
|
$self->{tmp}{current_segment} = |
45
|
|
|
|
|
|
|
Bio::Das::Segment->new( |
46
|
|
|
|
|
|
|
$attrs->{id}, |
47
|
|
|
|
|
|
|
$attrs->{start}, |
48
|
|
|
|
|
|
|
$attrs->{stop}, |
49
|
|
|
|
|
|
|
$attrs->{version} |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
} else { |
52
|
0
|
|
|
|
|
|
$self->{tmp}{current_sequence} =~ s/\s//g; |
53
|
0
|
|
|
|
|
|
$self->add_object( |
54
|
|
|
|
|
|
|
$self->{tmp}{current_segment}, |
55
|
|
|
|
|
|
|
$self->{tmp}{current_sequence} |
56
|
|
|
|
|
|
|
); |
57
|
0
|
|
|
|
|
|
delete $self->{tmp}; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub t_SEQUENCE { |
62
|
0
|
|
|
0
|
0
|
|
my ($self, $attrs) = @_; |
63
|
|
|
|
|
|
|
|
64
|
0
|
0
|
|
|
|
|
if ($attrs) { # start of tag |
65
|
0
|
|
|
|
|
|
$self->{tmp}{current_sequence} = ''; |
66
|
|
|
|
|
|
|
} else { |
67
|
0
|
|
|
|
|
|
my $sequence = $self->char_data; |
68
|
0
|
|
|
|
|
|
$self->{tmp}{current_sequence} .= $sequence; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Lincoln Stein <lstein@cshl.org> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Contributions from: Andreas Kahari <andreas.kahari@ebi.ac.uk> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Copyright (c) 2001 Cold Spring Harbor Laboratory |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
81
|
|
|
|
|
|
|
it under the same terms as Perl itself. See DISCLAIMER.txt for |
82
|
|
|
|
|
|
|
disclaimers of warranty. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 SEE ALSO |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L<Bio::Das::Request::Dnas>, L<Bio::Das::Request>, |
87
|
|
|
|
|
|
|
L<Bio::Das::Segment>, L<Bio::Das::HTTP::Fetch> |
88
|
|
|
|
|
|
|
L<Bio::Das::Source>, L<Bio::Das::Type>, L<Bio::Das::Stylesheet> |
89
|
|
|
|
|
|
|
L<Bio::Das::RangeI> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
1; |