Hi Kenny,
thanks for reporting this.  To my mind, the problem is that the NLMSA  
interface gave no easy way to see if the alignment was empty.  My  
resolution was to create a new exception (EmptyAlignmentError, a  
subclass of ValueError), which is raised by NLMSA if the user attempts  
to build() an alignment with no intervals.  Thus, if there are no  
BLAST results, this exception would be raised during the blast()  
method.  If the user wishes, he can ignore this by placing the blast()  
call within a try-except block, like this:

from pygr.nlmsa_utils import EmptyAlignmentError
try:
     r = genome.blast(s, maxseq=1)
except EmptyAlignmentError:
     pass
else:
     # analyze the alignment results in r...

Get the latest code from the public git repository if you want to test  
this...

I guess we should also do something to improve the error message that  
you hit, to explain the situation more clearly.  Presumably that error  
message should also be changed to EmptyAlignmentError.

-- Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to