1 # -*-Perl-*- Test Harness script for Bioperl
9 test_begin(-tests => 16,
10 -requires_modules => [qw(XML::Parser::PerlSAX XML::Writer)]);
12 use_ok('Bio::SeqIO::tinyseq');
15 my $file = test_input_file('test.tseq');
16 my $outfile = test_output_file();
18 my $instream = Bio::SeqIO->new( -file => $file,
19 -format => 'tinyseq' );
21 my $outstream = Bio::SeqIO->new( -file => ">$outfile",
22 -format => 'tinyseq' );
24 my $seq = $instream->next_seq;
26 ok(defined $seq->seq);
27 is($seq->length, 5830);
28 is($seq->accession_number,'NM_002253');
30 is($seq->species->binomial, 'Homo sapiens');
31 is($seq->species->ncbi_taxid, 9606);
32 $outstream->write_seq($seq);
37 my $reread = Bio::SeqIO->new( -file => $outfile,
38 -format => 'tinyseq' );
40 my $seq2 = $reread->next_seq;
44 is($seq2->length, 5830);
45 is($seq2->accession_number, 'NM_002253');
47 is($seq2->species->binomial, 'Homo sapiens');
48 is($seq2->species->ncbi_taxid, 9606);