File: 09_Word_Consensus.t

package info (click to toggle)
libtfbs-perl 0.7.1%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,992 kB
  • sloc: perl: 10,728; ansic: 1,228; makefile: 560; sh: 9
file content (36 lines) | stat: -rw-r--r-- 854 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env perl -w

use TFBS::Word::Consensus;
use Test;
plan(tests => 2);
# print STDERR join("\n", @INC);

my $word = "AGGTCMNNNNKGACCT";

my $word_obj = TFBS::Word::Consensus->new(-word=>$word,
                                          -name=>"MyConsensus");
print $word_obj->to_PWM->prettyprint;

my $siteset = $word_obj->search_seq(-file=>'t/test.fa',
                                    -threshold=>"70%",
                                    -max_mismatches => 4);

ok($siteset->size(), 6);
#print $siteset->GFF."\n\n";

my $sitepairset =
    $word_obj->search_aln(-file=>'t/test.aln',
			     -window=>50, -cutoff=>50,
			     -max_mismatches=>6);
#print $sitepairset->GFF;

my $It = $sitepairset->Iterator();
my $startsum = 0;

while (my $sitepair = $It->next)  {
    $startsum += $sitepair->feature1->start;
}

ok($sitepairset->size, 24);