PreSeq.pm bug

Steve A. Chervitz sac@genome.stanford.edu
Tue, 12 Aug 1997 21:22:55 -0700 (PDT)


I discovered a logic error in the PreSeq::alphabet_ok() method:
it returns true when it should return false (and vice versa).

Fix it by changing the last two lines of this method as indicated:

Currently:

    if($seq =~ /[^$al]/i) { return 1; } # OK
    else { return 0 ; }                 #not OK

Should be:

    if($seq =~ /[^$al]/i) { return 0; } #not OK
    else { return 1 ; }                 # OK


Also, add a line to the examples/testSeq.pl script to exercise  
alphabet_ok() directly:

  print " ok= ",$seq->alphabet_ok()?'yes':'no',"\t";

(add this to the the foreach() block, after line 101)

-------------------
Unrelated Issue: 

For Fasta-formatted sequences, can the id+description line be >60 char long?
I've used some quasi-Fasta files where this was the case, but this this 
may not be standard. It might be best for PreSeq to ensure that the 
id+description line is within this limit when outputing in Fasta format.  

Cheers,
SteveC