EnsEMBL/Utils/Converter/bio_ens_predictionExon.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 41 CC 2 SCAR 11.5
CC
2
Cov
0%
_convert_single
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.1
1 =head1 LICENSE
2  
3 See the NOTICE file distributed with this work for additional information
4 regarding copyright ownership.
5  
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9  
10 http://www.apache.org/licenses/LICENSE-2.0
11  
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17  
18 =cut
19  
20  
21 =head1 CONTACT
22  
23 Please email comments or questions to the public Ensembl
24 developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.
25  
26 Questions may also be sent to the Ensembl help desk at
27 <http://www.ensembl.org/Help/Contact>.
28  
29 =head1 AUTHOR
30  
31 Juguang Xiao <juguang@tll.org.sg>
32  
33 =cut
34  
35 =head1 NAME
36  
37 Bio::EnsEMBL::Utils::Converter::bio_ens_predictionExon
38  
39 =head1 SYNOPISIS
40  
41 my $converter = new Bio::EnsEMBL::Utils::Converter(
42 -in => 'Bio::Tools::Prediction::Exon',
43 -out => 'Bio::EnsEMBL::Exon',
44 -contig => $ens_contig
45 );
46  
47 =head1 DESCRIPTION
48  
49 =head1 METHODS
50  
51 =cut
52  
53 package Bio::EnsEMBL::Utils::Converter::bio_ens_predictionExon;
54 $Bio::EnsEMBL::Utils::Converter::bio_ens_predictionExon::VERSION = '114.0.0';
55 use strict;
56 use vars qw(@ISA);
57 use Bio::EnsEMBL::Utils::Converter;
58 use Bio::EnsEMBL::Exon;
59 use Bio::EnsEMBL::Utils::Converter::bio_ens;
60 @ISA = qw(Bio::EnsEMBL::Utils::Converter::bio_ens);
61  
62 sub _convert_single {
63 my ($self, $input) = @_;
64
65  
66 $input || $self->throw("a input object needed");
67 $self->throw("a Bio::Tools::Prediction::Exon object needed")
68 unless($input->isa("Bio::Tools::Prediction::Exon"));
69  
70 my $output = Bio::EnsEMBL::Exon->new(
71 -start => $input->start,
72 -end => $input->end,
73 -strand => $input->strand
74 );
75  
76 $output->score($input->score);
77 $output->p_value($input->significance);
78  
79 $output->phase($input->get_tag_values("phase")); # only first element is used
80 $output->end_phase($input->get_tag_values("end_phase"));
81  
82 $output->contig($self->contig);
83  
84 return $output;
85 }
86  
87  
88 1;