Skip to content
Snippets Groups Projects
Commit f0c176db authored by Arne Stabenau's avatar Arne Stabenau
Browse files

New test and test data for qtls

parent 469fc39d
No related branches found
No related tags found
No related merge requests found
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 );
No preview for this file type
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