[Bioperl-l] Default output format for Bio::SeqIO?
Chris Fields
cjfields at illinois.edu
Mon Jan 3 18:22:20 UTC 2011
On Jan 3, 2011, at 10:48 AM, Phillip San Miguel wrote:
> The following:
>
> perl -e 'use Bio::SeqIO; $out = new Bio::SeqIO()'
>
> results in:
>
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: Unknown format given or could not determine it []
> STACK: Error::throw
> STACK: Bio::Root::Root::throw /usr/local/lib/perl/5.10.0/Bio/Root/Root.pm:368
> STACK: Bio::SeqIO::new /usr/local/lib/perl/5.10.0/Bio/SeqIO.pm:383
> STACK: -e:1
> -----------------------------------------------------------
>
> suggesting there is no default SeqIO format. Is that correct? If so, should the useful example script, bp_extract_feature_seq.pl, be updated so it will not error out from relying on a default format assumption?
>
> --
> Phillip
Bio::SeqIO can guess the format via the file extension or by testing the file via Bio::Tools::GuessSeqFormat; if one doesn't provide a file or file handle of some sort then this may pop up, but it's not really informative. That can be taken care of with the script, but it may be simpler to deal with it in Bio::SeqIO itself (e.g. there should be some error if neither a file or file handle is defined). Let me see what I can come up with.
chris
More information about the Bioperl-l
mailing list