1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 17,
11 -requires_module => 'Data::Stag');
14 use_ok('Bio::Cluster::SequenceFamily');
17 my $seqio= Bio::SeqIO->new('-format' => 'swiss',
18 '-file' => test_input_file('sequencefamily.dat'));
20 while(my $seq = $seqio->next_seq){
23 my $family = Bio::Cluster::SequenceFamily->new(
24 -family_id=>"Family_1",
25 -description=>"SomeFamily",
26 -annotation_score=>"100",
31 is $family->description, "SomeFamily";
32 is $family->annotation_score,100;
34 is $family->family_id,"Family_1";
35 is $family->version, "1.0";
37 $family->add_members($mem[0]);
38 $family->add_members($mem[1]);
40 is $family->cluster_score, "50";
41 is $family->family_score, "50";
43 my @members = $family->get_members(-ncbi_taxid=>9606);
45 foreach my $mem(@members){
46 is $mem->species->ncbi_taxid, 9606;
49 @members = $family->get_members(-binomial=>"Homo sapiens");
51 foreach my $mem(@members){
52 is $mem->species->binomial, "Homo sapiens";
56 $family->flush_members();