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