diff --git a/modules/t/qtl.t b/modules/t/qtl.t new file mode 100644 index 0000000000000000000000000000000000000000..b8d3eea1d62a4d8b649c25b57b44bcb261221e53 --- /dev/null +++ b/modules/t/qtl.t @@ -0,0 +1,57 @@ +use lib 't'; +use strict; + +BEGIN { $| = 1; + use Test ; + plan tests => 4; +} + +use MultiTestDB; +use Bio::EnsEMBL::Map::Marker; +use Bio::EnsEMBL::Map::MarkerSynonym; + +use Bio::EnsEMBL::Map::DBSQL::QtlAdaptor; +use Bio::EnsEMBL::Map::DBSQL::QtlFeatureAdaptor; +use Bio::EnsEMBL::Slice; + +use TestUtils qw(debug test_getter_setter); + +our $verbose = 0; #set to 1 to turn on debug printouts + +my $multi = MultiTestDB->new(); +my $db = $multi->get_DBAdaptor( 'core' ); +my $sa = $db->get_SliceAdaptor(); + + + +my $slice = $sa->fetch_by_chr_name( "20" ); + +my $qtl_features = $slice->get_all_QtlFeatures(); + +debug( "found ".scalar( @$qtl_features ) ); +debug( join( "\n", map { "$_" } %{$qtl_features->[0]})."\n" ); +debug( join( "\n", map { "$_" } %{$qtl_features->[1]})."\n" ); + +ok( scalar( @$qtl_features ) == 2 ); + +my $qtladptor = $db->get_QtlAdaptor(); +my $traits = $qtladptor->list_traits(); + + +debug( join( "\n", map {"Trait: $_"} @$traits )); +ok( scalar( @$traits ) == 2 ); + +my $qtls = $qtladptor->fetch_all_by_trait( $traits->[0] ); +my $qf = $qtls->[0]->get_QtlFeature(); + +debug( join( "\n", %$qf )); +ok( $qf->isa( "Bio::EnsEMBL::Map::QtlFeature" )); + +my @result = $qf->transform(); + +debug( join("\n", @result )); +ok( scalar( @result ) == 9 ); + + + + diff --git a/modules/t/test_genome.zip b/modules/t/test_genome.zip index c929737a48764fdbb484272bf9eb0a5263e272b8..0d027498b526b6535f50652ec14a1919132076ec 100644 Binary files a/modules/t/test_genome.zip and b/modules/t/test_genome.zip differ