Debian Codegraph @

t/02_Search.t

raw symbols SCIP
1 #!/usr/bin/env perl -w
2
3 use TFBS::Matrix::PFM;
4 use strict;
5
6 use Test;
7 plan(tests => 2);
8
9 my $matrixstring =
10 "0 0 0 0 0 0 0 0\n".
11 "0 12 12 0 12 0 12 12\n".
12 "0 0 0 12 0 12 0 0\n".
13 "12 0 0 0 0 0 0 0";
14
15 my $pfm = TFBS::Matrix::PFM->new(-matrix=>$matrixstring,
16 -name=>"MyMatrix");
17
18 my $siteset = $pfm->to_PWM->search_seq(-file=>'t/test.fa',-threshold=>"70%");
19
20 ok($siteset->size(), 20);
21 print $siteset->GFF();
22
23 my $sitepairset =
24 $pfm->to_PWM->search_aln(-file=>'t/test.aln',
25 -window=>50, -cutoff=>50,
26 -threshold=>"70%");
27
28 my $It = $sitepairset->Iterator();
29 my $startsum = 0;
30 while (my $sitepair = $It->next) {
31 $startsum += $sitepair->feature1->start;
32 }
33
34 ok($startsum, 3013);