[Bioperl-guts-l] bioperl-live/t seqwithquality.t,1.6,1.7
Heikki Lehvaslaiho
heikki at pub.open-bio.org
Thu Jul 7 12:16:17 EDT 2005
Update of /home/repository/bioperl/bioperl-live/t
In directory pub.open-bio.org:/tmp/cvs-serv19905/t
Modified Files:
seqwithquality.t
Log Message:
handle zero as a quality value, fix bug #1824
Index: seqwithquality.t
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/t/seqwithquality.t,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** seqwithquality.t 19 Dec 2002 22:10:34 -0000 1.6
--- seqwithquality.t 7 Jul 2005 16:16:15 -0000 1.7
***************
*** 166,179 ****
$swq1->seq_obj($seqobj);
! print("6. Testing the subqual() method...\n");
my $t_subqual = "10 20 30 40 50 60 70 80 90";
$swq1->qual($t_subqual);
! print("\t6d) Testing the subqual at the start (border condition)\n");
# ok ('1 2 3' eq join(' ',@{$swq1->subqual(1,3)}));
! print("\t6d) Testing the subqual at the end (border condition)\n");
# ok ('7 8 9' eq join(' ',@{$swq1->subqual(7,9)}));
! print("\t6d) Testing the subqual in the middle\n");
# ok ('4 5 6' eq join(' ',@{$swq1->subqual(4,6)}));
--- 166,194 ----
$swq1->seq_obj($seqobj);
! print("6. Testing the subqual() method...\n") if $DEBUG;
my $t_subqual = "10 20 30 40 50 60 70 80 90";
$swq1->qual($t_subqual);
! print("\t6d) Testing the subqual at the start (border condition)\n") if $DEBUG;
# ok ('1 2 3' eq join(' ',@{$swq1->subqual(1,3)}));
! print("\t6d) Testing the subqual at the end (border condition)\n") if $DEBUG;
# ok ('7 8 9' eq join(' ',@{$swq1->subqual(7,9)}));
! print("\t6d) Testing the subqual in the middle\n") if $DEBUG;
# ok ('4 5 6' eq join(' ',@{$swq1->subqual(4,6)}));
+ print("7. Testing cases where quality is zero...\n") if $DEBUG;
+ $swq1 = Bio::Seq::SeqWithQuality->new(-seq => 'G',
+ -qual => '0',
+ );
+ my $swq2 = Bio::Seq::SeqWithQuality->new(-seq => 'G',
+ -qual => '65',
+ );
+ ok $swq1->length, $swq2->length;
+ $swq1 = Bio::Seq::SeqWithQuality->new(-seq => 'GC',
+ -qual => '0 0',
+ );
+ my $swq2 = Bio::Seq::SeqWithQuality->new(-seq => 'GT',
+ -qual => '65 0',
+ );
+ ok $swq1->length, $swq2->length;
More information about the Bioperl-guts-l
mailing list