From 192eeca932652191fbadcfbb8e703a745b470383 Mon Sep 17 00:00:00 2001 From: juguang <juguang@sanger.ac.uk> Date: Thu, 27 Mar 2003 09:54:44 +0000 Subject: [PATCH] test for gene object conversion, and pitch --- modules/Bio/EnsEMBL/Utils/Converter/bio_ens.pm | 2 +- .../Utils/Converter/bio_ens_predictionExon.pm | 2 +- modules/t/converter.t | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens.pm index fa863c2d55..4433302fbd 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens.pm @@ -136,7 +136,7 @@ sub _guess_module { $tail = 'bio_ens_predictionGene'; }elsif($in eq 'Bio::Tools::Prediction::Exon'){ $tail = 'bio_ens_predictionExon'; - }elsif($in eq 'Bio::SeqFeature::Gene::GeneStructur'){ + }elsif($in eq 'Bio::SeqFeature::Gene::GeneStructure'){ $tail = 'bio_ens_gene'; }elsif($in eq 'Bio::SeqFeature::Gene::Transcript'){ $tail = 'bio_ens_transcript'; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionExon.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionExon.pm index 65a15724e5..cee635b22b 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionExon.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionExon.pm @@ -62,7 +62,7 @@ sub _convert_single { $self->throw("a Bio::Tools::Prediction::Exon object needed") unless($input->isa("Bio::Tools::Prediction::Exon")); - $output = Bio::EnsEMBL::Exon->new( + my $output = Bio::EnsEMBL::Exon->new( -start => $input->start, -end => $input->end, -strand => $input->strand diff --git a/modules/t/converter.t b/modules/t/converter.t index 8e1663800d..a1bc4c529f 100644 --- a/modules/t/converter.t +++ b/modules/t/converter.t @@ -52,6 +52,8 @@ use Bio::EnsEMBL::Utils::Converter; &test_SeqFeature; &test_FeaturePair; &test_hit; +&test_predictionTranscript; +&test_gene; # Test for SeqFeature, 10 OKs sub test_SeqFeature{ @@ -182,3 +184,18 @@ sub test_hit { } +sub test_predictionTranscript{ + my $converter = new Bio::EnsEMBL::Utils::Converter( + -in => 'Bio::Tools::Prediction::Gene', + -out => 'Bio::EnsEMBL::PreditionTranscript' + ); + ok 1; +} + +sub test_gene{ + my $converter = new Bio::EnsEMBL::Utils::Converter( + -in => 'Bio::SeqFeature::Gene::GeneStructure', + -out => 'Bio::EnsEMBL::Gene' + ); + ok 1; +} -- GitLab