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

modified tests for repeat_consensus type column

parent 04e4f6dc
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ use MultiTestDB;
BEGIN { $| = 1;
use Test;
plan tests => 22;
plan tests => 24;
}
my $multi_db = MultiTestDB->new;
......@@ -31,6 +31,7 @@ ok($rc->dbID == 9);
ok($rc->repeat_consensus eq '');
ok($rc->length() == 0);
ok($rc->repeat_class eq 'Type I Transposons/SINE');
ok( $rc->repeat_type eq "ALU" );
#
# Test fetch_by_name
......@@ -66,6 +67,7 @@ $multi_db->save('core', 'repeat_consensus');
$rc = Bio::EnsEMBL::RepeatConsensus->new
(-REPEAT_CONSENSUS => 'ACTG',
-REPEAT_TYPE => "testtype",
-NAME => 'ACTG(n)',
-LENGTH => 4,
-REPEAT_CLASS => 'Simple_repeat');
......@@ -81,7 +83,7 @@ ok($rc->repeat_consensus eq 'ACTG');
ok($rc->repeat_class eq 'Simple_repeat');
ok($rc->length() == 4);
ok($rc->name eq 'ACTG(n)');
ok($rc->repeat_type() eq "testtype" );
$multi_db->restore('core', 'repeat_consensus');
......@@ -11,7 +11,7 @@ BEGIN { $| = 1;
use MultiTestDB;
use TestUtils qw(test_getter_setter debug);
our $verbose = 0;
our $verbose = 1;
my $multi = MultiTestDB->new();
......@@ -30,6 +30,7 @@ my $repeat_c_ad = $db->get_RepeatConsensusAdaptor();
# Test storing and simple retrieval
#
$multi->hide( "core", "repeat_feature", "repeat_consensus" );
my $repeat_consensus = Bio::EnsEMBL::RepeatConsensus->new();
$repeat_consensus->length(10);
......@@ -56,7 +57,6 @@ $repeat_feature->repeat_consensus($repeat_consensus);
$repeat_feature->slice( $slice );
ok($repeat_feature);
$multi->hide( "core", "repeat_feature" );
$repeat_f_ad->store( $repeat_feature );
......@@ -85,7 +85,7 @@ ok($r->dbID == $dbID && $r->start == 26 && $r->hend == 45);
my $ids = $repeat_f_ad->list_dbIDs();
ok (@{$ids});
$multi->restore('core', 'repeat_feature');
$multi->restore('core' );
......@@ -99,8 +99,13 @@ $slice = $db->get_SliceAdaptor->fetch_by_region('chromosome',
my $feats = $repeat_f_ad->fetch_all_by_Slice($slice);
debug('fetching by chromosomal slice---');
debug("Got " . scalar(@$feats) . " features back");
print_features($feats);
# print_features($feats);
$feats = $repeat_f_ad->fetch_all_by_Slice_and_type( $slice, "LTR" );
debug( "fetching by type LTR" );
debug( "Got ".scalar( @$feats ). " back" );
# print_features( $feats );
$r = $repeat_f_ad->fetch_by_dbID(518841);
$r = $r->transform('supercontig');
......
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