[Bioperl-l] GuessSeqFormat

Chris Fields cjfields at illinois.edu
Wed Mar 2 16:26:58 UTC 2011


On Mar 2, 2011, at 8:32 AM, Lee Katz wrote:

> Hi,
> I noticed that even though there is a GuessSeqFormat module, SeqIO and
> probably other modules first rely on the extension of a filename rather than
> the content.  Could the behavior be altered so that it first checks the
> content of the file, and if it turns up nothing then check the file
> extension?

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





More information about the Bioperl-l mailing list