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

Tests for RegulatoryFeature.pm

parent 66853e3f
No related branches found
No related tags found
No related merge requests found
use strict;
use Bio::EnsEMBL::Test::TestUtils;
BEGIN { $| = 1;
use Test;
plan tests => 17;
}
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::RegulatoryFeature;
use Bio::EnsEMBL::RegulatoryMotif;
our $verbose = 0;
my $multi = Bio::EnsEMBL::Test::MultiTestDB->new;
# get a core DBAdaptor
#
my $dba = $multi->get_DBAdaptor("core");
my $rfa = $dba->get_RegulatoryFeatureAdaptor;
#
# 1 create a new RegulatoryFeature
#
my $rf = new Bio::EnsEMBL::RegulatoryFeature;
ok($rf);
#
# 2-7 test the basic getter and setters
#
# 2 start
ok(test_getter_setter($rf,'start',10));
# 3 end
ok(test_getter_setter($rf,'end',14));
# 4 strand
ok(test_getter_setter($rf,'strand',1));
# 5 motif
#my $rm = Bio::EnsEMBL::RegulatoryMotif->new(-NAME => 'Joe',
# -TYPE => 'promoter');
#ok(test_getter_setter($rf,'motif',$rm));
# 6 influence
ok(test_getter_setter($rf,'influence','positive'));
# 7 dbID
ok(test_getter_setter($rf,'dbID',42));
#
# 8 check adaptor attaching
#
$rf->adaptor($rfa);
ok($rf->adaptor->isa('Bio::EnsEMBL::DBSQL::RegulatoryFeatureAdaptor'));
# 9 check retrieving regulated transcripts
my $rf1 = $rfa->fetch_by_dbID(1);
ok(@{$rf1->regulated_transcripts()} == 3);
# 9 check get_transcripts_regulated_by_same_motif
ok(@{$rf1->transcripts_regulated_by_same_motif()} == 3);
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