2 ## Bioperl Test Harness Script for Modules
8 test_begin(-tests => 24);
9 use_ok('Bio::Tools::Run::FootPrinter');
14 my $treefile = test_input_file("tree_of_life");
18 'sequence_type'=>'upstream',
20 'position_change_cost'=>5,
21 'triplet_filtering'=>1,
29 my $fact = Bio::Tools::Run::FootPrinter->new(@params);
30 test_skip(-requires_executable => $fact, -tests => 22);
33 is $fact->sequence_type, 'upstream';
34 is $fact->subregion_size, 30;
35 is $fact->position_change_cost, 5;
36 is $fact->triplet_filtering,1;
37 is $fact->pair_filtering,1;
38 is $fact->post_filtering,1;
39 is $fact->inversion_cost,1;
40 is $fact->tree, $treefile;
42 my $input= test_input_file("FootPrinter.seq.fa");
44 my $in = Bio::SeqIO->new(-file => "$input" , '-format' => 'fasta');
46 while (my $seq = $in->next_seq){
47 push @seq, $seq; # 6 sequences
49 my @fp= $fact->run(@seq);
52 my $first = shift @fp;
54 my @motifs = $first->sub_SeqFeature;
56 # older version of FootPrinter? or version 2.1 is buggy with its silly first
58 is $motifs[0]->seq_id,'TETRAODON-motif1';
59 is $motifs[0]->seq->seq, 'tacaggatgca';
60 is $motifs[0]->start, 352;
61 is $motifs[0]->end, 362;
62 is $motifs[1]->seq_id,'TETRAODON-motif2';
63 is $motifs[1]->seq->seq, 'ccatatttgga';
64 is $motifs[1]->start, 363;
65 is $motifs[1]->end, 373;
68 elsif (@motifs == 3) {
69 is $motifs[0]->seq_id,'TETRAODON-motif1';
70 is $motifs[0]->seq->seq, 't';
71 is $motifs[0]->start, 352;
72 is $motifs[0]->end, 352;
73 is $motifs[1]->seq_id,'TETRAODON-motif2';
74 is $motifs[1]->seq->seq, 'acaggatgca';
75 is $motifs[1]->start, 353;
76 is $motifs[1]->end, 362;
77 is $motifs[2]->seq_id,'TETRAODON-motif3';
78 is $motifs[2]->seq->seq, 'ccatatttgga';
79 is $motifs[2]->start, 363;
80 is $motifs[2]->end, 373;