0
|
1 # $Id: Gene.pm,v 1.8 2002/10/22 07:38:48 lapp Exp $
|
|
2 #
|
|
3 # BioPerl module for Bio::Tools::Prediction::Gene
|
|
4 #
|
|
5 # Cared for by Hilmar Lapp <hlapp@gmx.net>
|
|
6 #
|
|
7 # Copyright Hilmar Lapp
|
|
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::Tools::Prediction::Gene - a predicted gene structure feature
|
|
16
|
|
17 =head1 SYNOPSIS
|
|
18
|
|
19 See documentation of methods.
|
|
20
|
|
21 =head1 DESCRIPTION
|
|
22
|
|
23 A feature representing a predicted gene structure. This class actually
|
|
24 inherits off Bio::SeqFeature::Gene::Transcript and therefore has all that
|
|
25 functionality, plus a few methods supporting predicted sequence features,
|
|
26 like a predicted CDS and a predicted translation.
|
|
27
|
|
28 Exons held by an instance of this class will usually be instances of
|
|
29 Bio::Tools::Prediction::Exon, although they do not have to be. Refer to the
|
|
30 documentation of the class that produced the instance.
|
|
31
|
|
32 Normally, you will not want to create an instance of this class yourself.
|
|
33 Instead, classes representing the results of gene structure prediction
|
|
34 programs will do that.
|
|
35
|
|
36 =head1 FEEDBACK
|
|
37
|
|
38 =head2 Mailing Lists
|
|
39
|
|
40 User feedback is an integral part of the evolution of this and other
|
|
41 Bioperl modules. Send your comments and suggestions preferably to one
|
|
42 of the Bioperl mailing lists. Your participation is much appreciated.
|
|
43
|
|
44 bioperl-l@bioperl.org - General discussion
|
|
45 http://bio.perl.org/MailList.html - About the mailing lists
|
|
46
|
|
47 =head2 Reporting Bugs
|
|
48
|
|
49 Report bugs to the Bioperl bug tracking system to help us keep track
|
|
50 the bugs and their resolution. Bug reports can be submitted via email
|
|
51 or the web:
|
|
52
|
|
53 bioperl-bugs@bio.perl.org
|
|
54 http://bugzilla.bioperl.org/
|
|
55
|
|
56 =head1 AUTHOR - Hilmar Lapp
|
|
57
|
|
58 Email hlapp@gmx.net or hilmar.lapp@pharma.novartis.com
|
|
59
|
|
60 Describe contact details here
|
|
61
|
|
62 =head1 APPENDIX
|
|
63
|
|
64 The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
|
|
65
|
|
66 =cut
|
|
67
|
|
68
|
|
69 # Let the code begin...
|
|
70
|
|
71
|
|
72 package Bio::Tools::Prediction::Gene;
|
|
73 use vars qw(@ISA);
|
|
74 use strict;
|
|
75
|
|
76 use Bio::SeqFeature::Gene::Transcript;
|
|
77
|
|
78
|
|
79 @ISA = qw(Bio::SeqFeature::Gene::Transcript);
|
|
80
|
|
81 sub new {
|
|
82 my($class,@args) = @_;
|
|
83
|
|
84 my $self = $class->SUPER::new(@args);
|
|
85
|
|
86 my ($primary) = $self->_rearrange([qw(PRIMARY)],@args);
|
|
87
|
|
88 $primary = 'predicted_gene' unless $primary;
|
|
89 $self->primary_tag($primary);
|
|
90 return $self;
|
|
91 }
|
|
92
|
|
93
|
|
94 =head2 predicted_cds
|
|
95
|
|
96 Title : predicted_cds
|
|
97 Usage : $predicted_cds_dna = $gene->predicted_cds();
|
|
98 $gene->predicted_cds($predicted_cds_dna);
|
|
99 Function: Get/Set the CDS (coding sequence) as predicted by a program.
|
|
100
|
|
101 This method is independent of an attached_seq. There is no
|
|
102 guarantee whatsoever that the returned CDS has anything to do
|
|
103 (e.g., matches) with the sequence covered by the exons as annotated
|
|
104 through this object.
|
|
105
|
|
106 Example :
|
|
107 Returns : A Bio::PrimarySeqI implementing object holding the DNA sequence
|
|
108 defined as coding by a prediction of a program.
|
|
109 Args : On set, a Bio::PrimarySeqI implementing object holding the DNA
|
|
110 sequence defined as coding by a prediction of a program.
|
|
111
|
|
112 =cut
|
|
113
|
|
114 sub predicted_cds {
|
|
115 my ($self, $cds) = @_;
|
|
116
|
|
117 if(defined($cds)) {
|
|
118 $self->{'_predicted_cds'} = $cds;
|
|
119 }
|
|
120 return $self->{'_predicted_cds'};
|
|
121 }
|
|
122
|
|
123 =head2 predicted_protein
|
|
124
|
|
125 Title : predicted_protein
|
|
126 Usage : $predicted_protein_seq = $gene->predicted_protein();
|
|
127 $gene->predicted_protein($predicted_protein_seq);
|
|
128 Function: Get/Set the protein translation as predicted by a program.
|
|
129
|
|
130 This method is independent of an attached_seq. There is no
|
|
131 guarantee whatsoever that the returned translation has anything to
|
|
132 do with the sequence covered by the exons as annotated
|
|
133 through this object, or the sequence returned by predicted_cds(),
|
|
134 although it should usually be just the standard translation.
|
|
135
|
|
136 Example :
|
|
137 Returns : A Bio::PrimarySeqI implementing object holding the protein
|
|
138 translation as predicted by a program.
|
|
139 Args : On set, a Bio::PrimarySeqI implementing object holding the protein
|
|
140 translation as predicted by a program.
|
|
141
|
|
142 =cut
|
|
143
|
|
144 sub predicted_protein {
|
|
145 my ($self, $aa) = @_;
|
|
146
|
|
147 if(defined($aa)) {
|
|
148 $self->{'_predicted_aa'} = $aa;
|
|
149 }
|
|
150 return $self->{'_predicted_aa'};
|
|
151 }
|
|
152
|
|
153 #
|
|
154 # Everything else is just inherited from SeqFeature::GeneStructure.
|
|
155 #
|
|
156
|
|
157 1;
|