File: 01_Matrix.t

package info (click to toggle)
libtfbs-perl 0.5.svn.20100421-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 920 kB
  • sloc: perl: 6,073; ansic: 604; makefile: 30
file content (33 lines) | stat: -rw-r--r-- 602 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
#!/usr/bin/env perl -w

use TFBS::Matrix::PFM;
use Test;
plan(tests => 4);
# print STDERR join("\n", @INC);

my $matrixstring =
    "2 2 2 2 2 2 2 2\n0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0";

my $pfm = TFBS::Matrix::PFM->new(-matrix=>$matrixstring,
				 -name=>"MyMatrix");

my $pfmstring = $pfm->rawprint;

my $icmstring = $pfm->to_ICM(-add_pseudocounts=>0)->rawprint;

ok($pfmstring, $icmstring);

ok(1, defined $pfm->to_ICM);

my $pwmstring = $pfm->to_PWM->rawprint;

my @pwmlines = split "\n", $pwmstring;

ok ($pwmlines[1], $pwmlines[3]);
ok (1, ($pwmlines[0] ne $pwmlines[1]));