1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 21);
13 use_ok('Bio::Seq::PrimaryQual');
16 my $DEBUG = test_debug();
18 my $in_qual = Bio::SeqIO->new('-file' => test_input_file('qualfile.qual'),
25 while ( my $qual = $in_qual->next_seq() ) {
27 isa_ok($qual, 'Bio::Seq::PrimaryQual');
28 @quals = @{$qual->qual()};
30 warn($qual->id()."\n");
32 warn("(".scalar(@quals).") quality values.\n");
40 # in October 2004, Carlos Mauricio La Rota posted a problem with descriptions
41 # this routine is to test that
44 # this one has a forced header
45 my $seq = Bio::Seq::PrimaryQual->new(
47 -header => "Hank is a good cat. I gave him a bath yesterday.");
48 my $out = Bio::SeqIO->new(-file => ">".test_output_file(),
51 is $seq->header, 'Hank is a good cat. I gave him a bath yesterday.';
52 @quals = @{$seq->qual()};
53 is scalar(@quals), 11;
54 ok $out->write_seq($seq);
60 ok $out->write_seq($seq);
64 $in_qual = Bio::SeqIO->new('-file' => test_input_file('bug2335.fastq'),
65 '-format' => 'fastq');
68 my $qual = $in_qual->next_seq();
69 isa_ok($qual, 'Bio::Seq::Quality');
70 @quals = @{$qual->qual()};
74 my $qualslice = join(',',@quals[0..10]);
75 is($qualslice, '31,23,32,23,31,22,27,28,32,24,25');