From 0cd74f60821d30d0e5533f2e1804b4dbfede61e6 Mon Sep 17 00:00:00 2001 From: Glenn Proctor <gp1@sanger.ac.uk> Date: Fri, 23 Sep 2005 09:31:58 +0000 Subject: [PATCH] Added test for fetch_coded_for_regulatory_factors() --- modules/t/gene.t | 8 +++++++- modules/t/transcript.t | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/t/gene.t b/modules/t/gene.t index c2de41b4c7..a208f8fa69 100644 --- a/modules/t/gene.t +++ b/modules/t/gene.t @@ -3,7 +3,7 @@ use warnings; BEGIN { $| = 1; use Test; - plan tests => 65; + plan tests => 66; } use Bio::EnsEMBL::Test::MultiTestDB; @@ -628,3 +628,9 @@ $multi->restore(); my $rf_gene = $ga->fetch_by_dbID(18256); #ok(@{$rf_gene->get_all_regulatory_features()} == 1); # non-recursive ok(@{$rf_gene->get_all_regulatory_features(1)} == 12); # recursive + +# test getting coded-for regualtory factors +$gene = $ga->fetch_by_dbID(18271); +my @factors = @{$gene->fetch_coded_for_regulatory_factors()}; +ok($factors[0]->dbID() == 5); + diff --git a/modules/t/transcript.t b/modules/t/transcript.t index 29a0c87d00..be17541678 100644 --- a/modules/t/transcript.t +++ b/modules/t/transcript.t @@ -4,7 +4,7 @@ use vars qw( $verbose ); BEGIN { $| = 1; use Test; - plan tests => 138; + plan tests => 139; } use Bio::EnsEMBL::Test::MultiTestDB; @@ -609,7 +609,11 @@ sub test_trans_mapper_edits { print_coords(\@coords); } - +# test getting coded-for regualtory factors +my $transcript_adaptor = $db->get_TranscriptAdaptor(); +my $transcript = $transcript_adaptor->fetch_by_dbID(21717); +my @factors = @{$transcript->fetch_coded_for_regulatory_factors()}; +ok($factors[0]->dbID() == 2); -- GitLab