[Bioperl-l] Bio::Root::IO reads URLs from -file
Jason Stajich
jason at cgt.duhs.duke.edu
Sun Aug 8 10:30:16 EDT 2004
I'm sort of against putting too much in Root::IO only because it means one
more thing that can go wrong in an essential component. I'd rather make
the logic explicit so maybe going the -url route would be safer?
The 'longway' for doing this is, below, is this still too much work? I
guess you want to have the retry in place.
my $bp = Bio::SeqIO->new(-format => 'fasta',
-fh => Bio::Root::HTTPget->getFH($url) );
-j
On Sun, 8 Aug 2004, Allen Day wrote:
> just commited this to cvs. if you pass a -file arg to a Root::IO
> subclass, the following happens:
>
> if(the file exists){
> do as before
> }
> elsif(the file doesn't exist, and the name looks like a url) {
> try a few times to {
> download the url to a local tempfile, and update -file to point
> to the tempfile
> }
> if(couldn't download the file){
> throw an error
> }
> }
>
> i'm open to moving urls to a special -url argument instead of overloading
> -file. what do people think?
>
> -allen
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu
More information about the Bioperl-l
mailing list