[Bioperl-l] bioperl filehandles

Jason Stajich jason at cgt.mc.duke.edu
Tue Jan 28 19:36:54 EST 2003


Tony - have you gotten a chance to test on ancient perl installs that are
probably knocking around sanger - if it works there then I think it is
fine.

-jason
On Tue, 28 Jan 2003, Tony Cox wrote:

>
>
> I have just tweaked the SeqIO:scf module so that it will support
> IO::String-based filehandles. I wanted to do this so that I can process a lot of
> scf files without having to use intermediate disk files:
>
> my $scf = <...binary rubbish...>
> my $io = IO::String->new($scf);
> my $in = Bio::SeqIO->new( '-fh' => $io, '-format' => 'scf');
> my $seq = $in->next_seq();
> etc,etc
>
> To get this to work I had to choose whether to call "binmode" since this is not
> supported by IO:string but I also had to change the way that the seek commands
> were called. Instead of
>
> seek ($fh, $offset, 0);
>
> I changed it to:
>
> $fh->seek($offset,0);
>
> I'm thinking this is OK and it works fine. I believe that perl filehandles
> implement a generic interface that include seek so it shouldn't break anything.
> However, I just wanted to check that I havn't missed something before commiting
> the change.
>
> thanks
>
> Tony
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list