| 1 | #!/usr/bin/env perl -w |
| 2 | |
| 3 | use strict; |
| 4 | use Bio::SeqIO; |
| 5 | use TFBS::DB::LocalTRANSFAC; |
| 6 | |
| 7 | use Test; |
| 8 | plan(tests => 6); |
| 9 | |
| 10 | my $seq = Bio::SeqIO->new(-file=>'t/test.fa')->next_seq; |
| 11 | my $db = TFBS::DB::LocalTRANSFAC->connect(-accept_conditions=>1, |
| 12 | -localdir=>'t/transfac_old'); |
| 13 | ok(("TFBS::DB::LocalTRANSFAC" eq ref($db)),1); |
| 14 | |
| 15 | my $pwm = $db->get_Matrix_by_ID('V$CEBPA_01','PWM'); |
| 16 | |
| 17 | ok($pwm->length,14); |
| 18 | |
| 19 | my $siteset = $pwm->search_seq(-seqobj=>$seq, -threshold=>"80%"); |
| 20 | #print $siteset->GFF(), |
| 21 | |
| 22 | ok($siteset->size,31); |
| 23 | |
| 24 | $db = TFBS::DB::LocalTRANSFAC->connect(-accept_conditions=>1, |
| 25 | -localdir=>'t/transfac_new'); |
| 26 | |
| 27 | ok(("TFBS::DB::LocalTRANSFAC" eq ref($db)),1); |
| 28 | |
| 29 | |
| 30 | $pwm = $db->get_Matrix_by_ID('V$MYOD_01','PWM'); |
| 31 | |
| 32 | ok($pwm->length,12); |
| 33 | |
| 34 | $siteset = $pwm->search_seq(-seqobj=>$seq, -threshold=>"80%"); |
| 35 | print $siteset->GFF(), |
| 36 | |
| 37 | ok($siteset->size,22); |
| 38 |