Debian Codegraph @

t/07_MEME.t

raw symbols SCIP
1 #!/usr/bin/env perl -w
2
3 use TFBS::PatternGen::MEME;
4
5 use Test;
6 plan(tests => 5);
7 my $memepath;
8 eval {$memepath = `which meme 2> /dev/null`;};
9 if (!$memepath or ($memepath =~ / /)) { # if space, then error message :)
10 print "ok # Skipped: (no meme executable found)\n"x5;
11 exit(0);
12 }
13
14 my $fastafile = "t/test_meme.fa";
15
16 for (1..1) {
17 my $patterngen=TFBS::PatternGen::MEME->new(-seq_file=>$fastafile,
18 -additional_params=>' -revcomp -nmotifs 2 -w 10',
19 );
20
21
22 my @motifs=$patterngen->all_motifs;
23 if (@motifs>0){
24 ok(1);
25 my @sites=$motifs[0]->get_sites;
26 # my $seq=$sites[0]->seq->seq;
27 ok(1,($sites[0]->seq->seq ne ''));
28 }
29
30 my @pfms = $patterngen->all_patterns();
31 if (@pfms>0) {
32 ok(1);
33 ok(1,($pfms[0]->tag("score")>0));
34 last;
35 }
36 }
37
38 ok(1);
39