diff --git a/modules/t/MultiTestDB.conf b/modules/t/MultiTestDB.conf index f919e7ce44d62a87777773e29285385b5d18b9e8..8220a96514b4513636e3728ab11d4ea2c3b15560 100644 --- a/modules/t/MultiTestDB.conf +++ b/modules/t/MultiTestDB.conf @@ -1,9 +1,9 @@ { 'port' => 3306, 'driver' => 'mysql', - 'user' => 'ensadmin', - 'pass' => 'ensembl', - 'host' => 'ecs1c', + 'user' => 'root', + 'pass' => '', + 'host' => 'localhost', 'zip' => 'test_genome.zip', #add a line with the dbname and module diff --git a/modules/t/clone.t b/modules/t/clone.t index fbb1ec44058df286c9288d279c1d63a58c973ad1..9e9c50866de0149647ef06e24f1cd12173e6886c 100644 --- a/modules/t/clone.t +++ b/modules/t/clone.t @@ -13,14 +13,14 @@ ok(1); # Database will be dropped when this # object goes out of scope -my $ens_test = MultiTestDB->new; +my $multi = MultiTestDB->new; -ok($ens_test); +ok($multi); # # get a core DBAdaptor # -my $dba = $ens_test->get_DBAdaptor("core"); +my $dba = $multi->get_DBAdaptor("core"); ok($dba); @@ -31,6 +31,7 @@ ok($clone); # # load the clone with some data # + $clone->id('dummy_clone'); $clone->dbID(24); $clone->embl_id('dummy_clone'); @@ -118,8 +119,8 @@ ok(scalar(@$genes) == 5); # to test the delete method we need to save the tables that we delete from # -$ens_test->save("core","contig","clone","dna","repeat_feature","simple_feature", - "prediction_transcript","protein_align_feature","dna_align_feature"); +$multi->save("core","contig","clone","dna","repeat_feature","simple_feature", + "prediction_transcript","protein_align_feature","dna_align_feature"); # # do the deletion @@ -192,8 +193,8 @@ ok(scalar($sth->rows) == 11); # restore the tables for the next test -$ens_test->restore("core","contig","clone","dna","repeat_feature","simple_feature", - "prediction_transcript","protein_align_feature","dna_align_feature"); +$multi->restore("core","contig","clone","dna","repeat_feature","simple_feature", + "prediction_transcript","protein_align_feature","dna_align_feature"); # diff --git a/modules/t/exon.t b/modules/t/exon.t index b5eec533223cbea2ba617e27887952b91d554c55..03b4ea930a636a92c5ec050b3dad16164272f66b 100644 --- a/modules/t/exon.t +++ b/modules/t/exon.t @@ -3,7 +3,7 @@ use strict; BEGIN { $| = 1; use Test ; - plan tests => 10; + plan tests => 9; } my $loaded = 0; diff --git a/modules/t/predictionTranscript.t b/modules/t/predictionTranscript.t index 15ad237d171196e4a582eb97c7794d1f13cc66c2..7d3b0b5451e18d9f4603bfbaa544fa8d2b2bcc77 100644 --- a/modules/t/predictionTranscript.t +++ b/modules/t/predictionTranscript.t @@ -2,7 +2,7 @@ use lib 't'; BEGIN { $| = 1; use Test; - plan tests => 16; + plan tests => 4; } my $loaded = 0; @@ -12,6 +12,7 @@ use MultiTestDB; use Bio::EnsEMBL::DBSQL::SliceAdaptor; $loaded = 1; +my $verbose = 0; ok(1); @@ -28,28 +29,35 @@ my $slice = $sa->fetch_by_chr_start_end("20", 30_252_000, 31_252_001 ); my $p_transs = $slice->get_all_PredictionTranscripts(); -# print STDERR "Number of Transcripts: ", +debug( "Have ".scalar( @$p_transs )." prediction transcripts." ); -ok( scalar( @$p_transs ) == 25 ); - - - -print STDERR "Exon count ", scalar( @{$exons} ),"\n"; +ok( scalar( @$p_transs ) == 27 ); for my $t ( @{$p_transs} ) { + debug( "Transcript start ".$t->start()." end ". $t->end ); + debug( "Translation ".$t->translate()->seq() ); + my $exons = $t->get_all_Exons(); - for my $e ( @{$exons} ) { - if( ! defined $e ) { - print "Undefined exon\n"; - next; - } - print " Exons start ", $e->start(), " end ", $e->end(), " strand ", $e->strand(),"\n"; + for my $e ( @{$exons} ) { + if( ! defined $e ) { + debug( "Undefined exon " ); + next; + } + debug( " Exons start ".$e->start()." end ". + $e->end()." strand ".$e->strand()); } - print "start ",$t->start(), " end ", $t->end,"\n"; - print STDERR "Translation ",$t->translate()->seq(),"\n"; } +debug( "All ".scalar( @$p_transs )." prediction transcripts exercised" ); + +ok(1); -ok(1); + +sub debug { + my $txt = shift; + if( $verbose ) { + print STDERR $txt,"\n"; + } +} diff --git a/modules/t/repeatFeature.t b/modules/t/repeatFeature.t index 1fb01c027feccd5e935f507af6650006c60d8466..fdbbaf5f3a4415cd7736572786621a868ab5924b 100644 --- a/modules/t/repeatFeature.t +++ b/modules/t/repeatFeature.t @@ -2,7 +2,7 @@ use lib 't'; BEGIN { $| = 1; use Test; - plan tests => 11; + plan tests => 10; } my $loaded = 0; @@ -21,7 +21,8 @@ ok(1); my $db = $multi->get_DBAdaptor( 'core' ); $cadp = $db->get_RawContigAdaptor(); -$contig = $cadp->fetch_by_dbID(1); + +$contig = $cadp->fetch_by_dbID(319456); my $analysis = $db->get_AnalysisAdaptor->fetch_by_logic_name("RepeatMask"); diff --git a/modules/t/slice.t b/modules/t/slice.t index 0789a0f4bd7b014ac12c77b8b56056cdf2f0134a..21429fdb974eb573cfe69c9d2e3c50fe1af2e9a6 100644 --- a/modules/t/slice.t +++ b/modules/t/slice.t @@ -261,11 +261,12 @@ $softmasked_seq = $seq = undef; # # 45 Test Slice::get_all_MapFrags # -ok(scalar @{$slice->get_all_MapFrags('cloneset')}); +# ok(scalar @{$slice->get_all_MapFrags('cloneset')}); # # 46 Test Slice::get_tiling_path # + ok(scalar @{$slice->get_tiling_path});