0
|
1 =head1 NAME
|
|
2
|
|
3 Bio::DB::GFF::Homol -- A segment of DNA that is homologous to another
|
|
4
|
|
5 =head1 SYNOPSIS
|
|
6
|
|
7 See L<Bio::DB::GFF>.
|
|
8
|
|
9 =head1 DESCRIPTION
|
|
10
|
|
11 Bio::DB::GFF::Homol is a named subtype of Bio::DB::GFF::Segment. It
|
|
12 inherits all the methods of its parent, and was created primarily to
|
|
13 allow for isa() queries and for compatibility with
|
|
14 Ace::Sequence::Homol.
|
|
15
|
|
16 A Homol object is typically returned as the method result of the
|
|
17 Bio::DB::GFF::Feature-E<gt>target() method.
|
|
18
|
|
19 =head1 METHODS
|
|
20
|
|
21 =cut
|
|
22
|
|
23 package Bio::DB::GFF::Homol;
|
|
24 use strict;
|
|
25
|
|
26 use Bio::DB::GFF::Segment;
|
|
27 use vars qw(@ISA);
|
|
28 @ISA = 'Bio::DB::GFF::Segment';
|
|
29
|
|
30 =head2 name
|
|
31
|
|
32 Title : name
|
|
33 Usage : $name = $homol->name
|
|
34 Function: get the ID of the homology object
|
|
35 Returns : a string
|
|
36 Args : none
|
|
37 Status : Public
|
|
38
|
|
39 =cut
|
|
40
|
|
41 sub name { shift->refseq }
|
|
42
|
|
43 =head2 asString
|
|
44
|
|
45 Title : asString
|
|
46 Usage : $name = $homol->asString
|
|
47 Function: same as name(), for operator overloading
|
|
48 Returns : a string
|
|
49 Args : none
|
|
50 Status : Public
|
|
51
|
|
52 =cut
|
|
53
|
|
54 sub asString { shift->name }
|
|
55
|
|
56
|
|
57 =head2 id
|
|
58
|
|
59 Title : id
|
|
60 Usage : $id = $homol->id
|
|
61 Function: get database ID in class:id format
|
|
62 Returns : a string
|
|
63 Args : none
|
|
64 Status : Public
|
|
65
|
|
66 =cut
|
|
67
|
|
68 sub id {
|
|
69 my $self = shift;
|
|
70 return "$self->{class}:$self->{name}";
|
|
71 }
|
|
72
|
|
73 sub new_from_segment {
|
|
74 my $package = shift;
|
|
75 $package = ref $package if ref $package;
|
|
76 my $segment = shift;
|
|
77 my $new = {};
|
|
78 @{$new}{qw(factory sourceseq start stop strand class ref refstart refstrand)}
|
|
79 = @{$segment}{qw(factory sourceseq start stop strand class ref refstart refstrand)};
|
|
80 return bless $new,__PACKAGE__;
|
|
81 }
|
|
82
|
|
83 =head1 BUGS
|
|
84
|
|
85 This module is still under development.
|
|
86
|
|
87 =head1 SEE ALSO
|
|
88
|
|
89 L<bioperl>, L<Bio::DB::GFF>, L<Bio::DB::RelSegment>
|
|
90
|
|
91 =head1 AUTHOR
|
|
92
|
|
93 Lincoln Stein E<lt>lstein@cshl.orgE<gt>.
|
|
94
|
|
95 Copyright (c) 2001 Cold Spring Harbor Laboratory.
|
|
96
|
|
97 This library is free software; you can redistribute it and/or modify
|
|
98 it under the same terms as Perl itself.
|
|
99
|
|
100 =cut
|
|
101
|
|
102 1;
|