~ubuntu-branches/ubuntu/raring/bioperl/raring

« back to all changes in this revision

Viewing changes to Bio/DB/LocationI.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2008-03-18 14:44:57 UTC
  • mfrom: (4 hardy)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20080318144457-1jjoztrvqwf0gruk
* debian/control:
  - Removed MIA Matt Hope (dopey) from the Uploaders field.
    Thank you for your work, Matt. I hope you are doing well.
  - Downgraded some recommended package to the 'Suggests' priority,
    according to the following discussion on Upstream's mail list.
    http://bioperl.org/pipermail/bioperl-l/2008-March/027379.html
    (Closes: #448890)
* debian/copyright converted to machine-readable format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: LocationI.pm,v 1.1.2.2 2006/10/02 23:10:15 sendu Exp $
 
2
#
 
3
# BioPerl module for Bio::DB::LocationI
 
4
#
 
5
# Cared for by Chris Fields <cjfields at uiuc dot edu>
 
6
#
 
7
# Copyright Chris Fields
 
8
#
 
9
# You may distribute this module under the same terms as perl itself
 
10
#
 
11
# POD documentation - main docs before the code
 
12
 
 
13
=head1 NAME
 
14
 
 
15
Bio::DB::LocationI - A RandomAccessI-like abstract interface for
 
16
retrieving location data from a sequence database and returning
 
17
Bio::LocationI objects 
 
18
 
 
19
=head1 SYNOPSIS
 
20
 
 
21
  #
 
22
  # get a database object somehow using a concrete class
 
23
  #
 
24
 
 
25
  $loc = $db->get_Location_by_id('123456');
 
26
 
 
27
  #
 
28
  # $loc is a Bio::LocationI object
 
29
  #
 
30
 
 
31
=head1 DESCRIPTION
 
32
 
 
33
This is a pure interface class - in other words, all this does is define
 
34
methods which other (concrete) classes will actually implement. 
 
35
 
 
36
The Bio::DB::LocationI class defines methods used to retrieve location data
 
37
from a sequence.  This is returned in the form of Bio::LocationI objects,
 
38
which can include:
 
39
 
 
40
Bio::Location::Simple
 
41
Bio::Location::Fuzzy
 
42
Bio::Location::Split
 
43
 
 
44
At the moment it is just the ability to make Bio::LocationI objects
 
45
from a name or unique id (id), an accession number (acc), and so on.
 
46
 
 
47
=head1 CONTACT
 
48
 
 
49
Ewan Birney originally wrote Bio::DB::RandomAccessI, from which this class
 
50
is based.
 
51
 
 
52
=head2 Mailing Lists
 
53
 
 
54
User feedback is an integral part of the 
 
55
evolution of this and other Bioperl modules. Send
 
56
your comments and suggestions preferably to one
 
57
of the Bioperl mailing lists. Your participation
 
58
is much appreciated.
 
59
 
 
60
  bioperl-l@lists.open-bio.org               - General discussion
 
61
  http://www.bioperl.org/wiki/Mailing_lists  - About the mailing lists
 
62
 
 
63
=head2 Reporting Bugs
 
64
 
 
65
Report bugs to the Bioperl bug tracking system to
 
66
help us keep track the bugs and their resolution.
 
67
Bug reports can be submitted via the web.
 
68
 
 
69
  http://bugzilla.open-bio.org/
 
70
 
 
71
=head1 AUTHOR 
 
72
 
 
73
Email cjfields at uiuc dot edu
 
74
 
 
75
=head1 APPENDIX
 
76
 
 
77
The rest of the documentation details each of the
 
78
object methods. Internal methods are usually
 
79
preceded with a _
 
80
 
 
81
=cut
 
82
 
 
83
# Let the code begin...
 
84
 
 
85
package Bio::DB::LocationI;
 
86
 
 
87
use strict;
 
88
 
 
89
use Bio::Root::RootI;
 
90
 
 
91
use base qw(Bio::Root::Root);
 
92
 
 
93
=head2 get_Location_by_id
 
94
 
 
95
 Title   : get_Location_by_id
 
96
 Usage   : $loc = $db->get_Location_by_id('123456')
 
97
 Function: Gets a Bio::LocationI-implementing object by its name (id)
 
98
 Returns : a Bio::LocationI object or undef if not found
 
99
 Args    : the id (as a string) of a sequence
 
100
 
 
101
=cut
 
102
 
 
103
sub get_Location_by_id{
 
104
   my ($self,@args) = @_;
 
105
   $self->throw_not_implemented();
 
106
}
 
107
 
 
108
=head2 get_Location_by_acc
 
109
 
 
110
 Title   : get_Location_by_acc
 
111
 Usage   : $loc = $db->get_Location_by_acc('X77802');
 
112
 Function: Gets a Bio::LocationI object by accession number
 
113
 Returns : A Bio::LocationI object or undef if not found
 
114
 Args    : accession number (as a string)
 
115
 Throws  : "more than one sequences correspond to this accession"
 
116
            if the accession maps to multiple primary ids and
 
117
            method is called in a scalar context
 
118
 
 
119
=cut
 
120
 
 
121
sub get_Location_by_acc{
 
122
   my ($self,@args) = @_;
 
123
   $self->throw_not_implemented();
 
124
}
 
125
 
 
126
=head2 get_Location_by_version
 
127
 
 
128
 Title   : get_Location_by_version
 
129
 Usage   : $loc = $db->get_Location_by_version('X77802.1');
 
130
 Function: Gets a Bio::LocationI object by sequence version
 
131
 Returns : A Bio::LocationI object
 
132
 Args    : accession.version (as a string)
 
133
 Throws  : "acc.version does not exist" exception
 
134
 
 
135
=cut
 
136
 
 
137
sub get_Location_by_version{
 
138
   my ($self,@args) = @_;
 
139
   $self->throw_not_implemented();
 
140
}
 
141
 
 
142
## End of Package
 
143
 
 
144
1;