3 # ## Bioperl Test Harness Script for Modules
7 eval { require Test
; };
14 plan tests => $NTESTS;
18 foreach ( $Test::ntest..$NTESTS ) {
19 skip('Unable to run Prints tests, exe may not be installed',1);
23 use Bio::Tools::Run::Hmmpfam;
28 my $db = Bio::Root::IO->catfile("t","data","pfam_sample_R11");
29 my @params = ('DB'=>$db,'E'=>5);
32 my $factory = Bio::Tools::Run::Hmmpfam->new(@params);
33 ok $factory->isa('Bio::Tools::Run::Hmmpfam');
35 my $prot_file= Bio::Root::IO->catfile("t","data","hmmpfam_protein_input");
37 my $seq1 = Bio::Seq->new();
38 my $seqstream = Bio::SeqIO->new(-file => $prot_file, -fmt => 'Fasta');
39 $seq1 = $seqstream->next_seq();
41 my $hmmpfam_present = $factory->executable();
43 unless ($hmmpfam_present) {
44 warn("hmmpfam program not found. Skipping tests $Test::ntest to $NTESTS.\n");
48 my $searchio = $factory->predict_protein_features($seq1);
51 while (my $result = $searchio->next_result){
52 while(my $hit = $result->next_hit){
53 while (my $hsp = $hit->next_hsp){
59 ok $feat[0]->isa('Bio::SeqFeatureI');
60 ok ($feat[0]->feature1->start,25);
61 ok ($feat[0]->feature1->end,92);
62 ok ($feat[0]->feature2->start,1);
63 ok ($feat[0]->feature2->end,124);