1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 12,
11 -requires_module => 'Time::HiRes');
13 use_ok('Bio::ClusterIO');
14 use_ok('Bio::Cluster::ClusterFactory');
18 test_skip(-tests => 8, -requires_module => 'XML::SAX');
20 my ($clusterio, $result,$hit,$hsp);
21 $clusterio = Bio::ClusterIO->new('-tempfile' => 0,
23 '-file' => test_input_file('LittleChrY.dbsnp.xml'));
25 $result = $clusterio->next_cluster;
27 is($result->observed, 'C/T');
28 is($result->type, 'notwithdrawn');
31 my @ss = $result->each_subsnp;
33 is($ss[0]->handle, 'CGAP-GAI');
34 is($ss[1]->handle, 'LEE');
36 # don't know if these were ever meant to work... cjf 3/7/07
37 #is($result->heterozygous, 0.208738461136818);
38 #is($result->heterozygous_SE, 0.0260274689436777);
41 ###################################
42 # ClusterFactory tests #
43 ###################################
45 my $fact = Bio::Cluster::ClusterFactory->new();
46 # auto-recognize implementation class
47 my $clu = $fact->create_object(-display_id => 'Hs.2');
48 isa_ok($clu, "Bio::Cluster::UniGeneI");
49 $clu = $fact->create_object(-namespace => "UNIGENE");
50 isa_ok($clu, "Bio::Cluster::UniGeneI");