Commit ef7bccad authored by Daniel Rios's avatar Daniel Rios
Browse files

added new test to store/remove AssemblyExceptionFeatures in the database

parent e706cf5c
......@@ -4,13 +4,12 @@ use Bio::EnsEMBL::Test::TestUtils;
BEGIN { $| = 1;
use Test;
plan tests => 9;
plan tests => 10;
}
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::AssemblyExceptionFeature;
our $verbose = 0;
my $multi = Bio::EnsEMBL::Test::MultiTestDB->new;
......@@ -65,3 +64,30 @@ ok($f->display_id eq $f->alternate_slice->seq_region_name);
my $feat = $aefa->fetch_by_dbID(1);
ok($feat->dbID() == 1);
#check we can store assembly exception features
my $aef_store = new Bio::EnsEMBL::AssemblyExceptionFeature();
my $aef_store2 = new Bio::EnsEMBL::AssemblyExceptionFeature();
#get ref slice
my $ref_slice = $dba->get_SliceAdaptor->fetch_by_region('chromosome',20);
#prepare first object, the haplotype
$aef_store->start(1500);
$aef_store->end(35000);
$aef_store->type('HAP');
$aef_store->slice($chr_slice);
$aef_store->alternate_slice($ref_slice);
#prepare second object, the ref region to be substituted
$aef_store2->start(4500);
$aef_store2->end(38000);
$aef_store2->type('HAP REF');
$aef_store2->slice($ref_slice);
$aef_store2->alternate_slice($chr_slice);
my $asx_id = $aefa->store($aef_store,$aef_store2);
my $aef_new = $aefa->fetch_by_dbID($asx_id);
ok($aef_new->dbID == $asx_id);
$aefa->remove($aef_store);
Markdown is supported
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