5 use CXGN::Marker::Search;
8 use SGN::Test 'with_test_level';
10 with_test_level( local => sub {
12 my $dbh = SGN::Context->new->dbc->dbh;
14 for ( 0..10 ) { # test a few times
16 my $msearch = CXGN::Marker::Search->new($dbh);
17 $msearch->must_be_mapped();
18 $msearch->has_subscript();
20 #$msearch->marker_id(518);
21 $msearch->perform_search();
22 #diag("search finished, creating locations\n");
23 my ($loc) = $msearch->fetch_location_markers();
24 #diag("finished creating locations\n");
26 isa_ok($loc, 'CXGN::Marker::LocMarker');
29 # diag(Dumper $loc->{loc});
31 my $loc_id = $loc->location_id();
32 ok($loc_id, "loc_id is $loc_id");
34 my $chr = $loc->chr();
35 cmp_ok($chr, '>', 0, "chromosome = $chr");
37 my $pos = $loc->position();
38 cmp_ok($pos, '>=', 0 , "position = $pos");
40 my $sub = $loc->subscript();
41 like($sub, qr/^[ABC]$/i, "subscript = $sub");
43 my $conf = $loc->confidence();
44 like($conf, qr/I|LOD|uncalculated/, "confidence = $conf");
46 my $mv = $loc->map_version();
47 cmp_ok($mv, '>', 0, "map version = $mv");
49 my $map = $loc->map_id();
50 cmp_ok($map, '>', 0, "map_id = $map");