2 ## Bioperl Test Harness Script for Modules
8 test_begin(-tests => 24,
9 -requires_modules => ['Algorithm::Diff', 'Bio::Cluster::SequenceFamily']);
10 use_ok('Bio::Tools::Run::TribeMCL');
11 use_ok('Bio::SearchIO');
14 my $blast_out = test_input_file("TribeMCL.bls");
16 #do from raw blast output
17 my @params=('inputtype'=>'blastfile',I=>'3.0');
18 my $fact = Bio::Tools::Run::TribeMCL->new(@params);
22 skip("Couldn't create a TribeMCL wrapper",22);
24 my $desc = test_input_file("TribeMCL.desc");
25 $fact->description_file($desc);
27 isa_ok $fact,'Bio::Tools::Run::TribeMCL';
28 unless ($fact->matrix_executable){
29 skip("Tribe Matrix program not found. Skipping tests...", 21);
31 unless ($fact->mcl_executable){
32 skip("Markov Clustering program not found. Skipping tests...",21);
36 $fact->quiet($bequiet);
38 my ($fam) = $fact->run($blast_out);
39 my @members = $fam->get_members;
40 isa_ok $fam,"Bio::Cluster::SequenceFamily";
41 isa_ok $members[0],"Bio::Seq";
42 is ($members[0]->id, 'ENSANGP00000008485');
43 is ($members[1]->id, 'ENSDRMP3263');
44 is ($members[2]->id, 'ENSMUSP00000026170');
45 is ($fam->description,'ubiquitin');
46 is ($fam->annotation_score,45.0549450549451);
51 my $sio = Bio::SearchIO->new(-format=>'blast',
54 @params=('inputtype'=>'searchio',I=>'3.0');
55 $fact = Bio::Tools::Run::TribeMCL->new(@params);
56 $fact->description_file($desc);
58 isa_ok $fact,'Bio::Tools::Run::TribeMCL';
60 $fact->quiet($bequiet);
62 ($fam) = $fact->run($sio);
63 isa_ok $fam,"Bio::Cluster::SequenceFamily";
64 isa_ok $members[0],"Bio::Seq";
65 is ($members[0]->id, 'ENSANGP00000008485');
66 is ($members[1]->id, 'ENSDRMP3263');
67 is ($members[2]->id, 'ENSMUSP00000026170');
68 is ($fam->description,'ubiquitin');
69 is ($fam->annotation_score,45.0549450549451);
72 @params=('inputtype'=>'pairs',I=>'3.0');
73 $fact = Bio::Tools::Run::TribeMCL->new(@params);
74 isa_ok $fact,'Bio::Tools::Run::TribeMCL';
76 $fact->quiet($bequiet);
78 ($fam) = $fact->run( [[qw(ENSP00000257547 ENSP00000261659 1 50)],
79 [qw(O42187 ENSP00000257547 1 119)]]);
80 @members = $fam->get_members;
81 is ($members[0]->id, 'ENSP00000257547');
82 is ($members[1]->id, 'ENSP00000261659');
83 is ($members[2]->id, 'O42187');