1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 16);
15 my $tmpfile = test_output_file();
17 my $seqio = Bio::SeqIO->new('-format'=>'largefasta',
18 '-file' =>test_input_file('genomic-seq.fasta'));
19 is defined $seqio, 1, 'Instantiate Bio::SeqIO::largefasta';
21 my $pseq = $seqio->next_seq();
22 $pseq->alphabet('dna');
23 $pseq->desc('this is my description');;
24 my $plength = $pseq->length();
25 my $last_3 = $pseq->subseq($plength-3,$plength);
29 is length($pseq->subseq(100, 299)), 200;
30 is $pseq->trunc(100,199)->length(), 100;
31 is $pseq->alphabet(), 'dna';
32 is $pseq->display_id(), 'HSBA536C5';
33 is $pseq->accession_number(), 'unknown';
34 is $pseq->desc, 'this is my description';
36 is open(OUT, ">$tmpfile"), 1;
38 my $seqout = Bio::SeqIO->new('-format' => 'largefasta',
40 is defined $seqout, 1;
42 is $seqout->write_seq($pseq), 1;
45 my $seqin = Bio::SeqIO->new('-format' => 'largefasta',
47 my $pseq2 = $seqin->next_seq;
48 is ($plength, $pseq2->length());
49 is ($pseq->display_id(), $pseq2->display_id());
50 is ($pseq->desc(), $pseq2->desc());