2 ## Bioperl Test Harness Script for Modules
7 eval { require Test; };
14 plan tests => $NTESTS;
16 use Bio::Tools::Run::FootPrinter;
20 for ( $Test::ntest..$NTESTS ) {
21 skip("FootPrinter program not found. Skipping.",1);
24 my $treefile =Bio::Root::IO->catfile("t", "data", "tree_of_life");
28 'sequence_type'=>'upstream',
30 'position_change_cost'=>5,
31 'triplet_filtering'=>1,
39 my $fact = Bio::Tools::Run::FootPrinter->new(@params);
41 if( ! $fact->executable ) {
42 warn("FootPrinter program not found. Skipping tests $Test::ntest to $NTESTS.\n");
48 ok $fact->sequence_type, 'upstream';
49 ok $fact->subregion_size, 30;
50 ok $fact->position_change_cost, 5;
51 ok $fact->triplet_filtering,1;
52 ok $fact->pair_filtering,1;
53 ok $fact->post_filtering,1;
54 ok $fact->inversion_cost,1;
55 ok $fact->tree, $treefile;
57 my $input= Bio::Root::IO->catfile("t","data","FootPrinter.seq.fa");
59 my $in = Bio::SeqIO->new(-file => "$input" , '-format' => 'fasta');
61 while (my $seq = $in->next_seq){
64 my @fp= $fact->run(@seq);
67 my $first = shift @fp;
69 my @motifs = $first->sub_SeqFeature;
71 ok $motifs[0]->seq_id,'TETRAODON';
72 ok $motifs[0]->seq->seq, 'tacaggatgca';
73 ok $motifs[0]->start, 352;
74 ok $motifs[0]->end, 362;
75 ok $motifs[1]->seq->seq, 'ccatatttgga';
76 ok $motifs[1]->start, 363;
77 ok $motifs[1]->end, 373;