[Bioperl-l] GuessSeqFormat

Lee Katz lskatz at gmail.com
Wed Mar 2 16:53:52 UTC 2011

> The current behavior is the most common use case; stipulating the format
> with the file extension is pretty common and a surer way to get the correct
> format beyond explicitly setting it.
> If you want the opposite you can manually run the file through
> GuessSeqFormat and then (using the guess) use SeqIO with the guessed format,
> but I'm curious as to why you would want this behavior.  If it's for
> validation, I would highly recommend NOT using that module for validation
> purposes...
> chris

I understand your reasoning that checking a file extension is almost like a
user setting for providing the correct format.  Also I understand that I can
use the guessing module to discover the format on my own if I should choose
to do so.

However for your curiosity I'll try to explain why I would want this.
 Occasionally I get an error that I gave the wrong format for an input file.
 This could be quickly remedied by BioPerl figuring out the format by the
contents of the file rather than the extension.

Although now that I think about it--perhaps it is not a very fast method for
discovering the format and that it only looks at the first numbers of lines
before making a decision.  This would make it error-prone and slow I

More information about the Bioperl-l mailing list