line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# BioPerl module for Bio::Tools::Tmhmm |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Original copyright Balamurugan Kumarasamy |
5
|
|
|
|
|
|
|
# Re-written cleanly by Torsten Seemann, Sep 2006 |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# Copyright: |
8
|
|
|
|
|
|
|
# You may distribute this module under the same terms as Perl itself |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Bio::Tools::Tmhmm - parse TMHMM output (TransMembrane HMM) |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use Bio::Tools::Tmhmm; |
17
|
|
|
|
|
|
|
my $parser = Bio::Tools::Tmhmm->new(-fh => $filehandle ); |
18
|
|
|
|
|
|
|
while ( my $tmhmm_feat = $parser->next_result ) { |
19
|
|
|
|
|
|
|
# do something, e.g. |
20
|
|
|
|
|
|
|
push @tmhmm_feat, $tmhmm_feat; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
TMHMM is software for the prediction of transmembrane helices in proteins. |
26
|
|
|
|
|
|
|
See L for more details. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
This module parses the "long output" format of TMHMM 2.0 and |
29
|
|
|
|
|
|
|
creates a Bio:SeqFeature::Generic object for each C feature found |
30
|
|
|
|
|
|
|
from lines like this: |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my_sequence_id TMHMM2.0 TMhelix 54 76 |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 FEEDBACK |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 Mailing Lists |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
User feedback is an integral part of the evolution of this and other |
40
|
|
|
|
|
|
|
Bioperl modules. Send your comments and suggestions preferably to |
41
|
|
|
|
|
|
|
the Bioperl mailing list. Your participation is much appreciated. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
bioperl-l@bioperl.org - General discussion |
44
|
|
|
|
|
|
|
http://bioperl.org/wiki/Mailing_lists - About the mailing lists |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 Support |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Please direct usage questions or support issues to the mailing list: |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
I |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
rather than to the module maintainer directly. Many experienced and |
53
|
|
|
|
|
|
|
reponsive experts will be able look at the problem and quickly |
54
|
|
|
|
|
|
|
address it. Please include a thorough description of the problem |
55
|
|
|
|
|
|
|
with code and data examples if at all possible. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 Reporting Bugs |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Report bugs to the Bioperl bug tracking system to help us keep track |
60
|
|
|
|
|
|
|
of the bugs and their resolution. Bug reports can be submitted via the |
61
|
|
|
|
|
|
|
web: |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
https://github.com/bioperl/bioperl-live/issues |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 AUTHOR - Torsten Seemann |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Email torsten.seemann AT infotech.monash.edu.au |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 CONTRIBUTOR - Bala |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Email savikalpa@fugu-sg.org |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 APPENDIX |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
The rest of the documentation details each of the object methods. |
76
|
|
|
|
|
|
|
Internal methods are usually preceded with a _ |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
package Bio::Tools::Tmhmm; |
81
|
|
|
|
|
|
|
|
82
|
1
|
|
|
1
|
|
433
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
83
|
|
|
|
|
|
|
|
84
|
1
|
|
|
1
|
|
279
|
use Bio::Tools::AnalysisResult; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
85
|
1
|
|
|
1
|
|
4
|
use Bio::Root::Root; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
86
|
1
|
|
|
1
|
|
3
|
use Bio::Root::IO; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
87
|
|
|
|
|
|
|
|
88
|
1
|
|
|
1
|
|
5
|
use base qw(Bio::Root::Root Bio::Root::IO Bio::Tools::AnalysisResult); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
84
|
|
89
|
|
|
|
|
|
|
|
90
|
1
|
|
|
1
|
|
342
|
use Bio::SeqFeature::Generic; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
130
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 new |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Title : new |
96
|
|
|
|
|
|
|
Usage : my $obj = Bio::Tools::Tmhmm->new(); |
97
|
|
|
|
|
|
|
Function: Builds a new Bio::Tools::Tmhmm object |
98
|
|
|
|
|
|
|
Returns : Bio::Tools::Tmhmm |
99
|
|
|
|
|
|
|
Args : Either of the following as per L interface |
100
|
|
|
|
|
|
|
-fh => $filehandle |
101
|
|
|
|
|
|
|
-file => $filename |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
sub new { |
106
|
1
|
|
|
1
|
1
|
13
|
my($class,@args) = @_; |
107
|
1
|
|
|
|
|
11
|
my $self = $class->SUPER::new(@args); |
108
|
1
|
|
|
|
|
9
|
$self->_initialize_io(@args); |
109
|
1
|
|
|
|
|
6
|
return $self; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 next_result |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Title : next_result |
116
|
|
|
|
|
|
|
Usage : my $feat = $Tmhmm->next_result |
117
|
|
|
|
|
|
|
Function: Get the next result set from parser data |
118
|
|
|
|
|
|
|
Returns : Bio::SeqFeature::Generic |
119
|
|
|
|
|
|
|
Args : none |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub next_result { |
124
|
4
|
|
|
4
|
1
|
14
|
my $self = shift; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
# # my_sequence_id Length: 178 |
127
|
|
|
|
|
|
|
# my_sequence_id TMHMM2.0 outside 1 53 |
128
|
|
|
|
|
|
|
# my_sequence_id TMHMM2.0 TMhelix 54 76 |
129
|
|
|
|
|
|
|
# my_sequence_id TMHMM2.0 inside 77 115 |
130
|
|
|
|
|
|
|
|
131
|
4
|
|
|
|
|
14
|
while (my $line = $self->_readline) { |
132
|
12
|
100
|
|
|
|
54
|
if ( $line =~ m/^(\S+)\s+(\S+)\s+(TMhelix)\s+(\d+)\s+(\d+)$/i ) { |
133
|
3
|
|
|
|
|
20
|
return Bio::SeqFeature::Generic->new( |
134
|
|
|
|
|
|
|
-primary => 'transmembrane', |
135
|
|
|
|
|
|
|
-seq_id => $1, |
136
|
|
|
|
|
|
|
-source => $2, |
137
|
|
|
|
|
|
|
-start => $4, |
138
|
|
|
|
|
|
|
-end => $5, |
139
|
|
|
|
|
|
|
); |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
1; |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|