Skip to content
Snippets Groups Projects
Commit 30c90c5f authored by Arne Stabenau's avatar Arne Stabenau
Browse files

clean up, not enough test yet

parent 1fe9d658
No related branches found
No related tags found
No related merge requests found
......@@ -8,30 +8,25 @@ BEGIN { $| = 1;
my $loaded = 0;
END {print "not ok 1\n" unless $loaded;}
use EnsTestDB;
use Bio::EnsEMBL::DBLoader;
my $verbose = 0;
use MultiTestDB;
my $multi = MultiTestDB->new();
$loaded = 1;
ok(1);
# Database will be dropped when this
# object goes out of scope
my $ens_test = EnsTestDB->new;
my $db = $multi->get_DBAdaptor( 'core' );
$ens_test->do_sql_file("t/minidatabase.dump");
ok($ens_test);
$cadp = $db->get_RawContigAdaptor();
$contig = $cadp->fetch_by_dbID(1);
my $analysis = $db->get_AnalysisAdaptor->fetch_by_logic_name("RepeatMask");
debug( "ANALYSIS ".$analysis );
my $db = $ens_test->get_DBSQL_Obj;
$cadp = $db->get_RawContigAdaptor();
$contig = $cadp->fetch_by_dbID(1);
my $analysis = $db->get_AnalysisAdaptor->fetch_by_logic_name("dummy-repeatmask");
print STDERR "ANALYSIS ".$analysis."\n";
ok($analysis);
ok($contig);
......@@ -39,7 +34,7 @@ $repeat_f_ad = $db->get_RepeatFeatureAdaptor();
$repeat_c_ad = $db->get_RepeatConsensusAdaptor();
print STDERR "DBID ".$analysis->dbID."\n";
debug( "Analysis dbID ".$analysis->dbID );
my $repeat_consensus = Bio::EnsEMBL::RepeatConsensus->new();
......@@ -56,7 +51,6 @@ ok(1);
my $repeat_feature = Bio::EnsEMBL::RepeatFeature->new();
$repeat_feature->contig_id($contig->dbID);
$repeat_feature->start(26);
$repeat_feature->end(65);
$repeat_feature->strand(1);
......@@ -65,20 +59,29 @@ $repeat_feature->hend(45);
$repeat_feature->score(100);
$repeat_feature->analysis($analysis);
$repeat_feature->repeat_consensus($repeat_consensus);
$repeat_feature->contig( $contig );
ok($repeat_feature);
$multi->hide( "core", "repeat_feature" );
$repeat_f_ad->store( $repeat_feature );
$repeat_f_ad->store($contig->dbID, $repeat_feature);
ok(1);
my @repeats = $repeat_f_ad->fetch_by_RawContig($contig);
my $repeats = $repeat_f_ad->fetch_all_by_RawContig($contig);
my $repeat = $repeats[0];
my $repeat = $repeats->[0];
ok($repeat);
ok($repeat->start == 26);
ok($repeat->hend == 45);
sub debug {
my $txt = shift;
if( $verbose ) {
print STDERR $txt,"\n";
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment