Debian Codegraph @

t/10_Tools_SetOperations.t

raw symbols SCIP
1 #!/usr/bin/env perl -w
2
3 use TFBS::Matrix::PFM;
4 use TFBS::Tools::SetOperations;
5 use strict;
6
7 use Test;
8 plan(tests=>2);
9
10 my $matrixstring =
11 "0 0 0 0 0 0 0 0\n".
12 "0 12 12 0 12 0 12 12\n".
13 "0 0 0 12 0 12 0 0\n".
14 "12 0 0 0 0 0 0 0";
15
16 my $pfm = TFBS::Matrix::PFM->new(-matrix=>$matrixstring,
17 -name=>"MyMatrix");
18
19 my $siteset = $pfm->to_PWM->search_seq(-file=>'t/test.fa',-threshold=>"70%");
20
21 ok($siteset->size(), 20);
22
23 my $siteset2 = $pfm->to_PWM->search_seq(-file => 't/test.fa',
24 -threshold=>"60%");
25
26 ok ($siteset2->size>20, 1);
27
28 my $sop = TFBS::Tools::SetOperations->new;
29
30 my $i = $sop->intersection($siteset, $siteset2);
31
32 my $u = $sop->union($siteset, $siteset2);
33
34
35 exit(0);