[Bioperl-l] Re: GuessSeqFormat problems

Albert Vilella avilella at gmail.com
Tue Aug 16 06:17:14 EDT 2005


El dt 16 de 08 del 2005 a les 10:56 +0100, en/na Andreas Kahari va
escriure:
> On Tue, Aug 16, 2005 at 10:42:20AM +0100, Andreas Kahari wrote:
> [cut]
> > Yes, in some cases.  For a format to "win", its test needs to
> > be the "last one standing" after all the others have failed.
> 
> Looking at the code for the first time in some time, I realize
> this is not how it is actually done, but almost.  If any one
> line (one at the time, from the start and onwards) from the
> input data matches only one format, then the guesser returns
> that format as the format of the data.
> 
> Maybe it would be better if tests were ticked off the list as
> they failed and never re-run?

GuessSeqFormat would tick off the format if the next $lineno regex
fails:

- Look at line 1, tick off the formats that won't comply with the
($lineno == 1 && $line =~/regex/)
- Look at line 2, further eliminate the formats that won't comply with
the ($lineno == 2 && $line =~/regex/).
- and so on for line 3, 4 (and presumably not much more).

This should eliminate cases were a format passes the regex for line 2
although line 1 indicates it is not that format. I suppose this is what
was happening in my pir/phylip case.

    Albert.

> 
> 
> 
> Andreas
> 



More information about the Bioperl-l mailing list