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