Correct 'directory' section
[bioperl-live.git] / t / Tools / ePCR.t
blob2cbc9d619902f90eec06813531996844c59b797b
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
5 BEGIN {     
6     use lib '.';
7         use Bio::Root::Test;
8         
9         test_begin(-tests => 27);
10         
11     use_ok('Bio::Tools::EPCR');
12     use_ok('Bio::SeqIO');
15 my $DEBUG = test_debug();
17 my $seqio = Bio::SeqIO->new('-format' => 'fasta', '-file' => test_input_file('genomic-seq.fasta'));
19 my $seq = $seqio->next_seq;
20 ok($seq);
21 my $epcr = Bio::Tools::EPCR->new( '-file' => test_input_file('genomic-seq.epcr'));
22 ok ($epcr);
23 my %strand;
24 while( defined(my $feature = $epcr->next_feature) ) {
25     ok($feature);
26     ok($feature->start);
27     ok($feature->end);
28     $seq->add_SeqFeature($feature);
29     $strand{$feature->strand} ++;
31 is ($strand{1},  3, 'got 3 forward strand ePCR hits');
32 is ($strand{-1}, 3, 'got 3 reverse strand ePCR hits');
34 if( $DEBUG ) {
35     $seqio = Bio::SeqIO->new('-format' => 'genbank' );
36     $seqio->write_seq($seq);