Skip to content
Snippets Groups Projects
Commit 0ac676fe authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Factor->motif

parent 0df84302
No related branches found
No related tags found
No related merge requests found
use strict;
use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::RegulatoryMotif;
use Bio::EnsEMBL::RegulatoryFactor;
BEGIN { $| = 1;
use Test;
......@@ -13,12 +13,12 @@ my $verbose = 0;
#
# Test constructor
#
my $rm = Bio::EnsEMBL::RegulatoryMotif->new(-NAME => 'Joe',
my $rm = Bio::EnsEMBL::RegulatoryFactor->new(-NAME => 'Joe',
-TYPE => 'promoter');
ok($rm);
ok(ref($rm));
ok($rm->isa('Bio::EnsEMBL::RegulatoryMotif'));
ok($rm->isa('Bio::EnsEMBL::RegulatoryFactor'));
ok($rm->name eq 'Joe');
ok($rm->type eq 'promoter');
......
......@@ -16,24 +16,24 @@ my $verbose = 0;
# Test Creation
my $rma = $db->get_RegulatoryMotifAdaptor();
my $rma = $db->get_RegulatoryFactorAdaptor();
ok(ref($rma) && $rma->isa('Bio::EnsEMBL::DBSQL::RegulatoryMotifAdaptor'));
ok(ref($rma) && $rma->isa('Bio::EnsEMBL::DBSQL::RegulatoryFactorAdaptor'));
#
# Test fetch_by_dbID
#
my $rm = $rma->fetch_by_dbID(1);
ok($rm->name() eq 'motif1');
ok($rm->name() eq 'factor1');
ok($rm->dbID == 1);
ok($rm->type eq 'miRNA_target');
#
# Test fetch_by_name
#
$rm = $rma->fetch_by_name('motif1');
ok($rm->name() eq 'motif1');
$rm = $rma->fetch_by_name('factor1');
ok($rm->name() eq 'factor1');
ok($rm->dbID() == 1);
ok($rm->type() eq 'miRNA_target');
......@@ -46,9 +46,9 @@ ok(@{$rma->fetch_all_by_type('promoter')} == 2);
# Test store
#
$multi_db->save('core', 'regulatory_motif');
$multi_db->save('core', 'regulatory_factor');
$rm = Bio::EnsEMBL::RegulatoryMotif->new(-NAME => 'test_store',
$rm = Bio::EnsEMBL::RegulatoryFactor->new(-NAME => 'test_store',
-TYPE => 'promoter');
$rma->store($rm);
......@@ -60,4 +60,4 @@ $rm = $rma->fetch_by_dbID($rm->dbID);
ok($rm->name eq 'test_store');
ok($rm->type eq 'promoter');
$multi_db->restore('core', 'regulatory_motif');
$multi_db->restore('core', 'regulatory_factor');
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