[Bioperl-l] PrimarySeq, Seq fixes

Jason Stajich jason@chg.mc.duke.edu
Fri, 15 Dec 2000 17:08:15 -0500 (EST)

After reading some more IO documentation I realized 
there are some other options:

solution 1:
remove Tempfile creation, 
replace line to wrap $tfh into FileHandle with the following:

     my $fh = IO::File->new_tmpfile();

Not sure if this work on Win32 or Mac and I'm not sure where the
temporary file is stored exactly so I'm guessing its not the best

Solution 2:
Keep using File::Temp;
replace use of FileHandle as the following:

   my $fh = IO::File->new($file, O_RDWR);

Both work on linux 2.2.17 x86 running perl 5.00503 and 
solaris 2.7 running perl 5.6.0

I think File::Temp says that problems with #2 are that can't guarantee
that filename will not be used again by another process - using filehandle
is better, but I think as long as we don't close the filehandle until
after a new one is opened on the file, there is no problem.

So I will implement second solution unless anyone has suggestions or
comments to the contrary or can think of how other solutions might work

On Fri, 15 Dec 2000, Ewan Birney wrote:

> I have moved PrimarySeq and Seq over to direct new() syntax. This had
> knock on effects all over the place (Bio::Seq inherieting modules) which I
> then chained up. I am not sure whether this was good or bad.
> On my linux box, the new LargePrimarySeq stuf did not work at all. I tired
> to fix it by making a filehandle object, but this didn't work. We are
> failing tests here --- Jason - any chance of looking over this - I can't
> seem to get a FileHandle to open read/write...
> I'm moving towards Bio::Seq::GenEMBL
> e.
> -----------------------------------------------------------------
> Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
> <birney@ebi.ac.uk>. 
> -----------------------------------------------------------------
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l

Jason Stajich
Center for Human Genetics
Duke University Medical Center