File Coverage

Bio/DB/GFF/Homol.pm
Criterion Covered Total %
statement 8 18 44.4
branch 0 2 0.0
condition n/a
subroutine 4 6 66.6
pod 3 4 75.0
total 15 30 50.0


line stmt bran cond sub pod time code
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.
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-Etarget() method.
18              
19             =head1 METHODS
20              
21             =cut
22              
23             package Bio::DB::GFF::Homol;
24 3     3   15 use strict;
  3         6  
  3         75  
25              
26 3     3   12 use base qw(Bio::DB::GFF::Segment);
  3         3  
  3         807  
27              
28             =head2 name
29              
30             Title : name
31             Usage : $name = $homol->name
32             Function: get the ID of the homology object
33             Returns : a string
34             Args : none
35             Status : Public
36              
37             =cut
38              
39 725     725 1 903 sub name { shift->refseq }
40              
41             =head2 asString
42              
43             Title : asString
44             Usage : $name = $homol->asString
45             Function: same as name(), for operator overloading
46             Returns : a string
47             Args : none
48             Status : Public
49              
50             =cut
51              
52 725     725 1 931 sub asString { shift->name }
53              
54              
55             =head2 id
56              
57             Title : id
58             Usage : $id = $homol->id
59             Function: get database ID in class:id format
60             Returns : a string
61             Args : none
62             Status : Public
63              
64             =cut
65              
66             sub id {
67 0     0 1   my $self = shift;
68 0           return "$self->{class}:$self->{name}";
69             }
70              
71             sub new_from_segment {
72 0     0 0   my $package = shift;
73 0 0         $package = ref $package if ref $package;
74 0           my $segment = shift;
75 0           my $new = {};
76 0           @{$new}{qw(factory sourceseq start stop strand class ref refstart refstrand)}
77 0           = @{$segment}{qw(factory sourceseq start stop strand class ref refstart refstrand)};
  0            
78 0           return bless $new,__PACKAGE__;
79             }
80              
81             =head1 BUGS
82              
83             This module is still under development.
84              
85             =head1 SEE ALSO
86              
87             L, L, L
88              
89             =head1 AUTHOR
90              
91             Lincoln Stein Elstein@cshl.orgE.
92              
93             Copyright (c) 2001 Cold Spring Harbor Laboratory.
94              
95             This library is free software; you can redistribute it and/or modify
96             it under the same terms as Perl itself.
97              
98             =cut
99              
100             1;