comparison pfamScan/Bio/Pfam/HMM/HMMSequence.pm @ 0:68a3648c7d91 draft default tip

Uploaded
author matteoc
date Thu, 22 Dec 2016 04:45:31 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:68a3648c7d91
1
2 package Bio::Pfam::HMM::HMMSequence;
3
4 use strict;
5 use warnings;
6
7 use Moose;
8 use Moose::Util::TypeConstraints;
9
10 extends 'Bio::Pfam::HMM::HMMMatch';
11
12
13 has sumEvalue => (
14 isa => 'evalue',
15 is => 'rw',
16 );
17
18
19 has H2mode => (
20 isa => 'Str',
21 is => 'rw'
22 );
23
24 has sumScore => (
25 isa => 'Num',
26 is => 'rw',
27 );
28
29 has desc => (
30 isa => 'Str',
31 is => 'rw',
32 required => 1
33 );
34
35 has numberHits => (
36 isa => 'Int',
37 is => 'rw',
38 required => 1
39 );
40
41
42
43 has 'exp' => (
44 isa => 'Num',
45 is => 'rw'
46 );
47
48
49 has hmmUnits => (
50 isa => "ArrayRef[ Bio::Pfam::HMM::HMMUnit ]",
51 is => 'rw',
52 default => sub { [] }
53 );
54
55
56 #-------------------------------------------------------------------------------
57 =head1 Subroutines
58
59 =head2 addHMMUnit
60
61 Title : addHMMUnit
62 Usage : $hmmseq->addHMMUnit($hmmUnit)
63 Function : Adds a hmmUnit to a sequence. It checks that the variable passed in is a Bio::Pfam::HMM::HMMUnit oject
64 Args : A Bio::Pfam::HMM::HMMUnit oject
65 Returns : Nothing
66
67 =cut
68
69 sub addHMMUnit {
70 my ( $self, $hmmUnit ) = @_;
71 if($hmmUnit->isa("Bio::Pfam::HMM::HMMUnit")){
72 push(@{$self->hmmUnits}, $hmmUnit);
73 }else{
74 warn "$hmmUnit is not a Bio::Pfam::HMM::HMMUnit, not added\n";
75 }
76 }
77
78
79 __PACKAGE__->meta->make_immutable;
80
81 =head1 COPYRIGHT
82
83 Copyright (c) 2007: Genome Research Ltd.
84
85 Authors: Rob Finn (rdf@sanger.ac.uk), John Tate (jt6@sanger.ac.uk)
86
87 This is free software; you can redistribute it and/or modify it under
88 the terms of the GNU General Public License as published by the Free Software
89 Foundation; either version 2 of the License, or (at your option) any later
90 version.
91
92 This program is distributed in the hope that it will be useful, but WITHOUT
93 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
94 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
95 details.
96
97 You should have received a copy of the GNU General Public License along with
98 this program. If not, see <http://www.gnu.org/licenses/>.
99
100 =cut
101
102 1;