File: 07_Gibbs.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 (41 lines) | stat: -rw-r--r-- 774 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
37
38
39
40
41
#!/usr/bin/env perl -w


use TFBS::PatternGen::Gibbs;

use Test;
plan(tests => 5);
my $gibbspath;
eval {$gibbspath = `which Gibbs 2> /dev/null`;};
if (!$gibbspath or ($gibbspath =~ / /)) { # if space, then error message :)
    print "ok # Skipped: (no Gibbs executable found)\n"x5;
	exit(0);
}

my $fastafile = "t/test.gibbin";

for (1..5) {
    my $gibbs = 
      TFBS::PatternGen::Gibbs->new
	  (-nr_hits=>10,
	   -motif_length=>[10..12],
	   -seq_file=>$fastafile);
    

    my @pfms = $gibbs->all_patterns();
    my @motifs=$gibbs->all_motifs;
    if (@motifs>0){
	ok(1);
	my @sites=$motifs[0]->get_sites;
#	my $seq=$sites[0]->seq->seq;
	ok(1,($sites[0]->seq->seq ne ''));
    }
    if (@pfms>0) {
	ok(1);
	ok(1,($pfms[0]->tag("MAP_score")>0));
	last;
    }
}

ok(1);