[Bioperl-l] SeqIO/scf.pm bug (with fix)

Tony Cox avc@sanger.ac.uk
Tue, 29 Oct 2002 15:57:16 +0000 (GMT)


There is a bug in the SeqIO SCF module that means that SCF files with low
dynamic range data that have their trace data values encoded as 8-bit unsigned
values (rather than the normal 16-bit) are incorrectly parsed. This caused the
unpack function to overrun the data and extract garbage.

I'm hoping that somebody can add the patch below to the main trunck SeqIO/scf.pm
module. Here is the diff to fix it:


147,151c158
<             my $byte = "n";
<             if ($self->{sample_size} == 1){
<                 $byte = "c";
<             }
<               @read = unpack "${byte}${length}",$buffer;
---
>                       @read = unpack "n$length",$buffer;


regards

Tony


******************************************************
Tony Cox			Email:avc@sanger.ac.uk
Sanger Institute		WWW:www.sanger.ac.uk
Wellcome Trust Genome Campus	Webmaster
Hinxton				Tel: +44 1223 834244
Cambs. CB10 1SA			Fax: +44 1223 494919
******************************************************